Module dcanvas.graphics.glsupport

OpenGL access layer.

To enable OpenGL support, build with version(USE_OPENGL);

Synopsis

import dcanvas.graphics.glsupport;

Functions

NameDescription
assertNoError(context, functionName, line)
checkError(context, functionName, line)
convertColorsImpl(cols)
glerrorToString(err)
glSupport()
initGLSupport(legacy) initialize OpenGL support helper (call when current OpenGL context is initialized)
primitiveTypeToGL(type)

Classes

NameDescription
DummyVertexBuffer
GLObject RAII OpenGL object template.
GLProgram
GLSupport OpenGL support helper
GLVertexBuffer
GraphicsEffect Base class for graphics effect / program - e.g. for OpenGL shader program
Mesh Mesh
MeshPart Mesh part - set of vertex indexes with graphics primitive type
SolidFillProgram
TextureProgram
VertexBuffer Vertex buffer object base class

Structs

NameDescription
Color
IndexFragment
VertexElement vertex attribute properties
VertexFormat Vertex format elements list

Enums

NameDescription
DefaultAttribute
DefaultUniform
GLObjectTypes
PrimitiveType Graphics primitive type
VertexElementType vertex element type

Templates

NameDescription
assertgl Convenient wrapper around glGetError()

Manifest constants

NameTypeDescription
SUPPORT_LEGACY_OPENGL
VERTEX_ELEMENT_NOT_FOUND location for element is not found

Global variables

NameTypeDescription
glNoContext bool

Aliases

NameTypeDescription
checkgl func Convenient wrapper around glGetError()
convertColors memoize!convertColorsImpl
EBO GLObject!(0,34963)
FBO GLObject!(3,36160)
MeshRef Ref!(dcanvas.graphics.glsupport.Mesh) Reference counted Mesh object
Tex2D GLObject!(2,3553)
VAO GLObject!(1,0)
VBO GLObject!(0,34962)