aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xmake/gl-desktop.cfg6
-rw-r--r--make/stub_includes/x11/window-lib.c4
-rw-r--r--src/classes/com/sun/opengl/impl/x11/glx/X11PbufferGLXDrawable.java3
3 files changed, 10 insertions, 3 deletions
diff --git a/make/gl-desktop.cfg b/make/gl-desktop.cfg
index 30213c2f6..d6a610c59 100755
--- a/make/gl-desktop.cfg
+++ b/make/gl-desktop.cfg
@@ -57,11 +57,11 @@ ReturnsString glXQueryServerString
ReturnsString glXGetClientString
TemporaryCVariableDeclaration glXChooseFBConfig int count;
TemporaryCVariableAssignment glXChooseFBConfig count = _ptr3[0];
-ReturnValueLength glXChooseFBConfig count
+ReturnValueCapacity glXChooseFBConfig count * sizeof(GLXFBConfig)
TemporaryCVariableDeclaration glXChooseFBConfigSGIX int count;
TemporaryCVariableAssignment glXChooseFBConfigSGIX count = _ptr3[0];
-ReturnValueLength glXChooseFBConfigSGIX count
+ReturnValueCapacity glXChooseFBConfigSGIX count * sizeof(GLXFBConfig)
TemporaryCVariableDeclaration glXGetFBConfigs int count;
TemporaryCVariableAssignment glXGetFBConfigs count = _ptr2[0];
-ReturnValueLength glXGetFBConfigs count
+ReturnValueCapacity glXGetFBConfigs count * sizeof(GLXFBConfig)
diff --git a/make/stub_includes/x11/window-lib.c b/make/stub_includes/x11/window-lib.c
index 36092e85f..17ddcb1c7 100644
--- a/make/stub_includes/x11/window-lib.c
+++ b/make/stub_includes/x11/window-lib.c
@@ -31,6 +31,10 @@ extern int XFreePixmap(
Pixmap /* pixmap */
);
+extern int XFree(
+ void* /* data */
+);
+
// Helper routine for querying whether Xinerama is enabled.
Bool XineramaEnabled(Display* display);
diff --git a/src/classes/com/sun/opengl/impl/x11/glx/X11PbufferGLXDrawable.java b/src/classes/com/sun/opengl/impl/x11/glx/X11PbufferGLXDrawable.java
index aa84b034a..db3dbc47f 100644
--- a/src/classes/com/sun/opengl/impl/x11/glx/X11PbufferGLXDrawable.java
+++ b/src/classes/com/sun/opengl/impl/x11/glx/X11PbufferGLXDrawable.java
@@ -119,6 +119,9 @@ public class X11PbufferGLXDrawable extends X11GLXDrawable {
true, display, screen);
int[] nelementsTmp = new int[1];
+ // FIXME: we inherently leak the memory from the underlying call
+ // to glXChooseFBConfig because a copy of the original Buffer is
+ // made to expand each pointer from 32 to 64 bits
LongBuffer fbConfigs = GLX.glXChooseFBConfig(display, screen, iattributes, 0, nelementsTmp, 0);
if (fbConfigs == null || fbConfigs.limit() == 0 || fbConfigs.get(0) == 0) {
throw new GLException("pbuffer creation error: glXChooseFBConfig() failed");