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
NewVertexStreamDeclaration() Create new vertex stream declaration. A stream dec...
AddVertexStream() Adds a stream to a stream declaration
DeleteVertexStreamDeclaration() Delete vertex stream declaration
NewVertexDeclaration() Create new vertex declaration from a vertex stream...
NewVertexDeclaration() Create new vertex declaration from a vertex stream...
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...
IsExtensionSupported() check if an extension is supported
IsTextureFormatSupported() check if a specific texture format is supported
GetNumSupportedExtensions()
GetSupportedExtension() get the supported extension
ENUMS
HandleResult
RenderTargetAttachment
TextureFormat
CompareFunc
FaceWinding
StencilOp
BufferUsage
BufferAccess
IndexBufferFormat
PrimitiveType Primitive type
Type Data type
BlendFactor Blend factor

Functions

dmGraphics::GetNativeiOSUIWindow()

dmGraphics::GetNativeiOSUIWindow()

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

PARAMETERS

None

RETURNS

id id native handle

dmGraphics::GetNativeiOSUIView()

dmGraphics::GetNativeiOSUIView()

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

PARAMETERS

None

RETURNS

id id native handle

dmGraphics::GetNativeiOSEAGLContext()

dmGraphics::GetNativeiOSEAGLContext()

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

PARAMETERS

None

RETURNS

id id native handle

dmGraphics::GetNativeOSXNSWindow()

dmGraphics::GetNativeOSXNSWindow()

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

PARAMETERS

None

RETURNS

id id native handle

dmGraphics::GetNativeOSXNSView()

dmGraphics::GetNativeOSXNSView()

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

PARAMETERS

None

RETURNS

id id native handle

dmGraphics::GetNativeOSXNSOpenGLContext()

dmGraphics::GetNativeOSXNSOpenGLContext()

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

PARAMETERS

None

RETURNS

id id native handle

dmGraphics::GetNativeWindowsHWND()

dmGraphics::GetNativeWindowsHWND()

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

PARAMETERS

None

RETURNS

HWND HWND native handle

dmGraphics::GetNativeWindowsHGLRC()

dmGraphics::GetNativeWindowsHGLRC()

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

PARAMETERS

None

RETURNS

HGLRC HGLRC native handle

dmGraphics::GetNativeAndroidEGLContext()

dmGraphics::GetNativeAndroidEGLContext()

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

PARAMETERS

None

RETURNS

EGLContext EGLContext native handle

dmGraphics::GetNativeAndroidEGLSurface()

dmGraphics::GetNativeAndroidEGLSurface()

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

PARAMETERS

None

RETURNS

EGLSurface EGLSurface native handle

dmGraphics::GetNativeAndroidJavaVM()

dmGraphics::GetNativeAndroidJavaVM()

Get Android JavaVM ptr. Any other platform return zero.

PARAMETERS

None

RETURNS

JavaVM* JavaVM* native handle

dmGraphics::GetNativeAndroidActivity()

dmGraphics::GetNativeAndroidActivity()

Get Android native jobject. Any other platform return zero.

PARAMETERS

None

RETURNS

jobject jobject native handle

dmGraphics::GetNativeAndroidApp()

dmGraphics::GetNativeAndroidApp()

Get Android app object. Any other platform return zero.

PARAMETERS

None

RETURNS

app struct android_app* native handle

dmGraphics::GetNativeX11Window()

dmGraphics::GetNativeX11Window()

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

PARAMETERS

None

RETURNS

Window Window native handle

dmGraphics::GetNativeX11GLXContext()

dmGraphics::GetNativeX11GLXContext()

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

PARAMETERS

None

RETURNS

GLXContext GLXContext native handle

NewVertexStreamDeclaration()

NewVertexStreamDeclaration(context)

Create new vertex stream declaration. A stream declaration contains a list of vertex streams that should be used to create a vertex declaration from.

PARAMETERS

context dmGraphics::HContext the context

RETURNS

declaration dmGraphics::HVertexStreamDeclaration the vertex declaration

AddVertexStream()

AddVertexStream(context,name,size,type,normalize)

Adds a stream to a stream declaration

PARAMETERS

context dmGraphics::HContext the context
name const char* the name of the stream
size uint32_t the size of the stream, i.e number of components
type dmGraphics::Type the data type of the stream
normalize bool true if the stream should be normalized in the 0..1 range

DeleteVertexStreamDeclaration()

DeleteVertexStreamDeclaration(stream_declaration)

Delete vertex stream declaration

PARAMETERS

stream_declaration dmGraphics::HVertexStreamDeclaration the vertex stream declaration

NewVertexDeclaration()

NewVertexDeclaration(context,stream_declaration)

Create new vertex declaration from a vertex stream declaration

PARAMETERS

context dmGraphics::HContext the context
stream_declaration dmGraphics::HVertexStreamDeclaration the vertex stream declaration

RETURNS

declaration dmGraphics::HVertexDeclaration the vertex declaration

NewVertexDeclaration()

NewVertexDeclaration(context,stream_declaration,stride)

Create new vertex declaration from a vertex stream declaration and an explicit stride value, where the stride is the number of bytes between each consecutive vertex in a vertex buffer

PARAMETERS

context dmGraphics::HContext the context
stream_declaration dmGraphics::HVertexStreamDeclaration the vertex stream declaration
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

IsExtensionSupported()

IsExtensionSupported(context,extension)

check if an extension is supported

PARAMETERS

context dmGraphics::HContext the context
extension const char* the extension.

RETURNS

result bool true if the extension was supported

IsTextureFormatSupported()

IsTextureFormatSupported(context,format)

check if a specific texture format is supported

PARAMETERS

context dmGraphics::HContext the context
format TextureFormat the texture format.

RETURNS

result bool true if the texture format was supported

GetNumSupportedExtensions()

GetNumSupportedExtensions(context)

PARAMETERS

context dmGraphics::HContext the context

RETURNS

count uint32_t the number of supported extensions

GetSupportedExtension()

GetSupportedExtension(context,index)

get the supported extension

PARAMETERS

context dmGraphics::HContext the context
index uint32_t the index of the extension

RETURNS

extension const char* the extension. 0 if index was out of bounds