add the thing
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@92 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
parent
f90fd4c58d
commit
f8293f235c
2 changed files with 20 additions and 0 deletions
|
|
@ -24,6 +24,14 @@ MWDECL MwClass MwOpenGLClass;
|
||||||
*/
|
*/
|
||||||
MWDECL void MwOpenGLMakeCurrent(MwWidget handle);
|
MWDECL void MwOpenGLMakeCurrent(MwWidget handle);
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* %brief Get a procedure from OpenGL
|
||||||
|
* %param handle Widget
|
||||||
|
* %param name Name
|
||||||
|
* %return Procedure
|
||||||
|
*/
|
||||||
|
MWDECL void* MwOpenGLGetProcAddress(MwWidget handle, const char* name);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* %brief Swaps the buffer of OpenGL context
|
* %brief Swaps the buffer of OpenGL context
|
||||||
* %param handle Widget
|
* %param handle Widget
|
||||||
|
|
|
||||||
12
src/opengl.c
12
src/opengl.c
|
|
@ -99,3 +99,15 @@ void MwOpenGLSwapBuffer(MwWidget handle) {
|
||||||
glXSwapBuffers(handle->lowlevel->display, handle->lowlevel->window);
|
glXSwapBuffers(handle->lowlevel->display, handle->lowlevel->window);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void* MwOpenGLGetProcAddress(MwWidget handle, const char* name) {
|
||||||
|
#ifdef _WIN32
|
||||||
|
(void)handle;
|
||||||
|
|
||||||
|
return wglGetProcAddress(name);
|
||||||
|
#else
|
||||||
|
(void)handle;
|
||||||
|
|
||||||
|
return glXGetProcAddress((const GLubyte*)name);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue