You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(134) |
Sep
(52) |
Oct
(13) |
Nov
(342) |
Dec
(163) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(44) |
Feb
(62) |
Mar
(158) |
Apr
(38) |
May
(70) |
Jun
(58) |
Jul
(104) |
Aug
(207) |
Sep
(83) |
Oct
(122) |
Nov
(23) |
Dec
(49) |
| 2004 |
Jan
(119) |
Feb
(132) |
Mar
(192) |
Apr
(140) |
May
(77) |
Jun
(74) |
Jul
(201) |
Aug
(63) |
Sep
(102) |
Oct
(70) |
Nov
(173) |
Dec
(78) |
| 2005 |
Jan
(174) |
Feb
(197) |
Mar
(105) |
Apr
(59) |
May
(77) |
Jun
(43) |
Jul
(21) |
Aug
(18) |
Sep
(47) |
Oct
(37) |
Nov
(74) |
Dec
(50) |
| 2006 |
Jan
(44) |
Feb
(19) |
Mar
(32) |
Apr
(24) |
May
(31) |
Jun
(55) |
Jul
(138) |
Aug
(28) |
Sep
(12) |
Oct
(41) |
Nov
(58) |
Dec
(24) |
| 2007 |
Jan
(28) |
Feb
(14) |
Mar
(10) |
Apr
(68) |
May
(30) |
Jun
(26) |
Jul
(18) |
Aug
(63) |
Sep
(19) |
Oct
(29) |
Nov
(20) |
Dec
(10) |
| 2008 |
Jan
(38) |
Feb
(7) |
Mar
(37) |
Apr
(120) |
May
(41) |
Jun
(36) |
Jul
(39) |
Aug
(24) |
Sep
(28) |
Oct
(30) |
Nov
(36) |
Dec
(75) |
| 2009 |
Jan
(46) |
Feb
(22) |
Mar
(50) |
Apr
(70) |
May
(134) |
Jun
(105) |
Jul
(75) |
Aug
(34) |
Sep
(38) |
Oct
(34) |
Nov
(19) |
Dec
(20) |
| 2010 |
Jan
(11) |
Feb
(20) |
Mar
(65) |
Apr
(83) |
May
(104) |
Jun
(73) |
Jul
(78) |
Aug
(57) |
Sep
(43) |
Oct
(35) |
Nov
(9) |
Dec
(4) |
| 2011 |
Jan
(21) |
Feb
(11) |
Mar
(18) |
Apr
(10) |
May
(18) |
Jun
(15) |
Jul
(48) |
Aug
(25) |
Sep
(17) |
Oct
(45) |
Nov
(15) |
Dec
(12) |
| 2012 |
Jan
(21) |
Feb
(9) |
Mar
(12) |
Apr
(9) |
May
(9) |
Jun
(5) |
Jul
(1) |
Aug
(10) |
Sep
(12) |
Oct
(1) |
Nov
(28) |
Dec
(5) |
| 2013 |
Jan
(4) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2014 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
| 2015 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
| 2016 |
Jan
(2) |
Feb
(1) |
Mar
(1) |
Apr
(1) |
May
(2) |
Jun
|
Jul
(1) |
Aug
(2) |
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
1
(1) |
2
(14) |
3
(4) |
4
|
5
(3) |
6
(1) |
|
7
(9) |
8
(2) |
9
(4) |
10
|
11
(16) |
12
(21) |
13
(14) |
|
14
(12) |
15
(5) |
16
(6) |
17
|
18
(4) |
19
(4) |
20
(3) |
|
21
(2) |
22
(12) |
23
|
24
|
25
(8) |
26
|
27
(25) |
|
28
|
29
(2) |
30
(1) |
|
|
|
|
|
From: Brian M. <ma...@us...> - 2004-11-20 16:46:56
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/input In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4468/src/java/org/lwjgl/input Modified Files: Cursor.java Log Message: import cleanup Index: Cursor.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/input/Cursor.java,v retrieving revision 1.31 retrieving revision 1.32 diff -u -d -r1.31 -r1.32 --- Cursor.java 11 Nov 2004 13:54:25 -0000 1.31 +++ Cursor.java 20 Nov 2004 16:46:44 -0000 1.32 @@ -31,12 +31,11 @@ */ package org.lwjgl.input; -import java.nio.ByteBuffer; import java.nio.IntBuffer; -import org.lwjgl.LWJGLException; -import org.lwjgl.BufferUtils; import org.lwjgl.BufferChecks; +import org.lwjgl.BufferUtils; +import org.lwjgl.LWJGLException; import org.lwjgl.Sys; import org.lwjgl.opengl.Display; |
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4468/src/java/org/lwjgl/opengl Modified Files: MacOSXFrame.java MacOSXDisplay.java LinuxDisplay.java MacOSXGLCanvas.java Win32Display.java KeyboardEventQueue.java Log Message: import cleanup Index: Win32Display.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/Win32Display.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- Win32Display.java 18 Nov 2004 12:10:27 -0000 1.3 +++ Win32Display.java 20 Nov 2004 16:46:43 -0000 1.4 @@ -38,13 +38,12 @@ * @author elias_naur */ -import java.nio.FloatBuffer; -import java.nio.IntBuffer; import java.nio.ByteBuffer; +import java.nio.FloatBuffer; import java.nio.IntBuffer; -import org.lwjgl.LWJGLException; import org.lwjgl.BufferUtils; +import org.lwjgl.LWJGLException; final class Win32Display implements DisplayImplementation { private final static int CURSOR_HANDLE_SIZE = 8; Index: LinuxDisplay.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- LinuxDisplay.java 18 Nov 2004 12:10:27 -0000 1.3 +++ LinuxDisplay.java 20 Nov 2004 16:46:43 -0000 1.4 @@ -38,13 +38,12 @@ * @author elias_naur */ -import java.nio.FloatBuffer; -import java.nio.IntBuffer; import java.nio.ByteBuffer; +import java.nio.FloatBuffer; import java.nio.IntBuffer; -import org.lwjgl.LWJGLException; import org.lwjgl.BufferUtils; +import org.lwjgl.LWJGLException; final class LinuxDisplay implements DisplayImplementation { private final static int CURSOR_HANDLE_SIZE = 8; Index: KeyboardEventQueue.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/KeyboardEventQueue.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- KeyboardEventQueue.java 13 Nov 2004 08:48:56 -0000 1.2 +++ KeyboardEventQueue.java 20 Nov 2004 16:46:43 -0000 1.3 @@ -37,11 +37,9 @@ * @author elias_naur */ -import java.nio.ByteBuffer; -import java.nio.IntBuffer; - -import java.awt.event.KeyListener; import java.awt.event.KeyEvent; +import java.awt.event.KeyListener; +import java.nio.ByteBuffer; import org.lwjgl.input.Keyboard; Index: MacOSXFrame.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/MacOSXFrame.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- MacOSXFrame.java 19 Nov 2004 15:05:21 -0000 1.3 +++ MacOSXFrame.java 20 Nov 2004 16:46:43 -0000 1.4 @@ -39,22 +39,14 @@ import java.awt.BorderLayout; import java.awt.Frame; +import java.awt.GraphicsDevice; +import java.awt.GraphicsEnvironment; import java.awt.Insets; -import java.awt.Cursor; import java.awt.Rectangle; -import java.awt.Dimension; -import java.awt.Point; -import java.awt.Toolkit; -import java.awt.GraphicsEnvironment; -import java.awt.GraphicsDevice; -import java.awt.image.BufferedImage; -import java.awt.event.WindowListener; -import java.awt.event.ComponentListener; import java.awt.event.ComponentEvent; +import java.awt.event.ComponentListener; import java.awt.event.WindowEvent; -import java.lang.reflect.Method; -import java.lang.reflect.Proxy; -import java.lang.reflect.InvocationHandler; +import java.awt.event.WindowListener; import java.lang.reflect.InvocationTargetException; import org.lwjgl.LWJGLException; Index: MacOSXDisplay.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/MacOSXDisplay.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- MacOSXDisplay.java 19 Nov 2004 15:18:29 -0000 1.10 +++ MacOSXDisplay.java 20 Nov 2004 16:46:43 -0000 1.11 @@ -38,30 +38,24 @@ * @author elias_naur */ -import java.nio.FloatBuffer; -import java.nio.IntBuffer; -import java.nio.ByteBuffer; - -import org.lwjgl.LWJGLException; -import org.lwjgl.Sys; -import org.lwjgl.input.Mouse; -import org.lwjgl.input.Keyboard; - -import java.util.List; -import java.util.ArrayList; -import java.awt.BorderLayout; -import java.awt.Frame; -import java.awt.Insets; import java.awt.Cursor; -import java.awt.Rectangle; import java.awt.Dimension; import java.awt.Point; +import java.awt.Rectangle; import java.awt.Toolkit; import java.awt.image.BufferedImage; -import java.lang.reflect.Method; -import java.lang.reflect.Proxy; import java.lang.reflect.InvocationHandler; import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.lang.reflect.Proxy; +import java.nio.ByteBuffer; +import java.nio.FloatBuffer; +import java.nio.IntBuffer; +import java.util.ArrayList; +import java.util.List; + +import org.lwjgl.LWJGLException; +import org.lwjgl.input.Keyboard; final class MacOSXDisplay implements DisplayImplementation { private final static int GAMMA_LENGTH = 256; Index: MacOSXGLCanvas.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/MacOSXGLCanvas.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- MacOSXGLCanvas.java 12 Nov 2004 13:23:20 -0000 1.2 +++ MacOSXGLCanvas.java 20 Nov 2004 16:46:43 -0000 1.3 @@ -38,11 +38,10 @@ import java.awt.Canvas; import java.awt.Dimension; -import java.awt.Point; -import java.awt.Rectangle; import java.awt.Graphics; -import java.awt.event.ComponentListener; +import java.awt.Point; import java.awt.event.ComponentEvent; +import java.awt.event.ComponentListener; final class MacOSXGLCanvas extends Canvas implements ComponentListener { private int width; |
|
From: Brian M. <ma...@us...> - 2004-11-20 02:48:50
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/glu In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17719/src/java/org/lwjgl/opengl/glu Modified Files: Sphere.java Log Message: fix sphere bug reported by Ken Russell Index: Sphere.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/glu/Sphere.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- Sphere.java 12 Jun 2004 20:28:24 -0000 1.5 +++ Sphere.java 20 Nov 2004 02:48:38 -0000 1.6 @@ -87,7 +87,7 @@ dtheta = 2.0f * GLU.PI / slices; if (super.drawStyle == GLU.GLU_FILL) { - if (super.textureFlag) { + if (!super.textureFlag) { // draw +Z end as a triangle fan GL11.glBegin(GL11.GL_TRIANGLE_FAN); GL11.glNormal3f(0.0f, 0.0f, 1.0f); |
|
From: Elias N. <eli...@us...> - 2004-11-19 15:18:41
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17387/src/java/org/lwjgl/opengl Modified Files: MacOSXDisplay.java Log Message: Mac OS X: Handle frame == null case Index: MacOSXDisplay.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/MacOSXDisplay.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- MacOSXDisplay.java 18 Nov 2004 12:10:27 -0000 1.9 +++ MacOSXDisplay.java 19 Nov 2004 15:18:29 -0000 1.10 @@ -98,9 +98,11 @@ public void destroyWindow() { if (MacOSXFrame.getDevice().getFullScreenWindow() != null) MacOSXFrame.getDevice().setFullScreenWindow(null); - setView(null); - frame.syncDispose(); - frame = null; + if (frame != null) { + setView(null); + frame.syncDispose(); + frame = null; + } hideUI(false); } |
|
From: Elias N. <eli...@us...> - 2004-11-19 15:05:30
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13910/src/java/org/lwjgl/opengl Modified Files: MacOSXFrame.java Log Message: Mac OS X: Don't dispose frame if already disposed Index: MacOSXFrame.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/MacOSXFrame.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- MacOSXFrame.java 19 Nov 2004 13:16:10 -0000 1.2 +++ MacOSXFrame.java 19 Nov 2004 15:05:21 -0000 1.3 @@ -173,7 +173,8 @@ public void syncDispose() { invokeAWT(new Runnable() { public void run() { - dispose(); + if (isDisplayable()) + dispose(); } }); } |
|
From: Elias N. <eli...@us...> - 2004-11-19 14:41:05
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8412/common Modified Files: extal.c Log Message: Fix a memory leak in extal.c Index: extal.c =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/extal.c,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- extal.c 13 Nov 2004 21:06:33 -0000 1.19 +++ extal.c 19 Nov 2004 14:40:56 -0000 1.20 @@ -188,9 +188,11 @@ #endif if (handleOAL != NULL) { printfDebug("Found OpenAL at '%s'\n", path_str); - return true; } free(path_str); + if (handleOAL != NULL) { + return true; + } } throwException(env, "Could not load openal library."); return false; |
|
From: Elias N. <eli...@us...> - 2004-11-19 13:16:19
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21239/src/java/org/lwjgl/opengl Modified Files: MacOSXFrame.java Log Message: Mac OS X: Set fullscreen window to null before disposing Index: MacOSXFrame.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/MacOSXFrame.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- MacOSXFrame.java 12 Nov 2004 13:23:20 -0000 1.1 +++ MacOSXFrame.java 19 Nov 2004 13:16:10 -0000 1.2 @@ -80,10 +80,13 @@ if (fullscreen) { getDevice().setFullScreenWindow(this); getDevice().setDisplayMode(requested_mode); + java.awt.DisplayMode real_mode = getDevice().getDisplayMode(); /** For some strange reason, the display mode is sometimes silently capped even though the mode is reported as supported */ - if (requested_mode.getWidth() != getDevice().getDisplayMode().getWidth() || requested_mode.getHeight() != getDevice().getDisplayMode().getHeight()) { + if (requested_mode.getWidth() != real_mode.getWidth() || requested_mode.getHeight() != real_mode.getHeight()) { + getDevice().setFullScreenWindow(null); syncDispose(); - throw new LWJGLException("AWT capped mode"); + throw new LWJGLException("AWT capped mode: requested mode = " + requested_mode.getWidth() + "x" + requested_mode.getHeight() + + " but got " + real_mode.getWidth() + " " + real_mode.getHeight()); } } pack(); |
|
From: Elias N. <eli...@us...> - 2004-11-18 12:10:42
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15320/src/native/win32 Modified Files: org_lwjgl_opengl_Pbuffer.cpp Log Message: Move getPbufferCaps to DisplayImplementation. Mac OS X pbuffer support Index: org_lwjgl_opengl_Pbuffer.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/win32/org_lwjgl_opengl_Pbuffer.cpp,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- org_lwjgl_opengl_Pbuffer.cpp 15 Sep 2004 17:07:06 -0000 1.21 +++ org_lwjgl_opengl_Pbuffer.cpp 18 Nov 2004 12:10:28 -0000 1.22 @@ -40,6 +40,7 @@ */ #include <stdlib.h> +#include "org_lwjgl_opengl_Win32Display.h" #include "org_lwjgl_opengl_Pbuffer.h" #include "Window.h" @@ -54,13 +55,8 @@ HDC Pbuffer_dc; } PbufferInfo; -/* - * Class: org_lwjgl_opengl_Pbuffer - * Method: isPbufferSupported - * Signature: ()Z - */ -JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_Pbuffer_getPbufferCaps - (JNIEnv *env, jclass clazz) +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_Win32Display_getPbufferCaps + (JNIEnv *env, jobject self) { int caps = 0; if ( extgl_Extensions.WGL_ARB_pixel_format && extgl_Extensions.WGL_ARB_pbuffer ) |
|
From: Elias N. <eli...@us...> - 2004-11-18 12:10:38
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/macosx In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15320/src/native/macosx Modified Files: org_lwjgl_opengl_Display.m Added Files: display.h org_lwjgl_opengl_Pbuffer.m Removed Files: org_lwjgl_opengl_Pbuffer.c Log Message: Move getPbufferCaps to DisplayImplementation. Mac OS X pbuffer support --- org_lwjgl_opengl_Pbuffer.c DELETED --- Index: org_lwjgl_opengl_Display.m =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/macosx/org_lwjgl_opengl_Display.m,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- org_lwjgl_opengl_Display.m 16 Nov 2004 14:23:28 -0000 1.4 +++ org_lwjgl_opengl_Display.m 18 Nov 2004 12:10:28 -0000 1.5 @@ -40,23 +40,25 @@ */ #import <Cocoa/Cocoa.h> -#import <OpenGL/OpenGL.h> #import <Carbon/Carbon.h> #import <jawt_md.h> #import <jni.h> #import <unistd.h> +#import "display.h" #import "common_tools.h" #define WAIT_DELAY 100 static NSOpenGLContext *gl_context; -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXDisplay_createContext(JNIEnv *env, jobject this, jobject pixel_format) { - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - - size_t bpp = CGDisplayBitsPerPixel(kCGDirectMainDisplay); - +NSOpenGLContext *createContext(JNIEnv *env, jobject pixel_format, bool double_buffered, bool use_display_bpp, long drawable_type, NSOpenGLContext *share_context) { + int bpp; jclass cls_pixel_format = (*env)->GetObjectClass(env, pixel_format); + if (use_display_bpp) + bpp = CGDisplayBitsPerPixel(kCGDirectMainDisplay); + else + bpp = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "bpp", "I")); + int alpha = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "alpha", "I")); int depth = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "depth", "I")); int stencil = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "stencil", "I")); @@ -66,37 +68,45 @@ int accum_alpha = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "accum_alpha", "I")); bool stereo = (bool)(*env)->GetBooleanField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "stereo", "Z")); - NSOpenGLPixelFormatAttribute attribs[] = { - NSOpenGLPFAAccelerated, - NSOpenGLPFADoubleBuffer, - NSOpenGLPFAColorSize, bpp, - NSOpenGLPFAAlphaSize, alpha, - NSOpenGLPFADepthSize, depth, - NSOpenGLPFAStencilSize, stencil, - NSOpenGLPFAAccumSize, accum_bpp + accum_alpha, - NSOpenGLPFASampleBuffers, samples > 0 ? 1 : 0, - NSOpenGLPFASamples, samples, - NSOpenGLPFAAuxBuffers, num_aux_buffers, - NSOpenGLPFAWindow, - 0, - 0 - }; - + attrib_list_t attribs; + initAttribList(&attribs); + putAttrib(&attribs, NSOpenGLPFAAccelerated); + if (double_buffered) + putAttrib(&attribs, NSOpenGLPFADoubleBuffer); + putAttrib(&attribs, NSOpenGLPFAColorSize); putAttrib(&attribs, bpp); + putAttrib(&attribs, NSOpenGLPFAAlphaSize); putAttrib(&attribs, alpha); + putAttrib(&attribs, NSOpenGLPFADepthSize); putAttrib(&attribs, depth); + putAttrib(&attribs, NSOpenGLPFAStencilSize); putAttrib(&attribs, stencil); + putAttrib(&attribs, NSOpenGLPFAAccumSize); putAttrib(&attribs, accum_bpp + accum_alpha); + putAttrib(&attribs, NSOpenGLPFASampleBuffers); putAttrib(&attribs, samples > 0 ? 1 : 0); + putAttrib(&attribs, NSOpenGLPFASamples); putAttrib(&attribs, samples); + putAttrib(&attribs, NSOpenGLPFAAuxBuffers); putAttrib(&attribs, num_aux_buffers); + putAttrib(&attribs, drawable_type); if (stereo) - attribs[19] = NSOpenGLPFAStereo; - NSOpenGLPixelFormat* fmt = [[NSOpenGLPixelFormat alloc] initWithAttributes:attribs]; + putAttrib(&attribs, NSOpenGLPFAStereo); + putAttrib(&attribs, 0); + NSOpenGLPixelFormat* fmt = [[NSOpenGLPixelFormat alloc] initWithAttributes:(NSOpenGLPixelFormatAttribute *)attribs.attribs]; if (fmt == nil) { throwException(env, "Could not create pixel format"); - [pool release]; - return; + return NULL; } - gl_context = [[NSOpenGLContext alloc] initWithFormat:fmt shareContext:nil]; + NSOpenGLContext *context = [[NSOpenGLContext alloc] initWithFormat:fmt shareContext:share_context]; [fmt release]; - if (gl_context == nil) + if (context == nil) throwException(env, "Could not create context"); + return context; +} + +NSOpenGLContext *getDisplayContext() { + return gl_context; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXDisplay_createContext(JNIEnv *env, jobject this, jobject pixel_format) { + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + gl_context = createContext(env, pixel_format, true, true, NSOpenGLPFAWindow, nil); [pool release]; } --- NEW FILE: display.h --- /* * Copyright (c) 2002-2004 LWJGL Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'LWJGL' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** * $Id: display.h,v 1.1 2004/11/18 12:10:28 elias_naur Exp $ * * Mac OS Xspecific display functions. * * @author elias_naur <eli...@us...> * @version $Revision: 1.1 $ */ #import <Cocoa/Cocoa.h> #import "common_tools.h" /* Will return NULL and throw exception if it fails */ extern NSOpenGLContext *createContext(JNIEnv *env, jobject pixel_format, bool double_buffered, bool use_display_bpp, long drawable_type, NSOpenGLContext *share_context); extern NSOpenGLContext *getDisplayContext(); --- NEW FILE: org_lwjgl_opengl_Pbuffer.m --- /* * Copyright (c) 2002-2004 LWJGL Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'LWJGL' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** * $Id: org_lwjgl_opengl_Pbuffer.m,v 1.1 2004/11/18 12:10:28 elias_naur Exp $ * * Mac OS X Pbuffer. * * @author elias_naur <eli...@us...> * @version $Revision: 1.1 $ */ #import <jni.h> #import <OpenGL/gl.h> #import "org_lwjgl_opengl_Pbuffer.h" #import "display.h" typedef struct { NSOpenGLPixelBuffer *pbuffer; NSOpenGLContext *context; } PbufferInfo; /* Check capacity and throw i not large enough to hold a PbufferInfo struct */ static bool checkCapacity(JNIEnv *env, jobject pbuffer_handle) { if ((*env)->GetDirectBufferCapacity(env, pbuffer_handle) < sizeof(PbufferInfo)) { throwException(env, "Handle buffer not large enough"); return false; } else return true; } static PbufferInfo *getPbufferInfoFromBuffer(JNIEnv *env, jobject pbuffer_handle) { if (checkCapacity(env, pbuffer_handle)) return (PbufferInfo *)(*env)->GetDirectBufferAddress(env, pbuffer_handle); else return NULL; } JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_Pbuffer_nIsBufferLost(JNIEnv *env, jclass clazz, jobject pbuffer_handle) { return JNI_FALSE; } JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Pbuffer_nMakeCurrent(JNIEnv *env, jclass clazz, jobject pbuffer_handle) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; PbufferInfo *pbuffer_handle_ptr = getPbufferInfoFromBuffer(env, pbuffer_handle); if (pbuffer_handle_ptr == NULL) return; [pbuffer_handle_ptr->context makeCurrentContext]; [pool release]; } static void createPbuffer(JNIEnv *env, jobject pbuffer_handle, jint width, jint height, jobject pixel_format) { if (!checkCapacity(env, pbuffer_handle)) return; NSOpenGLPixelBuffer *pbuffer = [[NSOpenGLPixelBuffer alloc] initWithTextureTarget:GL_TEXTURE_2D textureInternalFormat:GL_RGBA textureMaxMipMapLevel:0 pixelsWide:width pixelsHigh:height]; if (pbuffer == nil) { throwException(env, "Could not allocate Pbuffer"); return; } NSOpenGLContext *display_context = getDisplayContext(); NSOpenGLContext *context = createContext(env, pixel_format, false, false, NSOpenGLPFAPixelBuffer, display_context); if (context == nil) return; int screen; if (display_context != NULL) screen = [display_context currentVirtualScreen]; else screen = 0; [context setPixelBuffer:pbuffer cubeMapFace:0 mipMapLevel:0 currentVirtualScreen:screen]; PbufferInfo *pbuffer_handle_ptr = (PbufferInfo *)(*env)->GetDirectBufferAddress(env, pbuffer_handle); pbuffer_handle_ptr->pbuffer = pbuffer; pbuffer_handle_ptr->context = context; } JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Pbuffer_nCreate(JNIEnv *env, jclass clazz, jobject pbuffer_handle, jint width, jint height, jobject pixel_format, jobject pixelFormatCaps, jobject pBufferAttribs) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; createPbuffer(env, pbuffer_handle, width, height, pixel_format); [pool release]; } JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Pbuffer_nDestroy(JNIEnv *env, jclass clazz, jobject pbuffer_handle) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; PbufferInfo *pbuffer_handle_ptr = getPbufferInfoFromBuffer(env, pbuffer_handle); if (pbuffer_handle_ptr == NULL) return; [pbuffer_handle_ptr->context clearDrawable]; [pbuffer_handle_ptr->context release]; [pbuffer_handle_ptr->pbuffer release]; [pool release]; } |
|
From: Elias N. <eli...@us...> - 2004-11-18 12:10:37
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15320/src/java/org/lwjgl/opengl Modified Files: DisplayImplementation.java LinuxDisplay.java MacOSXDisplay.java Pbuffer.java Win32Display.java Log Message: Move getPbufferCaps to DisplayImplementation. Mac OS X pbuffer support Index: Win32Display.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/Win32Display.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Win32Display.java 11 Nov 2004 13:27:58 -0000 1.2 +++ Win32Display.java 18 Nov 2004 12:10:27 -0000 1.3 @@ -102,4 +102,5 @@ } public native void destroyCursor(Object cursorHandle); + public native int getPbufferCaps(); } Index: Pbuffer.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/Pbuffer.java,v retrieving revision 1.31 retrieving revision 1.32 diff -u -d -r1.31 -r1.32 --- Pbuffer.java 9 Nov 2004 21:29:17 -0000 1.31 +++ Pbuffer.java 18 Nov 2004 12:10:27 -0000 1.32 @@ -236,7 +236,9 @@ * * @return a bitmask of Pbuffer capabilities. */ - public static native int getPbufferCaps(); + public static int getPbufferCaps() { + return Display.getImplementation().getPbufferCaps(); + } /** * Native method to create a Pbuffer Index: DisplayImplementation.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/DisplayImplementation.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- DisplayImplementation.java 11 Nov 2004 13:27:58 -0000 1.2 +++ DisplayImplementation.java 18 Nov 2004 12:10:26 -0000 1.3 @@ -234,4 +234,7 @@ public Object createCursor(int width, int height, int xHotspot, int yHotspot, int numImages, IntBuffer images, IntBuffer delays) throws LWJGLException; public void destroyCursor(Object cursor_handle); + + /* Pbuffer caps */ + public int getPbufferCaps(); } Index: MacOSXDisplay.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/MacOSXDisplay.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- MacOSXDisplay.java 16 Nov 2004 14:08:30 -0000 1.8 +++ MacOSXDisplay.java 18 Nov 2004 12:10:27 -0000 1.9 @@ -376,6 +376,10 @@ public void destroyCursor(Object cursor_handle) { } + public int getPbufferCaps() { + return GL11.glGetString(GL11.GL_EXTENSIONS).indexOf("GL_APPLE_pixel_buffer") != -1 ? Pbuffer.PBUFFER_SUPPORTED : 0; + } + /** * This class captures com.apple.eawt.ApplicationEvents through reflection * to enable compilation on other platforms than Mac OS X Index: LinuxDisplay.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- LinuxDisplay.java 11 Nov 2004 13:27:58 -0000 1.2 +++ LinuxDisplay.java 18 Nov 2004 12:10:27 -0000 1.3 @@ -102,4 +102,5 @@ } public native void destroyCursor(Object cursorHandle); + public native int getPbufferCaps(); } |
|
From: Elias N. <eli...@us...> - 2004-11-18 12:10:37
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/linux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15320/src/native/linux Modified Files: org_lwjgl_opengl_Pbuffer.c Log Message: Move getPbufferCaps to DisplayImplementation. Mac OS X pbuffer support Index: org_lwjgl_opengl_Pbuffer.c =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/linux/org_lwjgl_opengl_Pbuffer.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- org_lwjgl_opengl_Pbuffer.c 10 Sep 2004 08:13:56 -0000 1.1 +++ org_lwjgl_opengl_Pbuffer.c 18 Nov 2004 12:10:27 -0000 1.2 @@ -40,6 +40,7 @@ */ #include <stdlib.h> +#include "org_lwjgl_opengl_LinuxDisplay.h" #include "org_lwjgl_opengl_Pbuffer.h" #include "extgl.h" #include "Window.h" @@ -57,8 +58,8 @@ return JNI_FALSE; } -JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_Pbuffer_getPbufferCaps - (JNIEnv *env, jclass clazz) +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_getPbufferCaps + (JNIEnv *env, jobject this) { // Only support the GLX 1.3 Pbuffers and ignore the GLX_SGIX_pbuffer extension return extgl_Extensions.GLX13 ? org_lwjgl_opengl_Pbuffer_PBUFFER_SUPPORTED : 0; |
|
From: Elias N. <eli...@us...> - 2004-11-16 20:34:06
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25778 Modified Files: MouseEventQueue.java Log Message: Mac OS X: Try harder to reset mouse deltas Index: MouseEventQueue.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/MouseEventQueue.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- MouseEventQueue.java 12 Nov 2004 15:37:47 -0000 1.3 +++ MouseEventQueue.java 16 Nov 2004 20:33:48 -0000 1.4 @@ -98,6 +98,8 @@ private void resetCursorToCenter() { clearEvents(); accum_dx = accum_dy = 0; + /* Clear accumulated deltas */ + ((MacOSXDisplay)Display.getImplementation()).getMouseDeltas(delta_buffer); } private boolean putMouseEvent(int button, int state, int dz) { |
|
From: Elias N. <eli...@us...> - 2004-11-16 14:23:38
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/macosx In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30152 Modified Files: org_lwjgl_opengl_Display.m Log Message: Mac OS X: Add error handling to gamma functions Index: org_lwjgl_opengl_Display.m =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/macosx/org_lwjgl_opengl_Display.m,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- org_lwjgl_opengl_Display.m 16 Nov 2004 14:08:31 -0000 1.3 +++ org_lwjgl_opengl_Display.m 16 Nov 2004 14:23:28 -0000 1.4 @@ -169,7 +169,10 @@ JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXDisplay_setGammaRamp(JNIEnv *env, jobject this, jobject gamma_buffer) { const CGGammaValue *values = (*env)->GetDirectBufferAddress(env, gamma_buffer); CGTableCount table_size = (*env)->GetDirectBufferCapacity(env, gamma_buffer); - CGSetDisplayTransferByTable(kCGDirectMainDisplay, table_size, values, values, values); + CGDisplayErr err = CGSetDisplayTransferByTable(kCGDirectMainDisplay, table_size, values, values, values); + if (err != CGDisplayNoErr) { + throwException(env, "Could not set display gamma"); + } } JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXDisplay_hideUI(JNIEnv *env, jobject this, jboolean hide) { |
|
From: Elias N. <eli...@us...> - 2004-11-16 14:08:44
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26248/src/java/org/lwjgl/opengl Modified Files: MacOSXDisplay.java Log Message: Mac OS X: Implemented gamma Index: MacOSXDisplay.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/MacOSXDisplay.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- MacOSXDisplay.java 16 Nov 2004 13:21:45 -0000 1.7 +++ MacOSXDisplay.java 16 Nov 2004 14:08:30 -0000 1.8 @@ -64,6 +64,8 @@ import java.lang.reflect.InvocationTargetException; final class MacOSXDisplay implements DisplayImplementation { + private final static int GAMMA_LENGTH = 256; + private MacOSXFrame frame; private MouseEventQueue mouse_queue; private KeyboardEventQueue keyboard_queue; @@ -103,12 +105,10 @@ } public int getGammaRampLength() { - return 0; + return GAMMA_LENGTH; } - public void setGammaRamp(FloatBuffer gammaRamp) throws LWJGLException { - throw new LWJGLException("Gamma not supported"); - } + public native void setGammaRamp(FloatBuffer gammaRamp) throws LWJGLException; public String getAdapter() { return null; @@ -137,7 +137,10 @@ if (MacOSXFrame.getDevice().getFullScreenWindow() != null) MacOSXFrame.getDevice().setFullScreenWindow(null); requested_mode = null; + restoreGamma(); } + + private native void restoreGamma(); private DisplayMode createLWJGLDisplayMode(java.awt.DisplayMode awt_mode) { int bit_depth; |
|
From: Elias N. <eli...@us...> - 2004-11-16 14:08:43
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/macosx In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26248/src/native/macosx Modified Files: org_lwjgl_opengl_Display.m Log Message: Mac OS X: Implemented gamma Index: org_lwjgl_opengl_Display.m =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/macosx/org_lwjgl_opengl_Display.m,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- org_lwjgl_opengl_Display.m 16 Nov 2004 13:21:46 -0000 1.2 +++ org_lwjgl_opengl_Display.m 16 Nov 2004 14:08:31 -0000 1.3 @@ -162,6 +162,16 @@ awt.FreeDrawingSurface(ds); } +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXDisplay_restoreGamma(JNIEnv *env, jobject this) { + CGDisplayRestoreColorSyncSettings(); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXDisplay_setGammaRamp(JNIEnv *env, jobject this, jobject gamma_buffer) { + const CGGammaValue *values = (*env)->GetDirectBufferAddress(env, gamma_buffer); + CGTableCount table_size = (*env)->GetDirectBufferCapacity(env, gamma_buffer); + CGSetDisplayTransferByTable(kCGDirectMainDisplay, table_size, values, values, values); +} + JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXDisplay_hideUI(JNIEnv *env, jobject this, jboolean hide) { if (hide == JNI_TRUE) { SetSystemUIMode(kUIModeContentSuppressed, 0); |
|
From: Elias N. <eli...@us...> - 2004-11-16 13:21:58
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18194/src/java/org/lwjgl/opengl Modified Files: MacOSXDisplay.java Log Message: Mac OS X: Work around AWT shifting the fullscreen window off the screen Index: MacOSXDisplay.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/MacOSXDisplay.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- MacOSXDisplay.java 15 Nov 2004 15:28:52 -0000 1.6 +++ MacOSXDisplay.java 16 Nov 2004 13:21:45 -0000 1.7 @@ -77,6 +77,7 @@ } public void createWindow(DisplayMode mode, boolean fullscreen, int x, int y) throws LWJGLException { + hideUI(fullscreen); close_requested = false; try { frame = new MacOSXFrame(mode, requested_mode, fullscreen, x, y); @@ -98,6 +99,7 @@ setView(null); frame.syncDispose(); frame = null; + hideUI(false); } public int getGammaRampLength() { @@ -222,6 +224,13 @@ } } + /** + * This is an interface to the native Carbon call + * SetSystemUIMode. It is used to hide the dock in a way + * that will prevent AWT from shifting the fullscreen window + */ + private native void hideUI(boolean hide); + native void getMouseDeltas(IntBuffer delta_buffer); private native void updateContext(); |
|
From: Elias N. <eli...@us...> - 2004-11-16 13:21:57
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/macosx In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18194/src/native/macosx Modified Files: Makefile org_lwjgl_opengl_Display.m Log Message: Mac OS X: Work around AWT shifting the fullscreen window off the screen Index: org_lwjgl_opengl_Display.m =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/macosx/org_lwjgl_opengl_Display.m,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- org_lwjgl_opengl_Display.m 15 Nov 2004 14:38:00 -0000 1.1 +++ org_lwjgl_opengl_Display.m 16 Nov 2004 13:21:46 -0000 1.2 @@ -153,7 +153,6 @@ usleep(WAIT_DELAY); } -// [gl_context clearDrawable]; [gl_context setView:view]; [view unlockFocus]; @@ -163,6 +162,14 @@ awt.FreeDrawingSurface(ds); } +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXDisplay_hideUI(JNIEnv *env, jobject this, jboolean hide) { + if (hide == JNI_TRUE) { + SetSystemUIMode(kUIModeContentSuppressed, 0); + } else { + SetSystemUIMode(kUIModeNormal, 0); + } +} + JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXDisplay_setVSyncEnabled(JNIEnv *env, jobject this, jboolean vsync) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; long vsync_value = vsync == JNI_TRUE ? 1 : 0; Index: Makefile =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/macosx/Makefile,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- Makefile 12 Nov 2004 15:11:42 -0000 1.3 +++ Makefile 16 Nov 2004 13:21:46 -0000 1.4 @@ -6,7 +6,7 @@ LINKER=gcc STRIP=strip CFLAGS_LINK=-dynamiclib -Wall -FRAMEWORKS=-framework Foundation -framework AppKit -framework JavaVM +FRAMEWORKS=-framework Foundation -framework AppKit -framework JavaVM -framework Carbon CFLAGS_O=-fPIC -O2 -D_MACOSX -Wall -c -I${AL}/include -I../common -I/System/Library/Frameworks/JavaVM.framework/Versions/A/Headers SRC=$(wildcard *.m) $(wildcard *.c) $(wildcard ../common/*.c) $(wildcard ../common/arb/*.c) $(wildcard ../common/ati/*.c) $(wildcard ../common/ext/*.c) $(wildcard ../common/nv/*.c) OBJECTS=$(subst .m,.o, $(subst .c,.o,$(SRC))) |
|
From: Elias N. <eli...@us...> - 2004-11-15 15:29:01
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/macosx In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18601/src/native/macosx Modified Files: org_lwjgl_input_Mouse.c Log Message: Mac OS X: Don't hide mouse mouse when already hidden (because the cursor state is counted) Index: org_lwjgl_input_Mouse.c =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/macosx/org_lwjgl_input_Mouse.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- org_lwjgl_input_Mouse.c 11 Nov 2004 16:03:17 -0000 1.1 +++ org_lwjgl_input_Mouse.c 15 Nov 2004 15:28:53 -0000 1.2 @@ -43,12 +43,18 @@ #include <ApplicationServices/ApplicationServices.h> #include "common_tools.h" +static bool is_grabbed; + JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXDisplay_nGrabMouse(JNIEnv *env, jobject this, jboolean grab) { - CGAssociateMouseAndMouseCursorPosition(grab == JNI_TRUE ? FALSE : TRUE); - if (grab == JNI_TRUE) - CGDisplayHideCursor(kCGDirectMainDisplay); - else - CGDisplayShowCursor(kCGDirectMainDisplay); + bool new_grabbed = grab == JNI_TRUE; + if (is_grabbed != new_grabbed) { + is_grabbed = new_grabbed; + CGAssociateMouseAndMouseCursorPosition(is_grabbed ? FALSE : TRUE); + if (is_grabbed) + CGDisplayHideCursor(kCGDirectMainDisplay); + else + CGDisplayShowCursor(kCGDirectMainDisplay); + } } JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXDisplay_nWarpCursor(JNIEnv *env, jobject this, jint x, jint y) { |
|
From: Elias N. <eli...@us...> - 2004-11-15 15:29:01
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18601/src/java/org/lwjgl/opengl Modified Files: MacOSXDisplay.java Log Message: Mac OS X: Don't hide mouse mouse when already hidden (because the cursor state is counted) Index: MacOSXDisplay.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/MacOSXDisplay.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- MacOSXDisplay.java 15 Nov 2004 14:38:00 -0000 1.5 +++ MacOSXDisplay.java 15 Nov 2004 15:28:52 -0000 1.6 @@ -270,9 +270,9 @@ } public void grabMouse(boolean grab) { - nGrabMouse(grab); mouse_queue.setGrabbed(grab); warpCursor(); + nGrabMouse(grab); } private native void nWarpCursor(int x, int y); @@ -294,7 +294,7 @@ with another setCursor. 2. When the cursor is moving in the top pixel row (y = 0 in AWT coordinates) in fullscreen mode, no mouse moved events are reported, even though mouse pressed/released and dragged - are reported + events are reported */ return 0; } |
|
From: Caspian Rychlik-P. <ci...@us...> - 2004-11-15 14:39:39
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8028/src/native/common Modified Files: .cvsignore Log Message: Index: .cvsignore =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/.cvsignore,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- .cvsignore 7 Nov 2004 16:35:17 -0000 1.3 +++ .cvsignore 15 Nov 2004 14:39:28 -0000 1.4 @@ -13,3 +13,4 @@ org_lwjgl_opengl_GLContext.h org_lwjgl_opengl_Pbuffer.h org_lwjgl_Sys.h +org_lwjgl_opengl_Display.h |
|
From: Elias N. <eli...@us...> - 2004-11-15 14:38:11
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/macosx In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7628/src/native/macosx Added Files: org_lwjgl_opengl_Display.m Log Message: Mac OS X: Add missing file and disable native cursors because of AWT bugs --- NEW FILE: org_lwjgl_opengl_Display.m --- /* * Copyright (c) 2002-2004 LWJGL Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'LWJGL' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** * $Id: org_lwjgl_opengl_Display.m,v 1.1 2004/11/15 14:38:00 elias_naur Exp $ * * Mac OS Xspecific display functions. * * @author elias_naur <eli...@us...> * @version $Revision: 1.1 $ */ #import <Cocoa/Cocoa.h> #import <OpenGL/OpenGL.h> #import <Carbon/Carbon.h> #import <jawt_md.h> #import <jni.h> #import <unistd.h> #import "common_tools.h" #define WAIT_DELAY 100 static NSOpenGLContext *gl_context; JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXDisplay_createContext(JNIEnv *env, jobject this, jobject pixel_format) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; size_t bpp = CGDisplayBitsPerPixel(kCGDirectMainDisplay); jclass cls_pixel_format = (*env)->GetObjectClass(env, pixel_format); int alpha = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "alpha", "I")); int depth = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "depth", "I")); int stencil = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "stencil", "I")); int samples = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "samples", "I")); int num_aux_buffers = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "num_aux_buffers", "I")); int accum_bpp = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "accum_bpp", "I")); int accum_alpha = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "accum_alpha", "I")); bool stereo = (bool)(*env)->GetBooleanField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "stereo", "Z")); NSOpenGLPixelFormatAttribute attribs[] = { NSOpenGLPFAAccelerated, NSOpenGLPFADoubleBuffer, NSOpenGLPFAColorSize, bpp, NSOpenGLPFAAlphaSize, alpha, NSOpenGLPFADepthSize, depth, NSOpenGLPFAStencilSize, stencil, NSOpenGLPFAAccumSize, accum_bpp + accum_alpha, NSOpenGLPFASampleBuffers, samples > 0 ? 1 : 0, NSOpenGLPFASamples, samples, NSOpenGLPFAAuxBuffers, num_aux_buffers, NSOpenGLPFAWindow, 0, 0 }; if (stereo) attribs[19] = NSOpenGLPFAStereo; NSOpenGLPixelFormat* fmt = [[NSOpenGLPixelFormat alloc] initWithAttributes:attribs]; if (fmt == nil) { throwException(env, "Could not create pixel format"); [pool release]; return; } gl_context = [[NSOpenGLContext alloc] initWithFormat:fmt shareContext:nil]; [fmt release]; if (gl_context == nil) throwException(env, "Could not create context"); [pool release]; } JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXDisplay_updateContext(JNIEnv *env, jobject this) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; [gl_context update]; [pool release]; } static void setView(JNIEnv *env, jobject canvas) { JAWT awt; JAWT_DrawingSurface* ds; JAWT_DrawingSurfaceInfo* dsi; JAWT_MacOSXDrawingSurfaceInfo* dsi_mac; jboolean result = JNI_FALSE; jint lock = 0; // get the AWT awt.version = JAWT_VERSION_1_4; NSView *view; while (true) { result = JAWT_GetAWT(env, &awt); if (result == JNI_FALSE) { throwException(env, "Could not get the JAWT interface"); return; } ds = awt.GetDrawingSurface(env, canvas); if (ds == NULL) { throwException(env, "Could not get the drawing surface"); return; } lock = ds->Lock(ds); if((lock & JAWT_LOCK_ERROR) != 0) { awt.FreeDrawingSurface(ds); throwException(env, "Could not lock the drawing surface"); return; } dsi = ds->GetDrawingSurfaceInfo(ds); if (dsi != NULL) { dsi_mac = (JAWT_MacOSXDrawingSurfaceInfo*)dsi->platformInfo; view = dsi_mac->cocoaViewRef; if ([view lockFocusIfCanDraw] == YES) break; view = NULL; ds->FreeDrawingSurfaceInfo(dsi); } printfDebug("Could not get drawing surface info, retrying... \n"); ds->Unlock(ds); awt.FreeDrawingSurface(ds); usleep(WAIT_DELAY); } // [gl_context clearDrawable]; [gl_context setView:view]; [view unlockFocus]; ds->FreeDrawingSurfaceInfo(dsi); ds->Unlock(ds); awt.FreeDrawingSurface(ds); } JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXDisplay_setVSyncEnabled(JNIEnv *env, jobject this, jboolean vsync) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; long vsync_value = vsync == JNI_TRUE ? 1 : 0; [gl_context setValues:&vsync_value forParameter:NSOpenGLCPSwapInterval]; [pool release]; } JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXDisplay_swapBuffers(JNIEnv *env, jobject this) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; [gl_context flushBuffer]; [pool release]; } JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXDisplay_setView(JNIEnv *env, jobject this, jobject canvas) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; if (canvas != NULL) { setView(env, canvas); } else { [gl_context clearDrawable]; } [pool release]; } JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXDisplay_makeCurrent(JNIEnv *env, jobject this) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; [gl_context makeCurrentContext]; [pool release]; } JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXDisplay_destroyContext(JNIEnv *env, jobject this) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; if (gl_context != nil) { [gl_context clearDrawable]; [gl_context release]; gl_context = nil; } [pool release]; } |
|
From: Elias N. <eli...@us...> - 2004-11-15 14:38:11
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7628/src/java/org/lwjgl/opengl Modified Files: MacOSXDisplay.java Log Message: Mac OS X: Add missing file and disable native cursors because of AWT bugs Index: MacOSXDisplay.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/MacOSXDisplay.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- MacOSXDisplay.java 12 Nov 2004 13:23:20 -0000 1.4 +++ MacOSXDisplay.java 15 Nov 2004 14:38:00 -0000 1.5 @@ -280,10 +280,23 @@ private native void nGrabMouse(boolean grab); public int getNativeCursorCaps() { + /* int cursor_colors = Toolkit.getDefaultToolkit().getMaximumCursorColors(); boolean supported = cursor_colors >= Short.MAX_VALUE && getMaxCursorSize() > 0; int caps = supported ? Mouse.CURSOR_8_BIT_ALPHA | Mouse.CURSOR_ONE_BIT_TRANSPARENCY: 0; return caps; + */ + /* Return no capability, as there are two unsolved bugs (both reported to apple along with + minimal test case): + 1. When a custom cursor (or some standard) java.awt.Cursor is assigned to a + Componennt, it is reset to the default pointer cursor when the window is de- + activated and the re-activated. The Cursor can not be reset to the custom cursor, + with another setCursor. + 2. When the cursor is moving in the top pixel row (y = 0 in AWT coordinates) in fullscreen + mode, no mouse moved events are reported, even though mouse pressed/released and dragged + are reported + */ + return 0; } public void setNativeCursor(Object handle) throws LWJGLException { |
|
From: Caspian Rychlik-P. <ci...@us...> - 2004-11-14 20:53:17
|
Update of /cvsroot/java-game-lib/Puppygames GUI In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26779 Added Files: .classpath .cvsignore .project Log Message: --- NEW FILE: .cvsignore --- bin --- NEW FILE: .project --- <?xml version="1.0" encoding="UTF-8"?> <projectDescription> <name>Puppygames GUI</name> <comment></comment> <projects> </projects> <buildSpec> <buildCommand> <name>org.eclipse.jdt.core.javabuilder</name> <arguments> </arguments> </buildCommand> </buildSpec> <natures> <nature>org.eclipse.jdt.core.javanature</nature> </natures> </projectDescription> --- NEW FILE: .classpath --- <?xml version="1.0" encoding="UTF-8"?> <classpath> <classpathentry kind="src" path="src"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry kind="src" path="/Shaven Puppy Game Library"/> <classpathentry kind="src" path="/LWJGL"/> <classpathentry kind="output" path="bin"/> </classpath> |
|
From: Caspian Rychlik-P. <ci...@us...> - 2004-11-14 20:53:04
|
Update of /cvsroot/java-game-lib/Puppygames GUI/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26713/src Log Message: Directory /cvsroot/java-game-lib/Puppygames GUI/src added to the repository |
|
From: Caspian Rychlik-P. <ci...@us...> - 2004-11-14 20:51:45
|
Update of /cvsroot/java-game-lib/Puppygames GUI In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26428/Puppygames GUI Log Message: Directory /cvsroot/java-game-lib/Puppygames GUI added to the repository |