nngxInitialize Function
NNGX_APICALL GLboolean NNGX_APIENTRY nngxInitialize(
GLvoid *(*)(GLenum, GLenum, GLuint, GLsizei) allocator,
void(*)(GLenum, GLenum, GLuint, GLvoid *) deallocator
);
| Name | Description | |
|---|---|---|
| in | allocator | Pointer to an allocator function |
| in | deallocator | Pointer to a deallocator function |
GL_TRUE if initialization succeeded and GL_FALSE if it failed. Initializes the graphics library (DMPGL).
Set allocator to the function that DMPGL will use to allocate memory regions. The allocator's first argument specifies the memory region and takes a value of NN_GX_MEM_FCRAM, NN_GX_MEM_VRAMA, or NN_GX_MEM_VRAMB. The allocator's second argument specifies how memory will be used and takes a value of NN_GX_MEM_SYSTEM, NN_GX_MEM_TEXTURE, NN_GX_MEM_VERTEXBUFFER, or NN_GX_MEM_RENDERBUFFER. The allocator's third argument is the object name. The allocator's fourth argument is the number of bytes of memory to allocate. Implement the allocator so that it returns 0 when it fails and the memory address of the allocated region when it succeeds.
Set deallocator to the function that DMPGL uses to free memory regions. The deallocator's first, second, and third arguments are the same as the allocator's. The deallocator's fourth argument is the memory address to free.
Once this function has successfully initialized the library, it returns GL_FALSE if it is called again before nngxFinalize.
CONFIDENTIAL