diff options
author | Kenneth Russel <[email protected]> | 2006-01-20 01:31:16 +0000 |
---|---|---|
committer | Kenneth Russel <[email protected]> | 2006-01-20 01:31:16 +0000 |
commit | 6a697463c73042b7cfd1af2a5729e79bc43a0406 (patch) | |
tree | 92929c4325391f3ab568ee89d9656366a4eac3c8 /src | |
parent | fc4de93ffb4b20cae0c51484f59a40e7c16430bb (diff) |
Fixed bug in WindowsGLDrawable.iattributes2GLCapabilities pointed out
by user hifujava on javagaming.org forums
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@552 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src')
-rw-r--r-- | src/classes/com/sun/opengl/impl/windows/WindowsGLDrawable.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/classes/com/sun/opengl/impl/windows/WindowsGLDrawable.java b/src/classes/com/sun/opengl/impl/windows/WindowsGLDrawable.java index 0f3112824..f4dc725b4 100644 --- a/src/classes/com/sun/opengl/impl/windows/WindowsGLDrawable.java +++ b/src/classes/com/sun/opengl/impl/windows/WindowsGLDrawable.java @@ -195,7 +195,7 @@ public abstract class WindowsGLDrawable extends GLDrawableImpl { if (!dummyWGLExt.wglGetPixelFormatAttribivARB(hdc, i+1, 0, niattribs, iattributes, 0, iresults, 0)) { throw new GLException("Error getting pixel format attributes for pixel format " + (i + 1) + " of device context"); } - availableCaps[i] = iattributes2GLCapabilities(iattributes, iresults, true); + availableCaps[i] = iattributes2GLCapabilities(iattributes, niattribs, iresults, true); } gotAvailableCaps = true; } else { @@ -497,12 +497,12 @@ public abstract class WindowsGLDrawable extends GLDrawableImpl { } protected static GLCapabilities iattributes2GLCapabilities(int[] iattribs, + int niattribs, int[] iresults, boolean requireRenderToWindow) { GLCapabilities res = new GLCapabilities(); - int attr = 0; - int i = 0; - while ((attr = iattribs[i]) != 0) { + for (int i = 0; i < niattribs; i++) { + int attr = iattribs[i]; switch (attr) { case WGLExt.WGL_DRAW_TO_WINDOW_ARB: if (iresults[i] != GL.GL_TRUE) |