Graphics API documentation

Version: stable

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
FaceWinding
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 id native handle

dmGraphics::GetNativeiOSUIView()

dmGraphics::GetNativeiOSUIView()

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

PARAMETERS

RETURNS

id id native handle

dmGraphics::GetNativeiOSEAGLContext()

dmGraphics::GetNativeiOSEAGLContext()

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

PARAMETERS

RETURNS

id id native handle

dmGraphics::GetNativeOSXNSWindow()

dmGraphics::GetNativeOSXNSWindow()

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

PARAMETERS

RETURNS

id id native handle

dmGraphics::GetNativeOSXNSView()

dmGraphics::GetNativeOSXNSView()

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

PARAMETERS

RETURNS

id id native handle

dmGraphics::GetNativeOSXNSOpenGLContext()

dmGraphics::GetNativeOSXNSOpenGLContext()

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

PARAMETERS

RETURNS

id id native handle

dmGraphics::GetNativeWindowsHWND()

dmGraphics::GetNativeWindowsHWND()

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

PARAMETERS

RETURNS

HWND HWND native handle

dmGraphics::GetNativeWindowsHGLRC()

dmGraphics::GetNativeWindowsHGLRC()

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

PARAMETERS

RETURNS

HGLRC HGLRC native handle

dmGraphics::GetNativeAndroidEGLContext()

dmGraphics::GetNativeAndroidEGLContext()

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

PARAMETERS

RETURNS

EGLContext EGLContext native handle

dmGraphics::GetNativeAndroidEGLSurface()

dmGraphics::GetNativeAndroidEGLSurface()

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

PARAMETERS

RETURNS

EGLSurface EGLSurface native handle

dmGraphics::GetNativeAndroidJavaVM()

dmGraphics::GetNativeAndroidJavaVM()

Get Android JavaVM ptr. Any other platform return zero.

PARAMETERS

RETURNS

JavaVM* JavaVM* native handle

dmGraphics::GetNativeAndroidActivity()

dmGraphics::GetNativeAndroidActivity()

Get Android native jobject. Any other platform return zero.

PARAMETERS

RETURNS

jobject jobject native handle

dmGraphics::GetNativeAndroidApp()

dmGraphics::GetNativeAndroidApp()

Get Android app object. Any other platform return zero.

PARAMETERS

RETURNS

app struct android_app* native handle

dmGraphics::GetNativeX11Window()

dmGraphics::GetNativeX11Window()

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

PARAMETERS

RETURNS

Window Window native handle

dmGraphics::GetNativeX11GLXContext()

dmGraphics::GetNativeX11GLXContext()

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

PARAMETERS

RETURNS

GLXContext GLXContext native handle

NewVertexDeclaration()

NewVertexDeclaration(context,element,count)

Create new vertex declaration

PARAMETERS

context dmGraphics::HContext the context
element dmGraphics::VertexElement* the array of vertex elements
count uint32_t the number of items in the element array

RETURNS

declaration dmGraphics::HVertexDeclaration the vertex declaration

NewVertexDeclaration()

NewVertexDeclaration(context,element,count,stride)

Create new vertex declaration

PARAMETERS

context dmGraphics::HContext the context
element dmGraphics::VertexElement* the array of vertex elements
count uint32_t the number of items in the element array
stride uint32_t the stride between the start of each vertex (in bytes)

RETURNS

declaration dmGraphics::HVertexDeclaration the vertex declaration

DeleteVertexDeclaration()

DeleteVertexDeclaration(vertex_declaration)

Delete vertex declaration

PARAMETERS

vertex_declaration dmGraphics::HVertexDeclaration the vertex declaration

NewVertexBuffer()

NewVertexBuffer(context,size,data,buffer_usage)

Create new vertex buffer with initial data

PARAMETERS

context dmGraphics::HContext the context
size uint32_t the size of the buffer (in bytes). May be 0
data void* the data
buffer_usage dmGraphics::BufferUsage the usage

RETURNS

buffer dmGraphics::HVertexBuffer the vertex buffer

DeleteVertexBuffer()

DeleteVertexBuffer(buffer)

Delete vertex buffer

PARAMETERS

buffer dmGraphics::HVertexBuffer the buffer

SetVertexBufferData()

SetVertexBufferData(buffer,size,data,buffer_usage)

Set vertex buffer data

PARAMETERS

buffer dmGraphics::HVertexBuffer the buffer
size uint32_t the size of the buffer (in bytes). May be 0
data void* the data
buffer_usage dmGraphics::BufferUsage the usage

SetVertexBufferSubData()

SetVertexBufferSubData(buffer,offset,size,data)

Set subset of vertex buffer data

PARAMETERS

buffer dmGraphics::HVertexBuffer the buffer
offset uint32_t the offset into the desination buffer (in bytes)
size uint32_t the size of the buffer (in bytes). May be 0
data void* the data

GetMaxElementsVertices()

GetMaxElementsVertices(context)

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

PARAMETERS

context dmGraphics::HContext the context

RETURNS

count uint32_t the count

NewIndexBuffer()

NewIndexBuffer(context,size,data,buffer_usage)

Create new index buffer with initial data

PARAMETERS

context dmGraphics::HContext the context
size uint32_t the size of the buffer (in bytes). May be 0
data void* the data
buffer_usage dmGraphics::BufferUsage the usage

RETURNS

buffer dmGraphics::HIndexBuffer the index buffer

DeleteIndexBuffer()

DeleteIndexBuffer(buffer)

Delete the index buffer

PARAMETERS

buffer dmGraphics::HIndexBuffer the index buffer

SetIndexBufferData()

SetIndexBufferData(buffer,size,data,buffer_usage)

Set index buffer data

PARAMETERS

buffer dmGraphics::HIndexBuffer the buffer
size uint32_t the size of the buffer (in bytes). May be 0
data void* the data
buffer_usage dmGraphics::BufferUsage the usage

SetIndexBufferSubData()

SetIndexBufferSubData(buffer,offset,size,data)

Set subset of index buffer data

PARAMETERS

buffer dmGraphics::HVertexBuffer the buffer
offset uint32_t the offset into the desination buffer (in bytes)
size uint32_t the size of the buffer (in bytes). May be 0
data void* the data

IsIndexBufferFormatSupported()

IsIndexBufferFormatSupported(context,format,result)

Check if the index format is supported

PARAMETERS

context dmGraphics::HContext the context
format dmGraphics::IndexBufferFormat the format
result bool 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 dmGraphics::HContext the context

RETURNS

count uint32_t the count