Graphics API documentation

Version: beta

FUNCTION
dmGraphics::GetNativeiOSUIWindow() get iOS UIWindow
dmGraphics::GetNativeiOSUIView() get iOS UIView
dmGraphics::GetNativeiOSEAGLContext() get iOS EAGLContext
dmGraphics::GetNativeOSXNSWindow() get OSX NSWindow
dmGraphics::GetNativeOSXNSView() get OSX NSView
dmGraphics::GetNativeOSXNSOpenGLContext() get OSX NSOpenGLContext
dmGraphics::GetNativeWindowsHWND() get Win32 HWND
dmGraphics::GetNativeWindowsHGLRC() get Win32 HGLRC
dmGraphics::GetNativeAndroidEGLContext() get Android EGLContext
dmGraphics::GetNativeAndroidEGLSurface() get Android EGLSurface
dmGraphics::GetNativeAndroidJavaVM() get Android native JavaVM
dmGraphics::GetNativeAndroidActivity() get Android native jobject
dmGraphics::GetNativeAndroidApp() get Android app object
dmGraphics::GetNativeX11Window() get Linux X11Window
dmGraphics::GetNativeX11GLXContext() get Linux X11GLXContext
NewVertexDeclaration() Create new vertex declaration
NewVertexDeclaration() Create new vertex declaration
DeleteVertexDeclaration() Delete vertex declaration
NewVertexBuffer() Create new vertex buffer with initial data
DeleteVertexBuffer() Delete vertex buffer
SetVertexBufferData() Set vertex buffer data
SetVertexBufferSubData() Set subset of vertex buffer data
GetMaxElementsVertices() Get the max number of vertices allowed by the syst...
NewIndexBuffer() Create new index buffer with initial data
DeleteIndexBuffer() Delete the index buffer
SetIndexBufferData() Set index buffer data
SetIndexBufferSubData() Set subset of index buffer data
IsIndexBufferFormatSupported() Check if the index format is supported
GetMaxElementsIndices() Get the max number of indices allowed by the syste...
ENUMS
CompareFunc
StencilOp
BufferUsage
BufferAccess
IndexBufferFormat
PrimitiveType Primitive type
Type Data type
Type Blend factor

Functions

dmGraphics::GetNativeiOSUIWindow()

dmGraphics::GetNativeiOSUIWindow()

Get iOS UIWindow native handle (id). Any other platform return zero.

PARAMETERS

RETURNS

id native handle

dmGraphics::GetNativeiOSUIView()

dmGraphics::GetNativeiOSUIView()

Get iOS UIView native handle (id). Any other platform return zero.

PARAMETERS

RETURNS

id native handle

dmGraphics::GetNativeiOSEAGLContext()

dmGraphics::GetNativeiOSEAGLContext()

Get iOS EAGLContext native handle (id). Any other platform return zero.

PARAMETERS

RETURNS

id native handle

dmGraphics::GetNativeOSXNSWindow()

dmGraphics::GetNativeOSXNSWindow()

Get OSX NSWindow native handle (id). Any other platform return zero.

PARAMETERS

RETURNS

id native handle

dmGraphics::GetNativeOSXNSView()

dmGraphics::GetNativeOSXNSView()

Get OSX NSView native handle (id). Any other platform return zero.

PARAMETERS

RETURNS

id native handle

dmGraphics::GetNativeOSXNSOpenGLContext()

dmGraphics::GetNativeOSXNSOpenGLContext()

Get OSX NSOpenGLContext native handle (id). Any other platform return zero.

PARAMETERS

RETURNS

id native handle

dmGraphics::GetNativeWindowsHWND()

dmGraphics::GetNativeWindowsHWND()

Get Win32 windows native handle (HWND). Any other platform return zero.

PARAMETERS

RETURNS

HWND native handle

dmGraphics::GetNativeWindowsHGLRC()

dmGraphics::GetNativeWindowsHGLRC()

Get Win32 gl rendercontext native handle (HGLRC). Any other platform return zero.

PARAMETERS

RETURNS

HGLRC native handle

dmGraphics::GetNativeAndroidEGLContext()

dmGraphics::GetNativeAndroidEGLContext()

Get Android EGLContext native handle (EGLContext). Any other platform return zero.

PARAMETERS

RETURNS

EGLContext native handle

dmGraphics::GetNativeAndroidEGLSurface()

dmGraphics::GetNativeAndroidEGLSurface()

Get Android EGLSurface native handle (EGLSurface). Any other platform return zero.

PARAMETERS

RETURNS

EGLSurface native handle

dmGraphics::GetNativeAndroidJavaVM()

dmGraphics::GetNativeAndroidJavaVM()

Get Android JavaVM ptr. Any other platform return zero.

PARAMETERS

RETURNS

JavaVM* native handle

dmGraphics::GetNativeAndroidActivity()

dmGraphics::GetNativeAndroidActivity()

Get Android native jobject. Any other platform return zero.

PARAMETERS

RETURNS

jobject native handle

dmGraphics::GetNativeAndroidApp()

dmGraphics::GetNativeAndroidApp()

Get Android app object. Any other platform return zero.

PARAMETERS

RETURNS

app native handle

dmGraphics::GetNativeX11Window()

dmGraphics::GetNativeX11Window()

Get Linux X11Window windows native handle (Window). Any other platform return zero.

PARAMETERS

RETURNS

Window native handle

dmGraphics::GetNativeX11GLXContext()

dmGraphics::GetNativeX11GLXContext()

Get Linux X11GLXContext native handle (GLXContext). Any other platform return zero.

PARAMETERS

RETURNS

GLXContext native handle

NewVertexDeclaration()

