From 875a3de8f54704604d006badf0f0747347319025 Mon Sep 17 00:00:00 2001 From: Kenneth Russel Date: Sun, 1 Jan 2006 22:51:07 +0000 Subject: Fixed more problems related to recent restructuring of glue code generation to support simultaneous 32- and 64-bit ports. Now uses size() (on Java side) and sizeof (on C side) when creating direct Buffers for struct accessors rather than passing MachineDescription down to JavaMethodBindingEmitter and CMethodBindingEmitter. Now uses 64-bit MachineDescription when sizing outgoing arguments and return types for bound methods. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@506 232f8b59-042b-4e1e-8c03-345bb8c30851 --- src/classes/com/sun/opengl/impl/windows/WindowsGLDrawable.java | 4 ++-- src/classes/com/sun/opengl/impl/windows/WindowsGLDrawableFactory.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/classes/com/sun/opengl') diff --git a/src/classes/com/sun/opengl/impl/windows/WindowsGLDrawable.java b/src/classes/com/sun/opengl/impl/windows/WindowsGLDrawable.java index e7b65a052..0f3112824 100644 --- a/src/classes/com/sun/opengl/impl/windows/WindowsGLDrawable.java +++ b/src/classes/com/sun/opengl/impl/windows/WindowsGLDrawable.java @@ -199,7 +199,7 @@ public abstract class WindowsGLDrawable extends GLDrawableImpl { } gotAvailableCaps = true; } else { - int lastErr = WGL.GetLastError(); + long lastErr = WGL.GetLastError(); // Intel Extreme graphics fails with a zero error code if (lastErr != 0) { throw new GLException("Unable to enumerate pixel formats of window using wglGetPixelFormatAttribivARB: error code " + WGL.GetLastError()); @@ -262,7 +262,7 @@ public abstract class WindowsGLDrawable extends GLDrawableImpl { pixelFormat = WGL.ChoosePixelFormat(hdc, pfd); } if (!WGL.SetPixelFormat(hdc, pixelFormat, pfd)) { - int lastError = WGL.GetLastError(); + long lastError = WGL.GetLastError(); if (DEBUG) { System.err.println(getThreadName() + ": SetPixelFormat failed: current context = " + WGL.wglGetCurrentContext() + ", current DC = " + WGL.wglGetCurrentDC()); diff --git a/src/classes/com/sun/opengl/impl/windows/WindowsGLDrawableFactory.java b/src/classes/com/sun/opengl/impl/windows/WindowsGLDrawableFactory.java index 3ea63934d..b534a11fc 100644 --- a/src/classes/com/sun/opengl/impl/windows/WindowsGLDrawableFactory.java +++ b/src/classes/com/sun/opengl/impl/windows/WindowsGLDrawableFactory.java @@ -192,9 +192,9 @@ public class WindowsGLDrawableFactory extends GLDrawableFactoryImpl { } static String wglGetLastError() { - int err = WGL.GetLastError(); + long err = WGL.GetLastError(); String detail = null; - switch (err) { + switch ((int) err) { case WGL.ERROR_INVALID_PIXEL_FORMAT: detail = "ERROR_INVALID_PIXEL_FORMAT"; break; case WGL.ERROR_NO_SYSTEM_RESOURCES: detail = "ERROR_NO_SYSTEM_RESOURCES"; break; case WGL.ERROR_INVALID_DATA: detail = "ERROR_INVALID_DATA"; break; -- cgit v1.2.3