Context can be used for a menu rather than the current window
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1179 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
parent
3ce776e21e
commit
af95cbdafe
@ -53,7 +53,7 @@ void fgPlatformOpenWindow( SFG_Window* window, const char* title,
|
|||||||
}
|
}
|
||||||
|
|
||||||
fghChooseConfigEGL(&window->Window.pContext.egl.Config);
|
fghChooseConfigEGL(&window->Window.pContext.egl.Config);
|
||||||
fghCreateNewContextEGL(window);
|
window->Window.Context = fghCreateNewContextEGL(window);
|
||||||
|
|
||||||
/* Wait until window is available and OpenGL context is created */
|
/* Wait until window is available and OpenGL context is created */
|
||||||
/* Normally events are processed through glutMainLoop(), but the
|
/* Normally events are processed through glutMainLoop(), but the
|
||||||
|
@ -60,7 +60,7 @@ int fghChooseConfigEGL(EGLConfig* config) {
|
|||||||
/**
|
/**
|
||||||
* Initialize an EGL context for the current display.
|
* Initialize an EGL context for the current display.
|
||||||
*/
|
*/
|
||||||
void fghCreateNewContextEGL( SFG_Window* window ) {
|
EGLContext fghCreateNewContextEGL( SFG_Window* window ) {
|
||||||
EGLContext context;
|
EGLContext context;
|
||||||
|
|
||||||
EGLDisplay eglDisplay = fgDisplay.pDisplay.egl.Display;
|
EGLDisplay eglDisplay = fgDisplay.pDisplay.egl.Display;
|
||||||
@ -85,7 +85,7 @@ void fghCreateNewContextEGL( SFG_Window* window ) {
|
|||||||
if (ver != 2)
|
if (ver != 2)
|
||||||
fgError("Wrong GLES major version: %d\n", ver);
|
fgError("Wrong GLES major version: %d\n", ver);
|
||||||
|
|
||||||
window->Window.Context = context;
|
return context;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
extern int fghChooseConfigEGL(EGLConfig* config);
|
extern int fghChooseConfigEGL(EGLConfig* config);
|
||||||
extern void fghPlatformOpenWindowEGL( SFG_Window* window );
|
extern void fghPlatformOpenWindowEGL( SFG_Window* window );
|
||||||
extern void fghCreateNewContextEGL( SFG_Window* window );
|
extern EGLConfig fghCreateNewContextEGL( SFG_Window* window );
|
||||||
extern void fghPlatformCloseWindowEGL( SFG_Window* window );
|
extern void fghPlatformCloseWindowEGL( SFG_Window* window );
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user