NewVertexDeclaration(context,element,count)

Create new vertex declaration

PARAMETERS

context the context
element the array of vertex elements
count the number of items in the element array

RETURNS

declaration the vertex declaration

NewVertexDeclaration()

NewVertexDeclaration(context,element,count,stride)

Create new vertex declaration

PARAMETERS

context the context
element the array of vertex elements
count the number of items in the element array
stride the stride between the start of each vertex (in bytes)

RETURNS

declaration the vertex declaration

DeleteVertexDeclaration()

DeleteVertexDeclaration(vertex_declaration)

Delete vertex declaration

PARAMETERS

vertex_declaration the vertex declaration

NewVertexBuffer()

NewVertexBuffer(context,size,data,buffer_usage)

Create new vertex buffer with initial data

PARAMETERS

context the context
size the size of the buffer (in bytes). May be 0
data the data
buffer_usage the usage

RETURNS

buffer the vertex buffer

DeleteVertexBuffer()

DeleteVertexBuffer(buffer)

Delete vertex buffer

PARAMETERS

buffer the buffer

SetVertexBufferData()

SetVertexBufferData(buffer,size,data,buffer_usage)

Set vertex buffer data

PARAMETERS

buffer the buffer
size the size of the buffer (in bytes). May be 0
data the data
buffer_usage the usage

SetVertexBufferSubData()

SetVertexBufferSubData(buffer,offset,size,data)

Set subset of vertex buffer data

PARAMETERS

buffer the buffer
offset the offset into the desination buffer (in bytes)
size the size of the buffer (in bytes). May be 0
data the data

GetMaxElementsVertices()

GetMaxElementsVertices(context)

Get the max number of vertices allowed by the system in a vertex buffer

PARAMETERS

context the context

RETURNS

count the count

NewIndexBuffer()

NewIndexBuffer(context,size,data,buffer_usage)

Create new index buffer with initial data

PARAMETERS

context the context
size the size of the buffer (in bytes). May be 0
data the data
buffer_usage the usage

RETURNS

buffer the index buffer

DeleteIndexBuffer()

DeleteIndexBuffer(buffer)

Delete the index buffer

PARAMETERS

buffer the index buffer

SetIndexBufferData()

SetIndexBufferData(buffer,size,data,buffer_usage)

Set index buffer data

PARAMETERS

buffer the buffer
size the size of the buffer (in bytes). May be 0
data the data
buffer_usage the usage

SetIndexBufferSubData()

SetIndexBufferSubData(buffer,offset,size,data)

Set subset of index buffer data

PARAMETERS

buffer the buffer
offset the offset into the desination buffer (in bytes)
size the size of the buffer (in bytes). May be 0
data the data

IsIndexBufferFormatSupported()

IsIndexBufferFormatSupported(context,format,result)

Check if the index format is supported

PARAMETERS

context the context
format the format
result true if the format is supoprted

GetMaxElementsIndices()

GetMaxElementsIndices(context)

Get the max number of indices allowed by the system in an index buffer

PARAMETERS

context the context

RETURNS

count the count

Enums

CompareFunc

COMPARE_FUNC_NEVER
COMPARE_FUNC_LESS
COMPARE_FUNC_LEQUAL
COMPARE_FUNC_GREATER
COMPARE_FUNC_GEQUAL
COMPARE_FUNC_EQUAL
COMPARE_FUNC_NOTEQUAL
COMPARE_FUNC_ALWAYS

StencilOp

STENCIL_OP_KEEP
STENCIL_OP_ZERO
STENCIL_OP_REPLACE
STENCIL_OP_INCR
STENCIL_OP_INCR_WRAP
STENCIL_OP_DECR
STENCIL_OP_DECR_WRAP
STENCIL_OP_INVERT

BufferUsage

BUFFER_USAGE_STREAM_DRAW
BUFFER_USAGE_DYNAMIC_DRAW
BUFFER_USAGE_STATIC_DRAW
Preferred for buffers that never change

BufferAccess

BUFFER_ACCESS_READ_ONLY
BUFFER_ACCESS_WRITE_ONLY
BUFFER_ACCESS_READ_WRITE

IndexBufferFormat

INDEXBUFFER_FORMAT_16
INDEXBUFFER_FORMAT_32

PrimitiveType

Primitive type

Primitive type

PRIMITIVE_LINES
PRIMITIVE_TRIANGLES
PRIMITIVE_TRIANGLE_STRIP

Type

Data type

Data type

TYPE_BYTE
TYPE_UNSIGNED_BYTE
TYPE_SHORT
TYPE_UNSIGNED_SHORT
TYPE_INT
TYPE_UNSIGNED_INT
TYPE_FLOAT
TYPE_FLOAT_VEC4
TYPE_FLOAT_MAT4
TYPE_SAMPLER_2D
TYPE_SAMPLER_CUBE

Type

Blend factor

Blend factor

BLEND_FACTOR_ZERO
BLEND_FACTOR_ONE
BLEND_FACTOR_SRC_COLOR
BLEND_FACTOR_ONE_MINUS_SRC_COLOR
BLEND_FACTOR_DST_COLOR
BLEND_FACTOR_ONE_MINUS_DST_COLOR
BLEND_FACTOR_SRC_ALPHA
BLEND_FACTOR_ONE_MINUS_SRC_ALPHA
BLEND_FACTOR_DST_ALPHA
BLEND_FACTOR_ONE_MINUS_DST_ALPHA
BLEND_FACTOR_SRC_ALPHA_SATURATE
BLEND_FACTOR_CONSTANT_COLOR
BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR
BLEND_FACTOR_CONSTANT_ALPHA
BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA