mirror of
https://github.com/shadowfacts/lwjgl2-arm64.git
synced 2026-04-06 23:14:19 +00:00
Undo GLContext.cpp split
This commit is contained in:
parent
19b7f16291
commit
f661aaa22b
7 changed files with 87 additions and 184 deletions
|
|
@ -70,12 +70,23 @@ static void destroyPbuffer(PbufferInfo *buffer_info) {
|
|||
glXDestroyPbuffer(getDisplay(), buffer);
|
||||
glXDestroyContext(getDisplay(), context);
|
||||
free(buffer_info);
|
||||
decDisplay();
|
||||
}
|
||||
|
||||
JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_Pbuffer_nCreate(JNIEnv *env, jclass clazz, jint width, jint height, jobject pixel_format,
|
||||
jobject pixelFormatCaps, jobject pBufferAttribs)
|
||||
{
|
||||
Display *disp = getDisplay();
|
||||
Display *disp = incDisplay(env);
|
||||
if (disp == NULL) {
|
||||
return -1;
|
||||
}
|
||||
int current_screen = XDefaultScreen(disp);
|
||||
if (!extgl_InitGLX(env, disp, current_screen)) {
|
||||
decDisplay();
|
||||
throwException(env, "Could not init GLX");
|
||||
return -1;
|
||||
}
|
||||
|
||||
GLXFBConfig *configs = chooseVisualGLX13(env, pixel_format, false, GLX_PBUFFER_BIT, false);
|
||||
if (configs == 0) {
|
||||
XFree(configs);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue