Categorygithub.com/kroppt/gfx
modulepackage
0.0.0-20210611042050-acd486a6975c
Repository: https://github.com/kroppt/gfx.git
Documentation: pkg.go.dev

# Functions

LoadFontTexture caches all of the glyph pixel data in an OpenGL texture for a given font at a given size.
NewBufferObject returns a new buffer object.
NewCubeMap creates a CubeMap object that wraps the OpenGL texture functions.
NewFrameBuffer creates an FBO of the specified size that renders to a texture.
NewProgram compiles a vertex and fragment shader, attaches them to a new shader program and returns its ID.
NewShader attempts to compile the given shader source code as a shader of type shaderType (e.g.
NewTexture creates a Texture object that wraps the OpenGL texture functions.
No description provided by the author
NewTextureFromFile creates a new Texture, loading data from fileName with the assumption that it is an image that can be converted to RGBA (alpha is black for jpegs).
NewVAO creates the structure necessary for efficiently rendering shapes in OpenGL.

# Constants

AlignAbove puts the top side at the y coordinate.
AlignBelow puts the bottom side on the y coordinate.
AlignCenter puts the left and right sides equidistant from the center.
AlignLeft puts the left side on the x coordinate.
AlignMiddle puts the top and bottom sides equidistant from the middle.
AlignRight puts the right side at the x coordinate.
ErrCompileShader indicates that a shader failed to compile.
ErrCoordOutOfRange indicates that given coordinates are out of range.
ErrCreateShader indicates that a shader couldn't be created.
ErrEmptyData indiciates that the given data is empty.
ErrFrameBuffer indicates that a program failed to link.
ErrInvalidName indicates that a given name was invalid.
ErrInvalidNumberArgs indicates an invalid number of arguments were given.
ErrOutOfBounds indicates that the input was out of bounds.
ErrProgramLink indicates that a program failed to link.
SampleCubeFragment passes input color through.
SampleCubeVertex takes in position and color for each vertex.

# Variables

ErrNoFontGlyph indicates the given font does not contain the given glyph.

# Structs

Align holds vertical and horizontal alignments.
BufferObject wraps an OpenGL buffer.
CubeMap wraps an OpenGL texture.
FontInfo represents a loaded font.
FrameBuffer wraps an OpenGL framebuffer.
Point defines a 2D point.
Point defines a 3D point.
Program wraps an OpenGL program.
Rect defines a 2D rectangle.
Shader wraps OpenGL shaders.
Texture wraps an OpenGL texture.
Texture3D wraps an OpenGL texture.
VAO represents a Vertex Array Object.

# Type aliases

AlignH is used for the positioning of elements horizontally.
AlignV is used for the positioning of elements vertically.