mirror of
https://gitea.nishi.boats/pyrite-dev/milsko
synced 2026-01-04 00:20:51 +00:00
add the thing
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@92 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
@@ -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
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user