int TwInit(TwGraphAPI graphAPI, void *device) |
---|
This function initializes the AntTweakBar library. It must be called once at the beginning of the program, just after graphic mode is initialized.
Notes:
This parameter specifies which graphic API is used: OpenGL, OpenGL core profile (3.2 and higher), Direct3D 9, Direct3D 10 or Direct3D 11.
It is one of the TwGraphAPI enum element. If graphAPI is Direct3D, the D3D device pointer must be supplied.
Pointer to the Direct3D device, or NULL
for OpenGL.
If graphAPI is OpenGL, this parameter must be NULL
, otherwise it is the IDirect3DDevice9
, ID3D10Device
or ID3D11Device
pointer returned by the appropriate D3D CreateDevice
function when D3D has been initialized.