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
|
|
From: <sp...@us...> - 2013-01-30 00:07:39
|
Revision: 3841
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3841&view=rev
Author: spasi
Date: 2013-01-30 00:07:27 +0000 (Wed, 30 Jan 2013)
Log Message:
-----------
Reverted warning level to 2.
Modified Paths:
--------------
trunk/LWJGL/platform_build/windows_ant/build.xml
trunk/LWJGL/platform_build/windows_ant/build_es.xml
Modified: trunk/LWJGL/platform_build/windows_ant/build.xml
===================================================================
--- trunk/LWJGL/platform_build/windows_ant/build.xml 2013-01-29 23:57:31 UTC (rev 3840)
+++ trunk/LWJGL/platform_build/windows_ant/build.xml 2013-01-30 00:07:27 UTC (rev 3841)
@@ -7,7 +7,7 @@
<target name="compile_dir">
<apply dir="." failonerror="true" executable="cl" dest="." skipemptyfilesets="true" parallel="true">
- <arg line="/c /W3 /EHsc /Ox /Gy /MT /MP /nologo"/>
+ <arg line="/c /W2 /EHsc /Ox /Gy /MT /MP /nologo"/>
<arg value="/I${sdkhome}\include"/>
<arg value="/I${java.home}\..\include"/>
<arg value="/I${java.home}\..\include\win32"/>
Modified: trunk/LWJGL/platform_build/windows_ant/build_es.xml
===================================================================
--- trunk/LWJGL/platform_build/windows_ant/build_es.xml 2013-01-29 23:57:31 UTC (rev 3840)
+++ trunk/LWJGL/platform_build/windows_ant/build_es.xml 2013-01-30 00:07:27 UTC (rev 3841)
@@ -7,7 +7,7 @@
<target name="compile_dir">
<apply dir="." failonerror="true" executable="cl" dest="." skipemptyfilesets="true" parallel="true">
- <arg line="/c /W3 /EHsc /Ox /Gy /MT /MP /nologo"/>
+ <arg line="/c /W2 /EHsc /Ox /Gy /MT /MP /nologo"/>
<arg value="/I${sdkhome}\include"/>
<arg value="/I${java.home}\..\include"/>
<arg value="/I${java.home}\..\include\win32"/>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sp...@us...> - 2013-01-29 23:57:39
|
Revision: 3840
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3840&view=rev
Author: spasi
Date: 2013-01-29 23:57:31 +0000 (Tue, 29 Jan 2013)
Log Message:
-----------
Fixed windows build.
Modified Paths:
--------------
trunk/LWJGL/platform_build/windows_ant/build.xml
trunk/LWJGL/platform_build/windows_ant/build_es.xml
Modified: trunk/LWJGL/platform_build/windows_ant/build.xml
===================================================================
--- trunk/LWJGL/platform_build/windows_ant/build.xml 2013-01-29 21:02:52 UTC (rev 3839)
+++ trunk/LWJGL/platform_build/windows_ant/build.xml 2013-01-29 23:57:31 UTC (rev 3840)
@@ -6,7 +6,7 @@
<property name="sdkhome" location="${env.MSSDK}"/>
<target name="compile_dir">
- <apply dir="." failonerror="true" executable="cl" dest="." skipemptyfilesets="true"parallel="true">
+ <apply dir="." failonerror="true" executable="cl" dest="." skipemptyfilesets="true" parallel="true">
<arg line="/c /W3 /EHsc /Ox /Gy /MT /MP /nologo"/>
<arg value="/I${sdkhome}\include"/>
<arg value="/I${java.home}\..\include"/>
Modified: trunk/LWJGL/platform_build/windows_ant/build_es.xml
===================================================================
--- trunk/LWJGL/platform_build/windows_ant/build_es.xml 2013-01-29 21:02:52 UTC (rev 3839)
+++ trunk/LWJGL/platform_build/windows_ant/build_es.xml 2013-01-29 23:57:31 UTC (rev 3840)
@@ -6,8 +6,8 @@
<property name="sdkhome" location="${env.MSSDK}"/>
<target name="compile_dir">
- <apply dir="." failonerror="true" executable="cl" dest="." skipemptyfilesets="true">
- <arg line="/Ox /W2 /nologo /Ox /Ob2 /Oi /Ot /Oy /FD /EHsc /MT /Gy /W2 /nologo /c"/>
+ <apply dir="." failonerror="true" executable="cl" dest="." skipemptyfilesets="true" parallel="true">
+ <arg line="/c /W3 /EHsc /Ox /Gy /MT /MP /nologo"/>
<arg value="/I${sdkhome}\include"/>
<arg value="/I${java.home}\..\include"/>
<arg value="/I${java.home}\..\include\win32"/>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sp...@us...> - 2013-01-29 21:03:01
|
Revision: 3839
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3839&view=rev
Author: spasi
Date: 2013-01-29 21:02:52 +0000 (Tue, 29 Jan 2013)
Log Message:
-----------
Sync with recent Git changes.
Modified Paths:
--------------
trunk/LWJGL/platform_build/windows_ant/build.xml
trunk/LWJGL/src/java/org/lwjgl/opengl/Display.java
trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDisplay.java
trunk/LWJGL/src/java/org/lwjgl/util/generator/NativeMethodStubsGenerator.java
trunk/LWJGL/src/native/common/common_tools.c
trunk/LWJGL/src/native/common/common_tools.h
trunk/LWJGL/src/native/common/extcl.c
trunk/LWJGL/src/native/common/extcl.h
trunk/LWJGL/src/native/common/org_lwjgl_openal_ALC10.c
trunk/LWJGL/src/native/common/org_lwjgl_opencl_CallbackUtil.c
trunk/LWJGL/src/native/windows/opengl/context.c
trunk/LWJGL/src/native/windows/org_lwjgl_opengl_Display.c
trunk/LWJGL/src/native/windows/org_lwjgl_opengl_WindowsRegistry.c
Modified: trunk/LWJGL/platform_build/windows_ant/build.xml
===================================================================
--- trunk/LWJGL/platform_build/windows_ant/build.xml 2013-01-25 15:39:08 UTC (rev 3838)
+++ trunk/LWJGL/platform_build/windows_ant/build.xml 2013-01-29 21:02:52 UTC (rev 3839)
@@ -6,8 +6,8 @@
<property name="sdkhome" location="${env.MSSDK}"/>
<target name="compile_dir">
- <apply dir="." failonerror="true" executable="cl" dest="." skipemptyfilesets="true">
- <arg line="/Ox /W2 /nologo /Ox /Ob2 /Oi /Ot /Oy /FD /EHsc /MT /Gy /W2 /nologo /c"/>
+ <apply dir="." failonerror="true" executable="cl" dest="." skipemptyfilesets="true"parallel="true">
+ <arg line="/c /W3 /EHsc /Ox /Gy /MT /MP /nologo"/>
<arg value="/I${sdkhome}\include"/>
<arg value="/I${java.home}\..\include"/>
<arg value="/I${java.home}\..\include\win32"/>
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/Display.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/Display.java 2013-01-25 15:39:08 UTC (rev 3838)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/Display.java 2013-01-29 21:02:52 UTC (rev 3839)
@@ -58,6 +58,7 @@
import java.security.PrivilegedAction;
import java.util.Arrays;
import java.util.HashSet;
+import javax.swing.*;
public final class Display {
@@ -121,6 +122,12 @@
private static float r, g, b;
private static final ComponentListener component_listener = new ComponentAdapter() {
+ public void componentMoved(ComponentEvent e) {
+ synchronized ( GlobalLock.lock ) {
+ parent_resized = true;
+ }
+ }
+
public void componentResized(ComponentEvent e) {
synchronized ( GlobalLock.lock ) {
parent_resized = true;
@@ -298,6 +305,7 @@
throw new LWJGLException("Parent.isDisplayable() must be true");
if ( tmp_parent != null ) {
tmp_parent.addComponentListener(component_listener);
+ SwingUtilities.windowForComponent(parent).addComponentListener(component_listener);
}
DisplayMode mode = getEffectiveMode();
display_impl.createWindow(drawable, mode, tmp_parent, getWindowX(), getWindowY());
@@ -335,6 +343,7 @@
}
if ( parent != null ) {
parent.removeComponentListener(component_listener);
+ SwingUtilities.windowForComponent(parent).removeComponentListener(component_listener);
}
releaseDrawable();
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDisplay.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDisplay.java 2013-01-25 15:39:08 UTC (rev 3838)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDisplay.java 2013-01-29 21:02:52 UTC (rev 3839)
@@ -38,8 +38,9 @@
* @author elias_naur
*/
+import java.awt.*;
+import java.lang.reflect.Method;
import java.nio.*;
-import java.awt.Canvas;
import org.lwjgl.LWJGLException;
import org.lwjgl.LWJGLUtil;
@@ -49,6 +50,8 @@
import org.lwjgl.input.Mouse;
import org.lwjgl.opengles.EGL;
+import javax.swing.*;
+
final class WindowsDisplay implements DisplayImplementation {
private static final int GAMMA_LENGTH = 256;
@@ -150,9 +153,9 @@
private static final int WS_THICKFRAME = 0x00040000;
private static final int WS_MAXIMIZEBOX = 0x00010000;
-
+
private static final int HTCLIENT = 0x01;
-
+
private static final int MK_XBUTTON1 = 0x0020;
private static final int MK_XBUTTON2 = 0x0040;
private static final int XBUTTON1 = 0x0001;
@@ -199,6 +202,15 @@
private boolean trackingMouse;
private boolean mouseInside;
+ static {
+ try {
+ final Method windowProc = WindowsDisplay.class.getDeclaredMethod("handleMessage", long.class, int.class, long.class, long.class, long.class);
+ setWindowProc(windowProc);
+ } catch (NoSuchMethodException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
WindowsDisplay() {
current_display = this;
}
@@ -212,7 +224,7 @@
maximized = false;
this.parent = parent;
hasParent = parent != null;
- long parent_hwnd = parent != null ? getHwnd(parent) : 0;
+ long parent_hwnd = parent != null ? nGetParent(getHwnd(parent)) : 0;
this.hwnd = nCreateWindow(x, y, mode.getWidth(), mode.getHeight(), Display.isFullscreen() || isUndecorated(), parent != null, parent_hwnd);
this.resizable=false;
if (hwnd == 0) {
@@ -233,6 +245,8 @@
((DrawableGLES)drawable).initialize(hwnd, hdc, EGL.EGL_WINDOW_BIT, (org.lwjgl.opengles.PixelFormat)drawable.getPixelFormat());
}
peer_info.initDC(getHwnd(), getHdc());
+ if ( parent != null )
+ reshape(0, 0, mode.getWidth(), mode.getHeight());
showWindow(getHwnd(), SW_SHOWDEFAULT);
updateWidthAndHeight();
@@ -275,6 +289,8 @@
}
}
+ private static native long nGetParent(long hWnd);
+
public void destroyWindow() {
nReleaseDC(hwnd, hdc);
nDestroyWindow(hwnd);
@@ -496,9 +512,6 @@
public void update() {
nUpdate();
- if (parent != null && parent.isFocusOwner()) {
- setFocus(getHwnd());
- }
if (redoMakeContextCurrent) {
redoMakeContextCurrent = false;
/**
@@ -518,6 +531,15 @@
private static native void nUpdate();
public void reshape(int x, int y, int width, int height) {
+ if ( parent != null ) {
+ // Translate canvas location to screen coordinates
+ Point p = new Point();
+
+ SwingUtilities.convertPointToScreen(p, parent);
+
+ x += p.getX();
+ y += p.getY();
+ }
nReshape(getHwnd(), x, y, width, height, Display.isFullscreen() || isUndecorated(), parent != null);
}
private static native void nReshape(long hwnd, int x, int y, int width, int height, boolean undecorated, boolean child);
@@ -780,10 +802,6 @@
nReleaseCapture();
}
}
-
- if (parent != null && !isFocused) {
- setFocus(getHwnd());
- }
}
private boolean shouldGrab() {
@@ -833,14 +851,16 @@
private static native void clientToScreen(long hwnd, IntBuffer point);
- private static int handleMessage(long hwnd, int msg, long wParam, long lParam, long millis) {
+ private static native void setWindowProc(Method windowProc);
+
+ private static long handleMessage(long hwnd, int msg, long wParam, long lParam, long millis) {
if (current_display != null)
return current_display.doHandleMessage(hwnd, msg, wParam, lParam, millis);
else
return defWindowProc(hwnd, msg, wParam, lParam);
}
- private static native int defWindowProc(long hwnd, int msg, long wParam, long lParam);
+ private static native long defWindowProc(long hwnd, int msg, long wParam, long lParam);
private void checkCursorState() {
updateClipping();
@@ -863,7 +883,12 @@
checkCursorState();
}
- private int doHandleMessage(long hwnd, int msg, long wParam, long lParam, long millis) {
+ private long doHandleMessage(long hwnd, int msg, long wParam, long lParam, long millis) {
+ if ( hwnd != getHwnd() ) {
+ // Can happen at start-up
+ return defWindowProc(hwnd, msg, wParam, lParam);
+ }
+
switch (msg) {
// disable screen saver and monitor power down messages which wreak havoc
case WM_ACTIVATE:
@@ -876,7 +901,7 @@
appActivate(false);
break;
}
- return 0;
+ return 0L;
case WM_SIZE:
switch ((int)wParam) {
case SIZE_RESTORED:
@@ -908,13 +933,13 @@
} else {
// let Windows handle cursors outside the client area for resizing, etc.
return defWindowProc(hwnd, msg, wParam, lParam);
- }
+ }
case WM_KILLFOCUS:
appActivate(false);
- return 0;
+ return 0L;
case WM_SETFOCUS:
appActivate(true);
- return 0;
+ return 0L;
case WM_MOUSEMOVE:
int xPos = (int)(short)(lParam & 0xFFFF);
int yPos = transformY(getHwnd(), (int)(short)((lParam >> 16) & 0xFFFF));
@@ -924,29 +949,29 @@
if(!trackingMouse) {
trackingMouse = nTrackMouseEvent(hwnd);
}
- return 0;
+ return 0L;
case WM_MOUSEWHEEL:
int dwheel = (int)(short)((wParam >> 16) & 0xFFFF);
handleMouseScrolled(dwheel, millis);
- return 0;
+ return 0L;
case WM_LBUTTONDOWN:
handleMouseButton(0, 1, millis);
- return 0;
+ return 0L;
case WM_LBUTTONUP:
handleMouseButton(0, 0, millis);
- return 0;
+ return 0L;
case WM_RBUTTONDOWN:
handleMouseButton(1, 1, millis);
- return 0;
+ return 0L;
case WM_RBUTTONUP:
handleMouseButton(1, 0, millis);
- return 0;
+ return 0L;
case WM_MBUTTONDOWN:
handleMouseButton(2, 1, millis);
- return 0;
+ return 0L;
case WM_MBUTTONUP:
handleMouseButton(2, 0, millis);
- return 0;
+ return 0L;
case WM_XBUTTONUP:
if((wParam >> 16) == XBUTTON1) {
handleMouseButton(3, 0, millis);
@@ -964,7 +989,7 @@
case WM_SYSCHAR:
case WM_CHAR:
handleChar(wParam, lParam, millis);
- return 0;
+ return 0L;
case WM_SYSKEYUP:
/* Fall through */
case WM_KEYUP:
@@ -985,17 +1010,17 @@
return defWindowProc(hwnd, msg, wParam, lParam);
case WM_QUIT:
close_requested = true;
- return 0;
+ return 0L;
case WM_SYSCOMMAND:
switch ((int)(wParam & 0xfff0)) {
case SC_KEYMENU:
case SC_MOUSEMENU:
case SC_SCREENSAVE:
case SC_MONITORPOWER:
- return 0;
+ return 0L;
case SC_CLOSE:
close_requested = true;
- return 0;
+ return 0L;
default:
break;
}
@@ -1015,7 +1040,7 @@
handleMouseButton(captureMouse, 0, millis);
captureMouse = -1;
}
- return 0;
+ return 0L;
case WM_WINDOWPOSCHANGED:
if(getWindowRect(hwnd, rect_buffer)) {
rect.copyFromBuffer(rect_buffer);
@@ -1024,12 +1049,12 @@
} else {
LWJGLUtil.log("WM_WINDOWPOSCHANGED: Unable to get window rect");
}
- return defWindowProc(hwnd, msg, wParam, lParam);
+ return defWindowProc(hwnd, msg, wParam, lParam);
default:
return defWindowProc(hwnd, msg, wParam, lParam);
}
}
-
+
private native boolean getWindowRect(long hwnd, IntBuffer rectBuffer);
public int getX() {
@@ -1056,8 +1081,8 @@
public void setResizable(boolean resizable) {
if(this.resizable != resizable) {
- long style = getWindowLongPtr(hwnd, GWL_STYLE);
- long styleex = getWindowLongPtr(hwnd, GWL_EXSTYLE);
+ int style = (int)getWindowLongPtr(hwnd, GWL_STYLE);
+ int styleex = (int)getWindowLongPtr(hwnd, GWL_EXSTYLE);
// update frame style
if(resizable && !Display.isFullscreen()) {
@@ -1082,7 +1107,7 @@
this.resizable = resizable;
}
- private native boolean adjustWindowRectEx(IntBuffer rectBuffer, long style, boolean menu, long styleex);
+ private native boolean adjustWindowRectEx(IntBuffer rectBuffer, int style, boolean menu, int styleex);
public boolean wasResized() {
if(resized) {
Modified: trunk/LWJGL/src/java/org/lwjgl/util/generator/NativeMethodStubsGenerator.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/util/generator/NativeMethodStubsGenerator.java 2013-01-25 15:39:08 UTC (rev 3838)
+++ trunk/LWJGL/src/java/org/lwjgl/util/generator/NativeMethodStubsGenerator.java 2013-01-29 21:02:52 UTC (rev 3839)
@@ -324,7 +324,7 @@
// Declare loop counters and allocate object array
if ( !ptrLoopDeclared ) {
- writer.println("\tunsigned int " + n + "_i;");
+ writer.println("\tint " + n + "_i;");
writer.println("\tjobject " + n + "_object;");
ptrLoopDeclared = true;
}
@@ -336,7 +336,7 @@
// Declare loop counters and allocate string array
if ( !strLoopDeclared ) {
- writer.println("\tunsigned int " + n + "_i;");
+ writer.println("\tint " + n + "_i;");
writer.println("\t" + arrayType + n + "_address;");
strLoopDeclared = true;
}
Modified: trunk/LWJGL/src/native/common/common_tools.c
===================================================================
--- trunk/LWJGL/src/native/common/common_tools.c 2013-01-25 15:39:08 UTC (rev 3838)
+++ trunk/LWJGL/src/native/common/common_tools.c 2013-01-29 21:02:52 UTC (rev 3839)
@@ -227,11 +227,11 @@
const char *str = (const char *)ustr;
if (str == NULL)
return NULL;
- return NewStringNativeWithLength(env, str, strlen(str));
+ return NewStringNativeWithLength(env, str, (jsize)strlen(str));
}
// creates locale specific string
-jstring NewStringNativeWithLength(JNIEnv *env, const char *str, int length) {
+jstring NewStringNativeWithLength(JNIEnv *env, const char *str, jsize length) {
jclass jcls_str;
jmethodID jmethod_str;
jstring result;
@@ -330,7 +330,7 @@
}
bool getBooleanProperty(JNIEnv *env, const char* propertyName) {
- jstring property = NewStringNativeWithLength(env, propertyName, strlen(propertyName));
+ jstring property = NewStringNativeWithLength(env, propertyName, (jsize)strlen(propertyName));
jclass org_lwjgl_LWJGLUtil_class;
jmethodID getBoolean;
if (property == NULL)
Modified: trunk/LWJGL/src/native/common/common_tools.h
===================================================================
--- trunk/LWJGL/src/native/common/common_tools.h 2013-01-25 15:39:08 UTC (rev 3838)
+++ trunk/LWJGL/src/native/common/common_tools.h 2013-01-29 21:02:52 UTC (rev 3839)
@@ -75,18 +75,18 @@
return NULL;
}
-static inline jobject safeNewBuffer(JNIEnv *env, void *p, int size) {
+static inline jobject safeNewBuffer(JNIEnv *env, void *p, jlong capacity) {
if (p != NULL) {
#ifdef __cplusplus
- return env->NewDirectByteBuffer(p, size);
+ return env->NewDirectByteBuffer(p, capacity);
#else
- return (*env)->NewDirectByteBuffer(env, p, size);
+ return (*env)->NewDirectByteBuffer(env, p, capacity);
#endif
} else
return NULL;
}
-static inline jobject safeNewBufferCached(JNIEnv *env, void *p, int size, jobject old_buffer) {
+static inline jobject safeNewBufferCached(JNIEnv *env, void *p, jlong size, jobject old_buffer) {
if (old_buffer != NULL) {
void *old_buffer_address = (*env)->GetDirectBufferAddress(env, old_buffer);
jlong capacity = (*env)->GetDirectBufferCapacity(env, old_buffer);
@@ -141,7 +141,7 @@
extern void printfDebug(const char *format, ...);
extern bool getBooleanProperty(JNIEnv *env, const char* propertyName);
extern char * GetStringNativeChars(JNIEnv *env, jstring jstr);
-extern jstring NewStringNativeWithLength(JNIEnv *env, const char *str, int length);
+extern jstring NewStringNativeWithLength(JNIEnv *env, const char *str, jsize length);
extern jstring NewStringNativeUnsigned(JNIEnv *env, const unsigned char *str);
extern jobject NewReadOnlyDirectByteBuffer(JNIEnv* env, const void* address, jlong capacity);
extern jobject newJavaManagedByteBuffer(JNIEnv *env, const int size);
Modified: trunk/LWJGL/src/native/common/extcl.c
===================================================================
--- trunk/LWJGL/src/native/common/extcl.c 2013-01-25 15:39:08 UTC (rev 3838)
+++ trunk/LWJGL/src/native/common/extcl.c 2013-01-29 21:02:52 UTC (rev 3839)
@@ -59,7 +59,7 @@
ext_InitializeClass(env, clazz, &extcl_GetProcAddress, num_functions, functions);
}
-int extcl_CalculateImageSize(const size_t *region, size_t row_pitch, size_t slice_pitch) {
+size_t extcl_CalculateImageSize(const size_t *region, size_t row_pitch, size_t slice_pitch) {
if ( slice_pitch == 0 )
return region[1] * row_pitch;
else
Modified: trunk/LWJGL/src/native/common/extcl.h
===================================================================
--- trunk/LWJGL/src/native/common/extcl.h 2013-01-25 15:39:08 UTC (rev 3838)
+++ trunk/LWJGL/src/native/common/extcl.h 2013-01-29 21:02:52 UTC (rev 3839)
@@ -70,7 +70,7 @@
void* extcl_GetProcAddress(const char* function);
void extcl_InitializeClass(JNIEnv *env, jclass clazz, int num_functions, JavaMethodAndExtFunction *functions);
-int extcl_CalculateImageSize(const size_t *region, size_t row_pitch, size_t slice_pitch);
+size_t extcl_CalculateImageSize(const size_t *region, size_t row_pitch, size_t slice_pitch);
// -----------------[ Platform dependent functions ]-----------------
Modified: trunk/LWJGL/src/native/common/org_lwjgl_openal_ALC10.c
===================================================================
--- trunk/LWJGL/src/native/common/org_lwjgl_openal_ALC10.c 2013-01-25 15:39:08 UTC (rev 3838)
+++ trunk/LWJGL/src/native/common/org_lwjgl_openal_ALC10.c 2013-01-29 21:02:52 UTC (rev 3839)
@@ -83,7 +83,7 @@
*/
static jobject JNICALL Java_org_lwjgl_openal_ALC10_nalcGetString (JNIEnv *env, jclass clazz, jlong deviceaddress, jint token) {
char* alcString = (char*) alcGetString((ALCdevice*)((intptr_t)deviceaddress), (ALenum) token);
- int length;
+ size_t length;
int i=1;
if (alcString == NULL) {
Modified: trunk/LWJGL/src/native/common/org_lwjgl_opencl_CallbackUtil.c
===================================================================
--- trunk/LWJGL/src/native/common/org_lwjgl_opencl_CallbackUtil.c 2013-01-25 15:39:08 UTC (rev 3838)
+++ trunk/LWJGL/src/native/common/org_lwjgl_opencl_CallbackUtil.c 2013-01-29 21:02:52 UTC (rev 3839)
@@ -67,7 +67,7 @@
private_info_buffer = NewReadOnlyDirectByteBuffer(env, private_info, cb);
(*env)->CallVoidMethod(env, (jobject)user_data, contextCallbackJ,
- NewStringNativeWithLength(env, errinfo, strlen(errinfo)),
+ NewStringNativeWithLength(env, errinfo, (jsize)strlen(errinfo)),
private_info_buffer
);
}
Modified: trunk/LWJGL/src/native/windows/opengl/context.c
===================================================================
--- trunk/LWJGL/src/native/windows/opengl/context.c 2013-01-25 15:39:08 UTC (rev 3838)
+++ trunk/LWJGL/src/native/windows/opengl/context.c 2013-01-29 21:02:52 UTC (rev 3839)
@@ -118,7 +118,7 @@
windowflags = WS_POPUP;
} else if (child_window) {
exstyle = 0;
- windowflags = WS_CHILDWINDOW;
+ windowflags = WS_POPUP;
} else {
exstyle = WS_EX_APPWINDOW;
windowflags = WS_OVERLAPPED | WS_BORDER | WS_CAPTION | WS_MINIMIZEBOX | WS_SYSMENU;
Modified: trunk/LWJGL/src/native/windows/org_lwjgl_opengl_Display.c
===================================================================
--- trunk/LWJGL/src/native/windows/org_lwjgl_opengl_Display.c 2013-01-25 15:39:08 UTC (rev 3838)
+++ trunk/LWJGL/src/native/windows/org_lwjgl_opengl_Display.c 2013-01-29 21:02:52 UTC (rev 3839)
@@ -53,6 +53,9 @@
#define WINDOWCLASSNAME _T("LWJGL")
+static jclass windowsDisplayClass;
+static jmethodID javaWindowProc;
+
/*
* WindowProc for the GL window.
*/
@@ -61,10 +64,12 @@
WPARAM wParam,
LPARAM lParam)
{
+ /*
jclass display_class;
jclass display_class_global;
jmethodID handleMessage_method;
LONG message_time;
+ */
JNIEnv *env = getThreadEnv();
if (env != NULL && !(*env)->ExceptionOccurred(env)) {
/*
@@ -80,6 +85,8 @@
* a window is created, where we are sure that the calling class' classloader has
* LWJGL classes in it.
*/
+
+ /*
display_class_global = (jclass)(LONG_PTR)GetWindowLongPtr(hWnd, GWLP_USERDATA);
if (display_class_global == NULL) {
display_class = (*env)->FindClass(env, "org/lwjgl/opengl/WindowsDisplay");
@@ -91,15 +98,27 @@
}
if (display_class_global != NULL) {
message_time = GetMessageTime();
- handleMessage_method = (*env)->GetStaticMethodID(env, display_class_global, "handleMessage", "(JIJJJ)I");
+ handleMessage_method = (*env)->GetStaticMethodID(env, display_class_global, "handleMessage", "(JIJJJ)J");
if (handleMessage_method != NULL)
- return (*env)->CallStaticIntMethod(env, display_class_global, handleMessage_method, (jlong)(intptr_t)hWnd, (jint)msg, (jlong)wParam, (jlong)lParam, (jlong)message_time);
+ return (*env)->CallStaticLongMethod(env, display_class_global, handleMessage_method, (jlong)(intptr_t)hWnd, (jint)msg, (jlong)wParam, (jlong)lParam, (jlong)message_time);
+
}
+ */
+
+ return (*env)->CallStaticLongMethod(
+ env, windowsDisplayClass, javaWindowProc,
+ (jlong)(intptr_t)hWnd, (jint)msg, (jlong)wParam, (jlong)lParam, (jlong)GetMessageTime()
+ );
}
return DefWindowProc(hWnd, msg, wParam, lParam);
}
-JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_WindowsDisplay_defWindowProc(JNIEnv *env, jclass unused, jlong hWnd, jint msg, jlong wParam, jlong lParam) {
+JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsDisplay_setWindowProc(JNIEnv *env, jclass clazz, jobject method) {
+ windowsDisplayClass = clazz;
+ javaWindowProc = (*env)->FromReflectedMethod(env, method);
+}
+
+JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_WindowsDisplay_defWindowProc(JNIEnv *env, jclass unused, jlong hWnd, jint msg, jlong wParam, jlong lParam) {
return DefWindowProc((HWND)(INT_PTR)hWnd, msg, wParam, lParam);
}
@@ -167,6 +186,10 @@
return (INT_PTR)hwnd;
}
+JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_WindowsDisplay_nGetParent(JNIEnv *env, jclass clazz, jlong hwnd_ptr) {
+ return (INT_PTR)GetParent((HWND)(INT_PTR)hwnd_ptr);
+}
+
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsDisplay_nReleaseDC(JNIEnv *env, jclass clazz, jlong hwnd_ptr, jlong hdc_ptr) {
HWND hwnd = (HWND)(INT_PTR)hwnd_ptr;
HDC hdc = (HDC)(INT_PTR)hdc_ptr;
@@ -309,6 +332,7 @@
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsDisplay_nReshape(JNIEnv *env, jclass unused, jlong hwnd_ptr, jint x, jint y, jint width, jint height, jboolean undecorated, jboolean child) {
HWND hwnd = (HWND)(INT_PTR)hwnd_ptr;
+ /*
DWORD exstyle, windowflags;
RECT clientSize;
@@ -329,11 +353,11 @@
);
SetWindowPos(hwnd, HWND_TOP, x, y, clientSize.right - clientSize.left, clientSize.bottom - clientSize.top, SWP_NOZORDER);
+ */
+ SetWindowPos(hwnd, HWND_TOP, x, y, width, height, SWP_NOZORDER | SWP_NOACTIVATE);
}
static HICON createWindowIcon(JNIEnv *env, jint *pixels, jint width, jint height) {
- unsigned char col;
- unsigned char mask;
BITMAPV5HEADER bitmapInfo;
HBITMAP cursorMask;
HBITMAP colorBitmap;
@@ -345,8 +369,6 @@
int imageSize;
unsigned char *maskPixels;
int widthInBytes;
- int leftShift;
- int maskPixelsOff;
int scanlineWidth;
HBITMAP colorDIB;
@@ -475,7 +497,7 @@
}
JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_WindowsDisplay_adjustWindowRectEx
- (JNIEnv *env, jclass unused, jobject rect_buffer, jlong style, jboolean menu, jlong styleex) {
+ (JNIEnv *env, jclass unused, jobject rect_buffer, jint style, jboolean menu, jint styleex) {
jboolean result;
RECT clientRect;
copyBufferToRect(env, rect_buffer, &clientRect);
Modified: trunk/LWJGL/src/native/windows/org_lwjgl_opengl_WindowsRegistry.c
===================================================================
--- trunk/LWJGL/src/native/windows/org_lwjgl_opengl_WindowsRegistry.c 2013-01-25 15:39:08 UTC (rev 3838)
+++ trunk/LWJGL/src/native/windows/org_lwjgl_opengl_WindowsRegistry.c 2013-01-29 21:02:52 UTC (rev 3839)
@@ -93,7 +93,7 @@
return NULL;
}
result[buf_size - 1] = '\0';
- java_result = NewStringNativeWithLength(env, result, strlen(result));
+ java_result = NewStringNativeWithLength(env, result, (jsize)strlen(result));
free(result);
return java_result;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sp...@us...> - 2013-01-25 15:39:22
|
Revision: 3838
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3838&view=rev
Author: spasi
Date: 2013-01-25 15:39:08 +0000 (Fri, 25 Jan 2013)
Log Message:
-----------
Sync with recent Git changes.
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/opengl/AMDDebugOutputCallback.java
trunk/LWJGL/src/java/org/lwjgl/opengl/ARBDebugOutputCallback.java
trunk/LWJGL/src/java/org/lwjgl/opengl/KHRDebugCallback.java
trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsKeyboard.java
trunk/LWJGL/src/java/org/lwjgl/test/opengl/VersionTest.java
trunk/LWJGL/src/java/org/lwjgl/util/generator/Utils.java
trunk/LWJGL/src/native/windows/org_lwjgl_opengl_WindowsKeyboard.c
trunk/LWJGL/src/templates/org/lwjgl/opencl/CL10.java
trunk/LWJGL/src/templates/org/lwjgl/opencl/CL12.java
trunk/LWJGL/src/templates/org/lwjgl/opengl/AMD_multi_draw_indirect.java
trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_ES2_compatibility.java
trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_draw_indirect.java
trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_multi_draw_indirect.java
trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_texture_compression_rgtc.java
trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_texture_storage.java
trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_vertex_attrib_64bit.java
trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_direct_state_access.java
trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_vertex_attrib_64bit.java
trunk/LWJGL/src/templates/org/lwjgl/opengl/GL30.java
trunk/LWJGL/src/templates/org/lwjgl/opengl/GL40.java
trunk/LWJGL/src/templates/org/lwjgl/opengl/GL41.java
trunk/LWJGL/src/templates/org/lwjgl/opengl/GL43.java
trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_gpu_shader5.java
trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_vertex_attrib_integer_64bit.java
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/AMDDebugOutputCallback.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/AMDDebugOutputCallback.java 2012-12-19 12:38:50 UTC (rev 3837)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/AMDDebugOutputCallback.java 2013-01-25 15:39:08 UTC (rev 3838)
@@ -110,7 +110,7 @@
description = "OTHER";
break;
default:
- description = "Unknown (" + Integer.toHexString(category) + ")";
+ description = printUnknownToken(category);
}
System.err.println("\tCategory: " + description);
@@ -125,12 +125,16 @@
description = "LOW";
break;
default:
- description = "Unknown (" + Integer.toHexString(category) + ")";
+ description = printUnknownToken(severity);
}
System.err.println("\tSeverity: " + description);
System.err.println("\tMessage: " + message);
}
+
+ private String printUnknownToken(final int token) {
+ return "Unknown (0x" + Integer.toHexString(token).toUpperCase() + ")";
+ }
});
}
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/ARBDebugOutputCallback.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/ARBDebugOutputCallback.java 2012-12-19 12:38:50 UTC (rev 3837)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/ARBDebugOutputCallback.java 2013-01-25 15:39:08 UTC (rev 3838)
@@ -113,7 +113,7 @@
description = "OTHER";
break;
default:
- description = "Unknown (" + Integer.toHexString(source) + ")";
+ description = printUnknownToken(source);
}
System.err.println("\tSource: " + description);
@@ -137,7 +137,7 @@
description = "OTHER";
break;
default:
- description = "Unknown (" + Integer.toHexString(source) + ")";
+ description = printUnknownToken(type);
}
System.err.println("\tType: " + description);
@@ -152,12 +152,16 @@
description = "LOW";
break;
default:
- description = "Unknown (" + Integer.toHexString(source) + ")";
+ description = printUnknownToken(severity);
}
System.err.println("\tSeverity: " + description);
System.err.println("\tMessage: " + message);
}
+
+ private String printUnknownToken(final int token) {
+ return "Unknown (0x" + Integer.toHexString(token).toUpperCase() + ")";
+ }
});
}
@@ -184,9 +188,9 @@
/**
* This method will be called when an ARB_debug_output message is generated.
*
- * @param id the message ID
* @param source the message source
* @param type the message type
+ * @param id the message ID
* @param severity the message severity
* @param message the string representation of the message.
*/
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/KHRDebugCallback.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/KHRDebugCallback.java 2012-12-19 12:38:50 UTC (rev 3837)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/KHRDebugCallback.java 2013-01-25 15:39:08 UTC (rev 3838)
@@ -115,7 +115,7 @@
description = "OTHER";
break;
default:
- description = "Unknown (" + Integer.toHexString(source) + ")";
+ description = printUnknownToken(source);
}
System.err.println("\tSource: " + description);
@@ -142,7 +142,7 @@
description = "MARKER";
break;
default:
- description = "Unknown (" + Integer.toHexString(source) + ")";
+ description = printUnknownToken(type);
}
System.err.println("\tType: " + description);
@@ -160,12 +160,16 @@
description = "NOTIFICATION";
break;
default:
- description = "Unknown (" + Integer.toHexString(source) + ")";
+ description = printUnknownToken(severity);
}
System.err.println("\tSeverity: " + description);
System.err.println("\tMessage: " + message);
}
+
+ private String printUnknownToken(final int token) {
+ return "Unknown (0x" + Integer.toHexString(token).toUpperCase() + ")";
+ }
});
}
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsKeyboard.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsKeyboard.java 2012-12-19 12:38:50 UTC (rev 3837)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsKeyboard.java 2013-01-25 15:39:08 UTC (rev 3838)
@@ -39,7 +39,6 @@
import java.nio.ByteBuffer;
import java.nio.CharBuffer;
-import org.lwjgl.BufferUtils;
import org.lwjgl.LWJGLException;
import org.lwjgl.input.Keyboard;
@@ -97,8 +96,8 @@
private static native int ToUnicode(int wVirtKey, int wScanCode, ByteBuffer lpKeyState, CharBuffer pwszBuff, int cchBuff, int flags);
private static native int ToAscii(int wVirtKey, int wScanCode, ByteBuffer lpKeyState, ByteBuffer lpChar, int flags);
private static native int GetKeyboardState(ByteBuffer lpKeyState);
- private static native int GetKeyState(int virt_key);
- private static native int GetAsyncKeyState(int virt_key);
+ private static native short GetKeyState(int virt_key);
+ private static native short GetAsyncKeyState(int virt_key);
private void putEvent(int keycode, byte state, int ch, long millis, boolean repeat) {
tmp_event.clear();
@@ -154,10 +153,6 @@
return (state & 1) == 1;
}
- private static boolean isKeyPressedAsync(int state) {
- return (state >>> 31) == 1;
- }
-
public void handleKey(int virt_key, int scan_code, boolean extended, byte event_state, long millis, boolean repeat) {
virt_key = translateExtended(virt_key, scan_code, event_state, extended);
if ( !repeat && isKeyPressed(event_state) == isKeyPressed(virt_key_down_buffer[virt_key]) )
@@ -180,7 +175,7 @@
public void fireLostKeyEvents() {
for ( int i = 0; i < virt_key_down_buffer.length; i++ ) {
- if ( isKeyPressed(virt_key_down_buffer[i]) && !isKeyPressedAsync(GetAsyncKeyState(i)) )
+ if ( isKeyPressed(virt_key_down_buffer[i]) && (GetAsyncKeyState(i) & 0x8000) == 0 )
handleKey(i, 0, false, (byte)0, System.currentTimeMillis(), false);
}
}
Modified: trunk/LWJGL/src/java/org/lwjgl/test/opengl/VersionTest.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/test/opengl/VersionTest.java 2012-12-19 12:38:50 UTC (rev 3837)
+++ trunk/LWJGL/src/java/org/lwjgl/test/opengl/VersionTest.java 2013-01-25 15:39:08 UTC (rev 3838)
@@ -120,6 +120,7 @@
boolean deprecated = false;
try {
glVertex3f(0.0f, 0.0f, 0.0f);
+ Util.checkGLError();
deprecated = true;
} catch (Throwable t) {}
Modified: trunk/LWJGL/src/java/org/lwjgl/util/generator/Utils.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/util/generator/Utils.java 2012-12-19 12:38:50 UTC (rev 3837)
+++ trunk/LWJGL/src/java/org/lwjgl/util/generator/Utils.java 2013-01-25 15:39:08 UTC (rev 3838)
@@ -233,6 +233,10 @@
}
public static String getQualifiedNativeMethodName(String qualified_class_name, String method_name) {
+ // Escape '_' in method name
+ if ( method_name.indexOf('_') != -1 )
+ method_name = method_name.replace("_", "_1");
+
return "Java_" + getNativeQualifiedName(qualified_class_name) + "_" + method_name;
}
Modified: trunk/LWJGL/src/native/windows/org_lwjgl_opengl_WindowsKeyboard.c
===================================================================
--- trunk/LWJGL/src/native/windows/org_lwjgl_opengl_WindowsKeyboard.c 2012-12-19 12:38:50 UTC (rev 3837)
+++ trunk/LWJGL/src/native/windows/org_lwjgl_opengl_WindowsKeyboard.c 2013-01-25 15:39:08 UTC (rev 3838)
@@ -41,11 +41,11 @@
#include <jni.h>
#include "org_lwjgl_opengl_WindowsKeyboard.h"
-JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_WindowsKeyboard_GetKeyState(JNIEnv *env, jclass unused, jint virt_key) {
+JNIEXPORT jshort JNICALL Java_org_lwjgl_opengl_WindowsKeyboard_GetKeyState(JNIEnv *env, jclass unused, jint virt_key) {
return GetKeyState(virt_key);
}
-JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_WindowsKeyboard_GetAsyncKeyState(JNIEnv *env, jclass unused, jint virt_key) {
+JNIEXPORT jshort JNICALL Java_org_lwjgl_opengl_WindowsKeyboard_GetAsyncKeyState(JNIEnv *env, jclass unused, jint virt_key) {
return GetAsyncKeyState(virt_key);
}
Modified: trunk/LWJGL/src/templates/org/lwjgl/opencl/CL10.java
===================================================================
--- trunk/LWJGL/src/templates/org/lwjgl/opencl/CL10.java 2012-12-19 12:38:50 UTC (rev 3837)
+++ trunk/LWJGL/src/templates/org/lwjgl/opencl/CL10.java 2013-01-25 15:39:08 UTC (rev 3838)
@@ -1149,11 +1149,11 @@
@Private
@PointerWrapper("void *")
- CLFunctionAddress clGetExtensionFunctionAddress(@Check("1") @Const @cl_char ByteBuffer func_name);
+ CLFunctionAddress clGetExtensionFunctionAddress(@NullTerminated @Const @cl_char ByteBuffer func_name);
@Alternate("clGetExtensionFunctionAddress")
@Private
@PointerWrapper("void *")
- CLFunctionAddress clGetExtensionFunctionAddress(CharSequence func_name);
+ CLFunctionAddress clGetExtensionFunctionAddress(@NullTerminated CharSequence func_name);
}
\ No newline at end of file
Modified: trunk/LWJGL/src/templates/org/lwjgl/opencl/CL12.java
===================================================================
--- trunk/LWJGL/src/templates/org/lwjgl/opencl/CL12.java 2012-12-19 12:38:50 UTC (rev 3837)
+++ trunk/LWJGL/src/templates/org/lwjgl/opencl/CL12.java 2013-01-25 15:39:08 UTC (rev 3838)
@@ -435,12 +435,12 @@
@Private
@PointerWrapper("void *")
CLFunctionAddress clGetExtensionFunctionAddressForPlatform(@PointerWrapper("cl_platform_id") CLPlatform platform,
- @Check("1") @Const @cl_char ByteBuffer func_name);
+ @NullTerminated @Const @cl_char ByteBuffer func_name);
@Alternate("clGetExtensionFunctionAddressForPlatform")
@Private
@PointerWrapper("void *")
CLFunctionAddress clGetExtensionFunctionAddressForPlatform(@PointerWrapper("cl_platform_id") CLPlatform platform,
- CharSequence func_name);
+ @NullTerminated CharSequence func_name);
}
\ No newline at end of file
Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/AMD_multi_draw_indirect.java
===================================================================
--- trunk/LWJGL/src/templates/org/lwjgl/opengl/AMD_multi_draw_indirect.java 2012-12-19 12:38:50 UTC (rev 3837)
+++ trunk/LWJGL/src/templates/org/lwjgl/opengl/AMD_multi_draw_indirect.java 2013-01-25 15:39:08 UTC (rev 3838)
@@ -44,26 +44,26 @@
public interface AMD_multi_draw_indirect {
void glMultiDrawArraysIndirectAMD(@GLenum int mode,
- @BufferObject(BufferKind.IndirectBO) @Check("4 * primcount") @Const @GLvoid ByteBuffer indirect,
+ @BufferObject(BufferKind.IndirectBO) @Check("(stride == 0 ? 4 * 4 : stride) * primcount") @Const @GLvoid ByteBuffer indirect,
@GLsizei int primcount,
@GLsizei int stride);
@Alternate("glMultiDrawArraysIndirectAMD")
void glMultiDrawArraysIndirectAMD(@GLenum int mode,
- @BufferObject(BufferKind.IndirectBO) @Check("4 * primcount") @Const @GLvoid(PrimitiveType.Kind.INT) IntBuffer indirect,
+ @BufferObject(BufferKind.IndirectBO) @Check("(stride == 0 ? 4 : stride >> 2) * primcount") @Const @GLvoid(PrimitiveType.Kind.INT) IntBuffer indirect,
@GLsizei int primcount,
@GLsizei int stride);
void glMultiDrawElementsIndirectAMD(@GLenum int mode,
@GLenum int type,
- @BufferObject(BufferKind.IndirectBO) @Check("5 * primcount") @Const @GLvoid ByteBuffer indirect,
+ @BufferObject(BufferKind.IndirectBO) @Check("(stride == 0 ? 5 * 4 : stride) * primcount") @Const @GLvoid ByteBuffer indirect,
@GLsizei int primcount,
@GLsizei int stride);
@Alternate("glMultiDrawElementsIndirectAMD")
void glMultiDrawElementsIndirectAMD(@GLenum int mode,
@GLenum int type,
- @BufferObject(BufferKind.IndirectBO) @Check("5 * primcount") @Const @GLvoid(PrimitiveType.Kind.INT) IntBuffer indirect,
+ @BufferObject(BufferKind.IndirectBO) @Check("(stride == 0 ? 5 : stride >> 2) * primcount") @Const @GLvoid(PrimitiveType.Kind.INT) IntBuffer indirect,
@GLsizei int primcount,
@GLsizei int stride);
Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_ES2_compatibility.java
===================================================================
--- trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_ES2_compatibility.java 2012-12-19 12:38:50 UTC (rev 3837)
+++ trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_ES2_compatibility.java 2013-01-25 15:39:08 UTC (rev 3838)
@@ -65,6 +65,9 @@
GL_MEDIUM_INT = 0x8DF4,
GL_HIGH_INT = 0x8DF5;
+ /** Accepted by the <format> parameter of most commands taking sized internal formats: */
+ int GL_RGB565 = 0x8D62;
+
@Reuse("GL41")
void glReleaseShaderCompiler();
Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_draw_indirect.java
===================================================================
--- trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_draw_indirect.java 2012-12-19 12:38:50 UTC (rev 3837)
+++ trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_draw_indirect.java 2013-01-25 15:39:08 UTC (rev 3838)
@@ -58,17 +58,17 @@
int GL_DRAW_INDIRECT_BUFFER_BINDING = 0x8F43;
@Reuse("GL40")
- void glDrawArraysIndirect(@GLenum int mode, @BufferObject(BufferKind.IndirectBO) @Check("4") @NullTerminated @Const @GLvoid ByteBuffer indirect);
+ void glDrawArraysIndirect(@GLenum int mode, @BufferObject(BufferKind.IndirectBO) @Check("4 * 4") @Const @GLvoid ByteBuffer indirect);
@Reuse("GL40")
@Alternate("glDrawArraysIndirect")
- void glDrawArraysIndirect(@GLenum int mode, @BufferObject(BufferKind.IndirectBO) @Check("4") @NullTerminated @Const @GLvoid(PrimitiveType.Kind.INT) IntBuffer indirect);
+ void glDrawArraysIndirect(@GLenum int mode, @BufferObject(BufferKind.IndirectBO) @Check("4") @Const @GLvoid(PrimitiveType.Kind.INT) IntBuffer indirect);
@Reuse("GL40")
- void glDrawElementsIndirect(@GLenum int mode, @GLenum int type, @BufferObject(BufferKind.IndirectBO) @Check("5") @NullTerminated @Const @GLvoid ByteBuffer indirect);
+ void glDrawElementsIndirect(@GLenum int mode, @GLenum int type, @BufferObject(BufferKind.IndirectBO) @Check("5 * 4") @Const @GLvoid ByteBuffer indirect);
@Reuse("GL40")
@Alternate("glDrawElementsIndirect")
- void glDrawElementsIndirect(@GLenum int mode, @GLenum int type, @BufferObject(BufferKind.IndirectBO) @Check("5") @NullTerminated @Const @GLvoid(PrimitiveType.Kind.INT) IntBuffer indirect);
+ void glDrawElementsIndirect(@GLenum int mode, @GLenum int type, @BufferObject(BufferKind.IndirectBO) @Check("5") @Const @GLvoid(PrimitiveType.Kind.INT) IntBuffer indirect);
}
\ No newline at end of file
Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_multi_draw_indirect.java
===================================================================
--- trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_multi_draw_indirect.java 2012-12-19 12:38:50 UTC (rev 3837)
+++ trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_multi_draw_indirect.java 2013-01-25 15:39:08 UTC (rev 3838)
@@ -45,21 +45,21 @@
@Reuse("GL43")
void glMultiDrawArraysIndirect(@GLenum int mode,
- @BufferObject(BufferKind.IndirectBO) @Check("4 * 4 * primcount") @Const @GLvoid ByteBuffer indirect,
+ @BufferObject(BufferKind.IndirectBO) @Check("(stride == 0 ? 4 * 4 : stride) * primcount") @Const @GLvoid ByteBuffer indirect,
@GLsizei int primcount,
@GLsizei int stride);
@Reuse("GL43")
@Alternate("glMultiDrawArraysIndirect")
void glMultiDrawArraysIndirect(@GLenum int mode,
- @BufferObject(BufferKind.IndirectBO) @Check("4 * primcount") @Const @GLvoid(PrimitiveType.Kind.INT) IntBuffer indirect,
+ @BufferObject(BufferKind.IndirectBO) @Check("(stride == 0 ? 4 : stride >> 2) * primcount") @Const @GLvoid(PrimitiveType.Kind.INT) IntBuffer indirect,
@GLsizei int primcount,
@GLsizei int stride);
@Reuse("GL43")
void glMultiDrawElementsIndirect(@GLenum int mode,
@GLenum int type,
- @BufferObject(BufferKind.IndirectBO) @Check("5 * primcount") @Const @GLvoid ByteBuffer indirect,
+ @BufferObject(BufferKind.IndirectBO) @Check("(stride == 0 ? 5 * 4 : stride) * primcount") @Const @GLvoid ByteBuffer indirect,
@GLsizei int primcount,
@GLsizei int stride);
@@ -67,7 +67,7 @@
@Alternate("glMultiDrawElementsIndirect")
void glMultiDrawElementsIndirect(@GLenum int mode,
@GLenum int type,
- @BufferObject(BufferKind.IndirectBO) @Check("5 * primcount") @Const @GLvoid(PrimitiveType.Kind.INT) IntBuffer indirect,
+ @BufferObject(BufferKind.IndirectBO) @Check("(stride == 0 ? 5 : stride >> 2) * primcount") @Const @GLvoid(PrimitiveType.Kind.INT) IntBuffer indirect,
@GLsizei int primcount,
@GLsizei int stride);
Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_texture_compression_rgtc.java
===================================================================
--- trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_texture_compression_rgtc.java 2012-12-19 12:38:50 UTC (rev 3837)
+++ trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_texture_compression_rgtc.java 2013-01-25 15:39:08 UTC (rev 3838)
@@ -41,9 +41,9 @@
* CopyTexImage2D, and CompressedTexImage2D and the <format> parameter
* of CompressedTexSubImage2D:
*/
- int GL_COMPRESSED_RED_RGTC1 = 0x8DBB;
- int GL_COMPRESSED_SIGNED_RED_RGTC1 = 0x8DBC;
- int GL_COMPRESSED_RED_GREEN_RGTC2 = 0x8DBD;
- int GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2 = 0x8DBE;
+ int GL_COMPRESSED_RED_RGTC1 = 0x8DBB,
+ GL_COMPRESSED_SIGNED_RED_RGTC1 = 0x8DBC,
+ GL_COMPRESSED_RG_RGTC2 = 0x8DBD,
+ GL_COMPRESSED_SIGNED_RG_RGTC2 = 0x8DBE;
}
\ No newline at end of file
Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_texture_storage.java
===================================================================
--- trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_texture_storage.java 2012-12-19 12:38:50 UTC (rev 3837)
+++ trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_texture_storage.java 2013-01-25 15:39:08 UTC (rev 3838)
@@ -60,17 +60,17 @@
@GLenum int internalformat,
@GLsizei int width, @GLsizei int height, @GLsizei int depth);
- @Dependent("EXT_direct_state_access")
+ @Dependent("GL_EXT_direct_state_access")
void glTextureStorage1DEXT(@GLuint int texture, @GLenum int target, @GLsizei int levels,
@GLenum int internalformat,
@GLsizei int width);
- @Dependent("EXT_direct_state_access")
+ @Dependent("GL_EXT_direct_state_access")
void glTextureStorage2DEXT(@GLuint int texture, @GLenum int target, @GLsizei int levels,
@GLenum int internalformat,
@GLsizei int width, @GLsizei int height);
- @Dependent("EXT_direct_state_access")
+ @Dependent("GL_EXT_direct_state_access")
void glTextureStorage3DEXT(@GLuint int texture, @GLenum int target, @GLsizei int levels,
@GLenum int internalformat,
@GLsizei int width, @GLsizei int height, @GLsizei int depth);
Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_vertex_attrib_64bit.java
===================================================================
--- trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_vertex_attrib_64bit.java 2012-12-19 12:38:50 UTC (rev 3837)
+++ trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_vertex_attrib_64bit.java 2013-01-25 15:39:08 UTC (rev 3838)
@@ -93,7 +93,7 @@
@StripPostfix("params")
void glGetVertexAttribLdv(@GLuint int index, @GLenum int pname, @OutParameter @Check("4") DoubleBuffer params);
- @Dependent("EXT_direct_state_access")
+ @Dependent("GL_EXT_direct_state_access")
void glVertexArrayVertexAttribLOffsetEXT(@GLuint int vaobj, @GLuint int buffer, @GLuint int index, int size, @GLenum int type, @GLsizei int stride, @GLintptr long offset);
}
\ No newline at end of file
Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_direct_state_access.java
===================================================================
--- trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_direct_state_access.java 2012-12-19 12:38:50 UTC (rev 3837)
+++ trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_direct_state_access.java 2013-01-25 15:39:08 UTC (rev 3838)
@@ -1353,13 +1353,13 @@
framebuffer"
*/
- @Dependent("GL_EXT_geometry_shader4,NV_geometry_program4")
+ @Dependent("GL_EXT_geometry_shader4,GL_NV_geometry_program4")
void glNamedFramebufferTextureEXT(@GLuint int framebuffer, @GLenum int attachment, @GLuint int texture, int level);
- @Dependent("GL_EXT_geometry_shader4,NV_geometry_program4")
+ @Dependent("GL_EXT_geometry_shader4,GL_NV_geometry_program4")
void glNamedFramebufferTextureLayerEXT(@GLuint int framebuffer, @GLenum int attachment, @GLuint int texture, int level, int layer);
- @Dependent("GL_EXT_geometry_shader4,NV_geometry_program4")
+ @Dependent("GL_EXT_geometry_shader4,GL_NV_geometry_program4")
void glNamedFramebufferTextureFaceEXT(@GLuint int framebuffer, @GLenum int attachment, @GLuint int texture, int level, @GLenum int face);
/*
Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_vertex_attrib_64bit.java
===================================================================
--- trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_vertex_attrib_64bit.java 2012-12-19 12:38:50 UTC (rev 3837)
+++ trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_vertex_attrib_64bit.java 2013-01-25 15:39:08 UTC (rev 3838)
@@ -83,7 +83,7 @@
void glGetVertexAttribLdvEXT(@GLuint int index, @GLenum int pname, @OutParameter @Check("4") DoubleBuffer params);
@Reuse("ARBVertexAttrib64bit")
- @Dependent("EXT_direct_state_access")
+ @Dependent("GL_EXT_direct_state_access")
void glVertexArrayVertexAttribLOffsetEXT(@GLuint int vaobj, @GLuint int buffer, @GLuint int index, int size, @GLenum int type, @GLsizei int stride, @GLintptr long offset);
}
\ No newline at end of file
Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/GL30.java
===================================================================
--- trunk/LWJGL/src/templates/org/lwjgl/opengl/GL30.java 2012-12-19 12:38:50 UTC (rev 3837)
+++ trunk/LWJGL/src/templates/org/lwjgl/opengl/GL30.java 2013-01-25 15:39:08 UTC (rev 3838)
@@ -319,7 +319,7 @@
void glClampColor(@GLenum int target, @GLenum int clamp);
// ----------------------------------------------------------------------
- // ----------------------[ NV_depth_buffer_float ]----------------------
+ // ----------------------[ ARB_depth_buffer_float ]----------------------
// ----------------------------------------------------------------------
/**
@@ -328,8 +328,8 @@
* and returned in the <data> parameter of GetTexLevelParameter and
* GetRenderbufferParameterivEXT:
*/
- int GL_DEPTH_COMPONENT32F = 0x8DAB;
- int GL_DEPTH32F_STENCIL8 = 0x8DAC;
+ int GL_DEPTH_COMPONENT32F = 0x8CAC;
+ int GL_DEPTH32F_STENCIL8 = 0x8CAD;
/**
* Accepted by the <type> parameter of DrawPixels, ReadPixels, TexImage1D,
@@ -876,10 +876,10 @@
* CopyTexImage2D, and CompressedTexImage2D and the <format> parameter
* of CompressedTexSubImage2D:
*/
- int GL_COMPRESSED_RED_RGTC1 = 0x8DBB;
- int GL_COMPRESSED_SIGNED_RED_RGTC1 = 0x8DBC;
- int GL_COMPRESSED_RED_GREEN_RGTC2 = 0x8DBD;
- int GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2 = 0x8DBE;
+ int GL_COMPRESSED_RED_RGTC1 = 0x8DBB,
+ GL_COMPRESSED_SIGNED_RED_RGTC1 = 0x8DBC,
+ GL_COMPRESSED_RG_RGTC2 = 0x8DBD,
+ GL_COMPRESSED_SIGNED_RG_RGTC2 = 0x8DBE;
// --------------------------------------------------------------
// ----------------------[ ARB_texture_rg ]----------------------
Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/GL40.java
===================================================================
--- trunk/LWJGL/src/templates/org/lwjgl/opengl/GL40.java 2012-12-19 12:38:50 UTC (rev 3837)
+++ trunk/LWJGL/src/templates/org/lwjgl/opengl/GL40.java 2013-01-25 15:39:08 UTC (rev 3838)
@@ -75,15 +75,15 @@
*/
int GL_DRAW_INDIRECT_BUFFER_BINDING = 0x8F43;
- void glDrawArraysIndirect(@GLenum int mode, @BufferObject(BufferKind.IndirectBO) @Check("4") @NullTerminated @Const @GLvoid ByteBuffer indirect);
+ void glDrawArraysIndirect(@GLenum int mode, @BufferObject(BufferKind.IndirectBO) @Check("4 * 4") @Const @GLvoid ByteBuffer indirect);
@Alternate("glDrawArraysIndirect")
- void glDrawArraysIndirect(@GLenum int mode, @BufferObject(BufferKind.IndirectBO) @Check("4") @NullTerminated @Const @GLvoid(PrimitiveType.Kind.INT) IntBuffer indirect);
+ void glDrawArraysIndirect(@GLenum int mode, @BufferObject(BufferKind.IndirectBO) @Check("4") @Const @GLvoid(PrimitiveType.Kind.INT) IntBuffer indirect);
- void glDrawElementsIndirect(@GLenum int mode, @GLenum int type, @BufferObject(BufferKind.IndirectBO) @Check("5") @NullTerminated @Const @GLvoid ByteBuffer indirect);
+ void glDrawElementsIndirect(@GLenum int mode, @GLenum int type, @BufferObject(BufferKind.IndirectBO) @Check("5 * 4") @Const @GLvoid ByteBuffer indirect);
@Alternate("glDrawElementsIndirect")
- void glDrawElementsIndirect(@GLenum int mode, @GLenum int type, @BufferObject(BufferKind.IndirectBO) @Check("5") @NullTerminated @Const @GLvoid(PrimitiveType.Kind.INT) IntBuffer indirect);
+ void glDrawElementsIndirect(@GLenum int mode, @GLenum int type, @BufferObject(BufferKind.IndirectBO) @Check("5") @Const @GLvoid(PrimitiveType.Kind.INT) IntBuffer indirect);
// ---------------------------------------------------------------
// ----------------------[ ARB_gpu_shader5 ]----------------------
Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/GL41.java
===================================================================
--- trunk/LWJGL/src/templates/org/lwjgl/opengl/GL41.java 2012-12-19 12:38:50 UTC (rev 3837)
+++ trunk/LWJGL/src/templates/org/lwjgl/opengl/GL41.java 2013-01-25 15:39:08 UTC (rev 3838)
@@ -68,6 +68,9 @@
GL_MEDIUM_INT = 0x8DF4,
GL_HIGH_INT = 0x8DF5;
+ /** Accepted by the <format> parameter of most commands taking sized internal formats: */
+ int GL_RGB565 = 0x8D62;
+
void glReleaseShaderCompiler();
void glShaderBinary(@AutoSize("shaders") @GLsizei int count, @Const @GLuint IntBuffer shaders,
Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/GL43.java
===================================================================
--- trunk/LWJGL/src/templates/org/lwjgl/opengl/GL43.java 2012-12-19 12:38:50 UTC (rev 3837)
+++ trunk/LWJGL/src/templates/org/lwjgl/opengl/GL43.java 2013-01-25 15:39:08 UTC (rev 3838)
@@ -568,26 +568,26 @@
// -----------------------------------------------------------------------
void glMultiDrawArraysIndirect(@GLenum int mode,
- @BufferObject(BufferKind.IndirectBO) @Check("4 * 4 * primcount") @Const @GLvoid ByteBuffer indirect,
+ @BufferObject(BufferKind.IndirectBO) @Check("(stride == 0 ? 4 * 4 : stride) * primcount") @Const @GLvoid ByteBuffer indirect,
@GLsizei int primcount,
@GLsizei int stride);
@Alternate("glMultiDrawArraysIndirect")
void glMultiDrawArraysIndirect(@GLenum int mode,
- @BufferObject(BufferKind.IndirectBO) @Check("4 * primcount") @Const @GLvoid(PrimitiveType.Kind.INT) IntBuffer indirect,
+ @BufferObject(BufferKind.IndirectBO) @Check("(stride == 0 ? 4 : stride >> 2) * primcount") @Const @GLvoid(PrimitiveType.Kind.INT) IntBuffer indirect,
@GLsizei int primcount,
@GLsizei int stride);
void glMultiDrawElementsIndirect(@GLenum int mode,
@GLenum int type,
- @BufferObject(BufferKind.IndirectBO) @Check("5 * primcount") @Const @GLvoid ByteBuffer indirect,
+ @BufferObject(BufferKind.IndirectBO) @Check("(stride == 0 ? 5 * 4 : stride) * primcount") @Const @GLvoid ByteBuffer indirect,
@GLsizei int primcount,
@GLsizei int stride);
@Alternate("glMultiDrawElementsIndirect")
void glMultiDrawElementsIndirect(@GLenum int mode,
@GLenum int type,
- @BufferObject(BufferKind.IndirectBO) @Check("5 * primcount") @Const @GLvoid(PrimitiveType.Kind.INT) IntBuffer indirect,
+ @BufferObject(BufferKind.IndirectBO) @Check("(stride == 0 ? 5 : stride >> 2) * primcount") @Const @GLvoid(PrimitiveType.Kind.INT) IntBuffer indirect,
@GLsizei int primcount,
@GLsizei int stride);
Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_gpu_shader5.java
===================================================================
--- trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_gpu_shader5.java 2012-12-19 12:38:50 UTC (rev 3837)
+++ trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_gpu_shader5.java 2013-01-25 15:39:08 UTC (rev 3838)
@@ -127,59 +127,59 @@
// -------------
- @Dependent("EXT_direct_state_access")
+ @Dependent("GL_EXT_direct_state_access")
void glProgramUniform1i64NV(@GLuint int program, int location, @GLint64EXT long x);
- @Dependent("EXT_direct_state_access")
+ @Dependent("GL_EXT_direct_state_access")
void glProgramUniform2i64NV(@GLuint int program, int location, @GLint64EXT long x, @GLint64EXT long y);
- @Dependent("EXT_direct_state_access")
+ @Dependent("GL_EXT_direct_state_access")
void glProgramUniform3i64NV(@GLuint int program, int location, @GLint64EXT long x, @GLint64EXT long y, @GLint64EXT long z);
- @Dependent("EXT_direct_state_access")
+ @Dependent("GL_EXT_direct_state_access")
void glProgramUniform4i64NV(@GLuint int program, int location, @GLint64EXT long x, @GLint64EXT long y, @GLint64EXT long z, @GLint64EXT long w);
- @Dependent("EXT_direct_state_access")
+ @Dependent("GL_EXT_direct_state_access")
@StripPostfix("value")
void glProgramUniform1i64vNV(@GLuint int program, int location, @AutoSize("value") @GLsizei int count, @Const @GLint64EXT LongBuffer value);
- @Dependent("EXT_direct_state_access")
+ @Dependent("GL_EXT_direct_state_access")
@StripPostfix("value")
void glProgramUniform2i64vNV(@GLuint int program, int location, @AutoSize(value = "value", expression = " >> 1") @GLsizei int count, @Const @GLint64EXT LongBuffer value);
- @Dependent("EXT_direct_state_access")
+ @Dependent("GL_EXT_direct_state_access")
@StripPostfix("value")
void glProgramUniform3i64vNV(@GLuint int program, int location, @AutoSize(value = "value", expression = " / 3") @GLsizei int count, @Const @GLint64EXT LongBuffer value);
- @Dependent("EXT_direct_state_access")
+ @Dependent("GL_EXT_direct_state_access")
@StripPostfix("value")
void glProgramUniform4i64vNV(@GLuint int program, int location, @AutoSize(value = "value", expression = " >> 2") @GLsizei int count, @Const @GLint64EXT LongBuffer value);
- @Dependent("EXT_direct_state_access")
+ @Dependent("GL_EXT_direct_state_access")
void glProgramUniform1ui64NV(@GLuint int program, int location, @GLuint64EXT long x);
- @Dependent("EXT_direct_state_access")
+ @Dependent("GL_EXT_direct_state_access")
void glProgramUniform2ui64NV(@GLuint int program, int location, @GLuint64EXT long x, @GLuint64EXT long y);
- @Dependent("EXT_direct_state_access")
+ @Dependent("GL_EXT_direct_state_access")
void glProgramUniform3ui64NV(@GLuint int program, int location, @GLuint64EXT long x, @GLuint64EXT long y, @GLuint64EXT long z);
- @Dependent("EXT_direct_state_access")
+ @Dependent("GL_EXT_direct_state_access")
void glProgramUniform4ui64NV(@GLuint int program, int location, @GLuint64EXT long x, @GLuint64EXT long y, @GLuint64EXT long z, @GLuint64EXT long w);
- @Dependent("EXT_direct_state_access")
+ @Dependent("GL_EXT_direct_state_access")
@StripPostfix("value")
void glProgramUniform1ui64vNV(@GLuint int program, int location, @AutoSize("value") @GLsizei int count, @Const @GLuint64EXT LongBuffer value);
- @Dependent("EXT_direct_state_access")
+ @Dependent("GL_EXT_direct_state_access")
@StripPostfix("value")
void glProgramUniform2ui64vNV(@GLuint int program, int location, @AutoSize(value = "value", expression = " >> 1") @GLsizei int count, @Const @GLuint64EXT LongBuffer value);
- @Dependent("EXT_direct_state_access")
+ @Dependent("GL_EXT_direct_state_access")
@StripPostfix("value")
void glProgramUniform3ui64vNV(@GLuint int program, int location, @AutoSize(value = "value", expression = " / 3") @GLsizei int count, @Const @GLuint64EXT LongBuffer value);
- @Dependent("EXT_direct_state_access")
+ @Dependent("GL_EXT_direct_state_access")
@StripPostfix("value")
void glProgramUniform4ui64vNV(@GLuint int program, int location, @AutoSize(value = "value", expression = " >> 2") @GLsizei int count, @Const @GLuint64EXT LongBuffer value);
Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_vertex_attrib_integer_64bit.java
===================================================================
--- trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_vertex_attrib_integer_64bit.java 2012-12-19 12:38:50 UTC (rev 3837)
+++ trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_vertex_attrib_integer_64bit.java 2013-01-25 15:39:08 UTC (rev 3838)
@@ -92,7 +92,7 @@
@StripPostfix("params")
void glGetVertexAttribLui64vNV(@GLuint int index, @GLenum int pname, @OutParameter @GLuint64EXT @Check("4") LongBuffer params);
- @Dependent("NV_vertex_buffer_unified_memory")
+ @Dependent("GL_NV_vertex_buffer_unified_memory")
void glVertexAttribLFormatNV(@GLuint int index, int size, @GLenum int type, @GLsizei int stride);
}
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sp...@us...> - 2012-12-19 12:38:56
|
Revision: 3837
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3837&view=rev
Author: spasi
Date: 2012-12-19 12:38:50 +0000 (Wed, 19 Dec 2012)
Log Message:
-----------
Fixed commit error.
Modified Paths:
--------------
trunk/LWJGL/src/native/windows/opengl/context.c
Modified: trunk/LWJGL/src/native/windows/opengl/context.c
===================================================================
--- trunk/LWJGL/src/native/windows/opengl/context.c 2012-12-18 11:22:52 UTC (rev 3836)
+++ trunk/LWJGL/src/native/windows/opengl/context.c 2012-12-19 12:38:50 UTC (rev 3837)
@@ -224,7 +224,6 @@
putAttrib(&attrib_list, WGL_ACCELERATION_ARB); putAttrib(&attrib_list, WGL_FULL_ACCELERATION_ARB);
}
putAttrib(&attrib_list, WGL_PIXEL_TYPE_ARB); putAttrib(&attrib_list, pixel_type);
- putAttrib(&attrib_list, WGL_DOUBLE_BUFFER_ARB); putAttrib(&attrib_list, double_buffer ? TRUE : FALSE);
if ( double_buffer || samples == 0 ) {
// Skip this for FALSE + MSAA: NV drivers won't return any PixelFormat
putAttrib(&attrib_list, WGL_DOUBLE_BUFFER_ARB); putAttrib(&attrib_list, double_buffer ? TRUE : FALSE);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sp...@us...> - 2012-12-18 11:23:00
|
Revision: 3836
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3836&view=rev
Author: spasi
Date: 2012-12-18 11:22:52 +0000 (Tue, 18 Dec 2012)
Log Message:
-----------
Fixed BackgroundLoadTest to work on NV/Intel and improved context synchronization.
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/test/opengl/multithread/BackgroundLoader.java
Modified: trunk/LWJGL/src/java/org/lwjgl/test/opengl/multithread/BackgroundLoader.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/test/opengl/multithread/BackgroundLoader.java 2012-12-17 11:58:48 UTC (rev 3835)
+++ trunk/LWJGL/src/java/org/lwjgl/test/opengl/multithread/BackgroundLoader.java 2012-12-18 11:22:52 UTC (rev 3836)
@@ -40,26 +40,33 @@
import org.lwjgl.BufferUtils;
import org.lwjgl.LWJGLException;
import org.lwjgl.opengl.Drawable;
+import org.lwjgl.opengl.GLContext;
+import org.lwjgl.opengl.GLSync;
import org.lwjgl.util.Color;
import org.lwjgl.util.ReadableColor;
import java.nio.ByteBuffer;
+import java.util.concurrent.locks.ReentrantLock;
import static org.lwjgl.opengl.GL11.*;
+import static org.lwjgl.opengl.GL32.*;
abstract class BackgroundLoader {
- private static final int WIDTH = 32;
+ private static final int WIDTH = 32;
private static final int HEIGHT = 32;
- private static final Object lock = new Object();
+ // CPU synchronization
+ private final ReentrantLock lock = new ReentrantLock();
+ // GPU synchronization
+ private GLSync fence;
private Drawable drawable;
private boolean running;
private ByteBuffer texture;
- private int texID;
+ private int texID;
protected BackgroundLoader() {
running = true;
@@ -73,6 +80,9 @@
}
void start() throws LWJGLException {
+ // The shared context must be created on the main thread.
+ drawable = getDrawable();
+
new Thread(new Runnable() {
public void run() {
System.out.println("-- Background Thread started --");
@@ -86,7 +96,7 @@
}
try {
- drawable = getDrawable();
+ // Make the shared context current in the worker thread
drawable.makeCurrent();
} catch (LWJGLException e) {
throw new RuntimeException(e);
@@ -94,20 +104,30 @@
System.out.println("** Drawable created **");
- synchronized ( lock ) {
- // Create a "dummy" texture while we wait for texture IO
- createCheckerTexture(Color.RED, Color.WHITE, 2);
+ // Create a "dummy" texture while we wait for texture IO
+ createCheckerTexture(Color.RED, Color.WHITE, 2);
- texID = glGenTextures();
- glBindTexture(GL_TEXTURE_2D, texID);
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, WIDTH, HEIGHT, 0, GL_RGB, GL_UNSIGNED_BYTE, texture);
+ lock.lock();
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+ texID = glGenTextures();
+ glBindTexture(GL_TEXTURE_2D, texID);
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, WIDTH, HEIGHT, 0, GL_RGB, GL_UNSIGNED_BYTE, texture);
- glBindTexture(GL_TEXTURE_2D, 0);
- }
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+ glBindTexture(GL_TEXTURE_2D, 0);
+
+ // OpenGL commands from different contexts may be executed in any order. So we need a way to synchronize
+ final boolean useFences = GLContext.getCapabilities().OpenGL32;
+
+ if ( useFences )
+ fence = glFenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0);
+ else
+ glFlush(); // Best we can do without fences. This will force rendering on the main thread to happen after we upload the texture.
+
+ lock.unlock();
+
System.out.println("** Dummy texture created **");
long lastTextureCreated = System.currentTimeMillis(); // Delay first texture creation
@@ -129,14 +149,23 @@
else
createGradientTexture(Color.GREEN, Color.YELLOW);
+ lock.lock();
+
glBindTexture(GL_TEXTURE_2D, texID);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, WIDTH, HEIGHT, 0, GL_RGB, GL_UNSIGNED_BYTE, texture);
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glBindTexture(GL_TEXTURE_2D, 0);
+ if ( useFences )
+ fence = glFenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0);
+ else
+ glFlush();
+
+ lock.unlock();
+
System.out.println("** Created new gradient texture **");
lastTextureCreated = System.currentTimeMillis();
@@ -151,8 +180,15 @@
}
int getTexID() {
- synchronized ( lock ) {
+ lock.lock();
+ try {
+ if ( fence != null ) {
+ glWaitSync(fence, 0, GL_TIMEOUT_IGNORED);
+ fence = null;
+ }
return texID;
+ } finally {
+ lock.unlock();
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sp...@us...> - 2012-12-17 11:58:57
|
Revision: 3835
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3835&view=rev
Author: spasi
Date: 2012-12-17 11:58:48 +0000 (Mon, 17 Dec 2012)
Log Message:
-----------
Fixed pbuffer + MSAA pixel format config on NV drivers.
Modified Paths:
--------------
trunk/LWJGL/src/native/windows/opengl/context.c
Modified: trunk/LWJGL/src/native/windows/opengl/context.c
===================================================================
--- trunk/LWJGL/src/native/windows/opengl/context.c 2012-12-12 17:20:24 UTC (rev 3834)
+++ trunk/LWJGL/src/native/windows/opengl/context.c 2012-12-17 11:58:48 UTC (rev 3835)
@@ -225,6 +225,10 @@
}
putAttrib(&attrib_list, WGL_PIXEL_TYPE_ARB); putAttrib(&attrib_list, pixel_type);
putAttrib(&attrib_list, WGL_DOUBLE_BUFFER_ARB); putAttrib(&attrib_list, double_buffer ? TRUE : FALSE);
+ if ( double_buffer || samples == 0 ) {
+ // Skip this for FALSE + MSAA: NV drivers won't return any PixelFormat
+ putAttrib(&attrib_list, WGL_DOUBLE_BUFFER_ARB); putAttrib(&attrib_list, double_buffer ? TRUE : FALSE);
+ }
putAttrib(&attrib_list, WGL_SUPPORT_OPENGL_ARB); putAttrib(&attrib_list, TRUE);
putAttrib(&attrib_list, WGL_RED_BITS_ARB); putAttrib(&attrib_list, bpe);
putAttrib(&attrib_list, WGL_GREEN_BITS_ARB); putAttrib(&attrib_list, bpe);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sp...@us...> - 2012-12-12 17:20:39
|
Revision: 3834
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3834&view=rev
Author: spasi
Date: 2012-12-12 17:20:24 +0000 (Wed, 12 Dec 2012)
Log Message:
-----------
Fixed put on external ByteBuffer. Generate @Deprecated annotation for deprecated methods.
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/PointerBuffer.java
trunk/LWJGL/src/java/org/lwjgl/util/generator/JavaMethodsGenerator.java
Modified: trunk/LWJGL/src/java/org/lwjgl/PointerBuffer.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/PointerBuffer.java 2012-12-02 16:53:25 UTC (rev 3833)
+++ trunk/LWJGL/src/java/org/lwjgl/PointerBuffer.java 2012-12-12 17:20:24 UTC (rev 3834)
@@ -550,9 +550,9 @@
*/
public static void put(final ByteBuffer target, int index, long l) {
if ( is64Bit )
- target.putLong(index * 8, l);
+ target.putLong(index, l);
else
- target.putInt(index * 4, (int)l);
+ target.putInt(index, (int)l);
}
// -- Bulk get operations --
Modified: trunk/LWJGL/src/java/org/lwjgl/util/generator/JavaMethodsGenerator.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/util/generator/JavaMethodsGenerator.java 2012-12-02 16:53:25 UTC (rev 3833)
+++ trunk/LWJGL/src/java/org/lwjgl/util/generator/JavaMethodsGenerator.java 2012-12-12 17:20:24 UTC (rev 3834)
@@ -234,6 +234,8 @@
private static void printMethodWithMultiType(AnnotationProcessorEnvironment env, TypeMap type_map, PrintWriter writer, InterfaceDeclaration interface_decl, MethodDeclaration method, Map<ParameterDeclaration, TypeInfo> typeinfos_instance, Mode mode, boolean generate_error_checks, boolean context_specific) {
Utils.printDocComment(writer, method);
+ if ( method.getAnnotation(Deprecated.class) != null )
+ writer.println("\t@Deprecated");
if ( interface_decl.getAnnotation(Private.class) == null && method.getAnnotation(Private.class) == null )
writer.print("\tpublic static ");
else
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sp...@us...> - 2012-12-02 16:53:32
|
Revision: 3833
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3833&view=rev
Author: spasi
Date: 2012-12-02 16:53:25 +0000 (Sun, 02 Dec 2012)
Log Message:
-----------
OpenCL 1.2 update.
Added Paths:
-----------
trunk/LWJGL/src/templates/org/lwjgl/opencl/KHR_depth_images.java
trunk/LWJGL/src/templates/org/lwjgl/opencl/KHR_gl_depth_images.java
trunk/LWJGL/src/templates/org/lwjgl/opencl/KHR_gl_msaa_sharing.java
trunk/LWJGL/src/templates/org/lwjgl/opencl/KHR_image2d_from_buffer.java
trunk/LWJGL/src/templates/org/lwjgl/opencl/KHR_initialize_memory.java
trunk/LWJGL/src/templates/org/lwjgl/opencl/KHR_spir.java
trunk/LWJGL/src/templates/org/lwjgl/opencl/KHR_terminate_context.java
Added: trunk/LWJGL/src/templates/org/lwjgl/opencl/KHR_depth_images.java
===================================================================
--- trunk/LWJGL/src/templates/org/lwjgl/opencl/KHR_depth_images.java (rev 0)
+++ trunk/LWJGL/src/templates/org/lwjgl/opencl/KHR_depth_images.java 2012-12-02 16:53:25 UTC (rev 3833)
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2002-2012 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.
+ */
+package org.lwjgl.opencl;
+
+import org.lwjgl.util.generator.opencl.CLDeviceExtension;
+
+@CLDeviceExtension
+public interface KHR_depth_images {
+
+ /** cl_channel_order */
+ int CL_DEPTH = 0x10BD;
+
+}
\ No newline at end of file
Added: trunk/LWJGL/src/templates/org/lwjgl/opencl/KHR_gl_depth_images.java
===================================================================
--- trunk/LWJGL/src/templates/org/lwjgl/opencl/KHR_gl_depth_images.java (rev 0)
+++ trunk/LWJGL/src/templates/org/lwjgl/opencl/KHR_gl_depth_images.java 2012-12-02 16:53:25 UTC (rev 3833)
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2002-2012 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.
+ */
+package org.lwjgl.opencl;
+
+import org.lwjgl.util.generator.Extension;
+import org.lwjgl.util.generator.opencl.CLDeviceExtension;
+
+@CLDeviceExtension
+@Extension(postfix = "KHR", className = "KHRGLDepthImages")
+public interface KHR_gl_depth_images {
+
+ /** cl_channel_order */
+ int CL_DEPTH_STENCIL = 0x10BE;
+
+ /** cl_channel_type */
+ int CL_UNORM_INT24 = 0x10DF;
+
+}
\ No newline at end of file
Added: trunk/LWJGL/src/templates/org/lwjgl/opencl/KHR_gl_msaa_sharing.java
===================================================================
--- trunk/LWJGL/src/templates/org/lwjgl/opencl/KHR_gl_msaa_sharing.java (rev 0)
+++ trunk/LWJGL/src/templates/org/lwjgl/opencl/KHR_gl_msaa_sharing.java 2012-12-02 16:53:25 UTC (rev 3833)
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2002-2012 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.
+ */
+package org.lwjgl.opencl;
+
+import org.lwjgl.util.generator.Extension;
+import org.lwjgl.util.generator.opencl.CLDeviceExtension;
+
+@CLDeviceExtension
+@Extension(postfix = "KHR", className = "KHRGLMsaaSharing")
+public interface KHR_gl_msaa_sharing {
+
+ /** cl_gl_texture_info */
+ int CL_GL_NUM_SAMPLES = 0x2006;
+
+}
\ No newline at end of file
Added: trunk/LWJGL/src/templates/org/lwjgl/opencl/KHR_image2d_from_buffer.java
===================================================================
--- trunk/LWJGL/src/templates/org/lwjgl/opencl/KHR_image2d_from_buffer.java (rev 0)
+++ trunk/LWJGL/src/templates/org/lwjgl/opencl/KHR_image2d_from_buffer.java 2012-12-02 16:53:25 UTC (rev 3833)
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2002-2012 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.
+ */
+package org.lwjgl.opencl;
+
+import org.lwjgl.util.generator.Extension;
+import org.lwjgl.util.generator.opencl.CLDeviceExtension;
+
+@CLDeviceExtension
+@Extension(postfix = "KHR", className = "KHRImage2DFromBuffer")
+public interface KHR_image2d_from_buffer {
+
+ /** cl_device_info */
+ int CL_DEVICE_IMAGE_PITCH_ALIGNMENT = 0x104A,
+ CL_DEVICE_IMAGE_BASE_ADDRESS_ALIGNMENT = 0x104B;
+
+}
\ No newline at end of file
Added: trunk/LWJGL/src/templates/org/lwjgl/opencl/KHR_initialize_memory.java
===================================================================
--- trunk/LWJGL/src/templates/org/lwjgl/opencl/KHR_initialize_memory.java (rev 0)
+++ trunk/LWJGL/src/templates/org/lwjgl/opencl/KHR_initialize_memory.java 2012-12-02 16:53:25 UTC (rev 3833)
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2002-2012 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.
+ */
+package org.lwjgl.opencl;
+
+import org.lwjgl.util.generator.opencl.CLDeviceExtension;
+
+@CLDeviceExtension
+public interface KHR_initialize_memory {
+
+ /** cl_context_properties */
+ int CL_CONTEXT_MEMORY_INITIALIZE_KHR = 0x200E;
+
+ /** */
+ int CL_CONTEXT_MEMORY_INITIALIZE_LOCAL_KHR = 0x1, // TODO: Find value
+ CL_CONTEXT_MEMORY_INITIALIZE_PRIVATE_KHR = 0x2; // TODO: Find value
+
+}
\ No newline at end of file
Added: trunk/LWJGL/src/templates/org/lwjgl/opencl/KHR_spir.java
===================================================================
--- trunk/LWJGL/src/templates/org/lwjgl/opencl/KHR_spir.java (rev 0)
+++ trunk/LWJGL/src/templates/org/lwjgl/opencl/KHR_spir.java 2012-12-02 16:53:25 UTC (rev 3833)
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2002-2012 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.
+ */
+package org.lwjgl.opencl;
+
+import org.lwjgl.util.generator.Extension;
+import org.lwjgl.util.generator.opencl.CLDeviceExtension;
+
+@CLDeviceExtension
+@Extension(postfix = "KHR", className = "KHRSPIR")
+public interface KHR_spir {
+}
\ No newline at end of file
Added: trunk/LWJGL/src/templates/org/lwjgl/opencl/KHR_terminate_context.java
===================================================================
--- trunk/LWJGL/src/templates/org/lwjgl/opencl/KHR_terminate_context.java (rev 0)
+++ trunk/LWJGL/src/templates/org/lwjgl/opencl/KHR_terminate_context.java 2012-12-02 16:53:25 UTC (rev 3833)
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2002-2012 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.
+ */
+package org.lwjgl.opencl;
+
+import org.lwjgl.util.generator.PointerWrapper;
+import org.lwjgl.util.generator.opencl.CLDeviceExtension;
+import org.lwjgl.util.generator.opencl.cl_int;
+
+@CLDeviceExtension
+public interface KHR_terminate_context {
+
+ int CL_DEVICE_TERMINATE_CAPABILITY_KHR = 0x200F,
+ CL_CONTEXT_TERMINATE_KHR = 0x2010;
+
+ @cl_int
+ int clTerminateContextKHR(@PointerWrapper("cl_context") CLContext context);
+
+}
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sp...@us...> - 2012-11-25 10:02:28
|
Revision: 3832
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3832&view=rev
Author: spasi
Date: 2012-11-25 10:02:20 +0000 (Sun, 25 Nov 2012)
Log Message:
-----------
Fixed duplicate fields in GL References.
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/util/generator/opengl/GLReferencesGeneratorProcessorFactory.java
Modified: trunk/LWJGL/src/java/org/lwjgl/util/generator/opengl/GLReferencesGeneratorProcessorFactory.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/util/generator/opengl/GLReferencesGeneratorProcessorFactory.java 2012-11-25 01:34:08 UTC (rev 3831)
+++ trunk/LWJGL/src/java/org/lwjgl/util/generator/opengl/GLReferencesGeneratorProcessorFactory.java 2012-11-25 10:02:20 UTC (rev 3832)
@@ -32,6 +32,7 @@
package org.lwjgl.util.generator.opengl;
+import org.lwjgl.util.generator.Alternate;
import org.lwjgl.util.generator.CachedReference;
import org.lwjgl.util.generator.Utils;
@@ -138,12 +139,18 @@
private static void generateClearsFromMethods(PrintWriter writer, InterfaceDeclaration interface_decl) {
for (MethodDeclaration method : interface_decl.getMethods()) {
+ if ( method.getAnnotation(Alternate.class) != null )
+ continue;
+
generateClearsFromParameters(writer, interface_decl, method);
}
}
private static void generateCopiesFromMethods(PrintWriter writer, InterfaceDeclaration interface_decl) {
for (MethodDeclaration method : interface_decl.getMethods()) {
+ if ( method.getAnnotation(Alternate.class) != null )
+ continue;
+
generateCopiesFromParameters(writer, interface_decl, method);
}
}
@@ -164,6 +171,9 @@
private static void generateReferencesFromMethods(PrintWriter writer, InterfaceDeclaration interface_decl) {
for (MethodDeclaration method : interface_decl.getMethods()) {
+ if ( method.getAnnotation(Alternate.class) != null )
+ continue;
+
generateReferencesFromParameters(writer, interface_decl, method);
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sp...@us...> - 2012-11-25 01:34:15
|
Revision: 3831
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3831&view=rev
Author: spasi
Date: 2012-11-25 01:34:08 +0000 (Sun, 25 Nov 2012)
Log Message:
-----------
More alternate *Pointer functions with explicit type.
Modified Paths:
--------------
trunk/LWJGL/src/templates/org/lwjgl/opengl/GL11.java
Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/GL11.java
===================================================================
--- trunk/LWJGL/src/templates/org/lwjgl/opengl/GL11.java 2012-11-25 00:54:00 UTC (rev 3830)
+++ trunk/LWJGL/src/templates/org/lwjgl/opengl/GL11.java 2012-11-25 01:34:08 UTC (rev 3831)
@@ -32,7 +32,6 @@
package org.lwjgl.opengl;
import org.lwjgl.util.generator.*;
-import org.lwjgl.util.generator.Alternate;
import org.lwjgl.util.generator.opengl.*;
import java.nio.*;
@@ -810,6 +809,14 @@
@GLbyte Buffer pointer);
@DeprecatedGL
+ @Alternate("glColorPointer")
+ void glColorPointer(int size, @GLenum int type, @GLsizei int stride,
+ @CachedReference
+ @Check
+ @BufferObject(BufferKind.ArrayVBO)
+ @Const ByteBuffer pointer);
+
+ @DeprecatedGL
void glColorMaterial(@GLenum int face, @GLenum int mode);
void glColorMask(boolean red, boolean green, boolean blue, boolean alpha);
@@ -1304,6 +1311,14 @@
@GLfloat
@GLdouble Buffer pointer);
+ @DeprecatedGL
+ @Alternate("glNormalPointer")
+ void glNormalPointer(@GLenum int type, @GLsizei int stride,
+ @CachedReference
+ @BufferObject(BufferKind.ArrayVBO)
+ @Check
+ @Const ByteBuffer pointer);
+
@NoErrorCheck
@DeprecatedGL
void glNormal3b(byte nx, byte ny, byte nz);
@@ -1443,6 +1458,14 @@
@GLfloat
@GLdouble Buffer pointer);
+ @DeprecatedGL
+ @Alternate("glVertexPointer")
+ void glVertexPointer(int size, @GLenum int type, @GLsizei int stride,
+ @CachedReference
+ @BufferObject(BufferKind.ArrayVBO)
+ @Check
+ @Const ByteBuffer pointer);
+
@NoErrorCheck
@DeprecatedGL
void glVertex2f(float x, float y);
@@ -1577,6 +1600,14 @@
@GLfloat
@GLdouble Buffer pointer);
+ @DeprecatedGL
+ @Alternate("glTexCoordPointer")
+ void glTexCoordPointer(int size, @GLenum int type, @GLsizei int stride,
+ @CachedReference(index = "StateTracker.getReferences(caps).glClientActiveTexture", name = "glTexCoordPointer_buffer")
+ @BufferObject(BufferKind.ArrayVBO)
+ @Check
+ @Const ByteBuffer pointer);
+
@NoErrorCheck
@DeprecatedGL
void glTexCoord1f(float s);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sp...@us...> - 2012-11-25 00:54:07
|
Revision: 3830
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3830&view=rev
Author: spasi
Date: 2012-11-25 00:54:00 +0000 (Sun, 25 Nov 2012)
Log Message:
-----------
Added alternative VertexAttribPointer with ByteBuffer data and explicit type.
Modified Paths:
--------------
trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_vertex_shader.java
trunk/LWJGL/src/templates/org/lwjgl/opengl/GL20.java
Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_vertex_shader.java
===================================================================
--- trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_vertex_shader.java 2012-11-20 19:10:15 UTC (rev 3829)
+++ trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_vertex_shader.java 2012-11-25 00:54:00 UTC (rev 3830)
@@ -32,7 +32,6 @@
package org.lwjgl.opengl;
import org.lwjgl.util.generator.*;
-import org.lwjgl.util.generator.Alternate;
import org.lwjgl.util.generator.opengl.*;
import java.nio.*;
@@ -49,13 +48,13 @@
* Accepted by the <pname> parameter of GetBooleanv, GetIntegerv,
* GetFloatv, and GetDoublev:
*/
- int GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB = 0x8B4A;
- int GL_MAX_VARYING_FLOATS_ARB = 0x8B4B;
- int GL_MAX_VERTEX_ATTRIBS_ARB = 0x8869;
- int GL_MAX_TEXTURE_IMAGE_UNITS_ARB = 0x8872;
- int GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB = 0x8B4C;
+ int GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB = 0x8B4A;
+ int GL_MAX_VARYING_FLOATS_ARB = 0x8B4B;
+ int GL_MAX_VERTEX_ATTRIBS_ARB = 0x8869;
+ int GL_MAX_TEXTURE_IMAGE_UNITS_ARB = 0x8872;
+ int GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB = 0x8B4C;
int GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB = 0x8B4D;
- int GL_MAX_TEXTURE_COORDS_ARB = 0x8871;
+ int GL_MAX_TEXTURE_COORDS_ARB = 0x8871;
/**
* Accepted by the <cap> parameter of Disable, Enable, and IsEnabled, and
@@ -63,19 +62,19 @@
* GetDoublev:
*/
int GL_VERTEX_PROGRAM_POINT_SIZE_ARB = 0x8642;
- int GL_VERTEX_PROGRAM_TWO_SIDE_ARB = 0x8643;
+ int GL_VERTEX_PROGRAM_TWO_SIDE_ARB = 0x8643;
/** Accepted by the <pname> parameter GetObjectParameter{if}vARB: */
- int GL_OBJECT_ACTIVE_ATTRIBUTES_ARB = 0x8B89;
+ int GL_OBJECT_ACTIVE_ATTRIBUTES_ARB = 0x8B89;
int GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB = 0x8B8A;
/** Accepted by the <pname> parameter of GetVertexAttrib{dfi}vARB: */
- int GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB = 0x8622;
- int GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB = 0x8623;
- int GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB = 0x8624;
- int GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB = 0x8625;
+ int GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB = 0x8622;
+ int GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB = 0x8623;
+ int GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB = 0x8624;
+ int GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB = 0x8625;
int GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB = 0x886A;
- int GL_CURRENT_VERTEX_ATTRIB_ARB = 0x8626;
+ int GL_CURRENT_VERTEX_ATTRIB_ARB = 0x8626;
/** Accepted by the <pname> parameter of GetVertexAttribPointervARB: */
int GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB = 0x8645;
@@ -141,6 +140,13 @@
@GLfloat
@GLdouble Buffer buffer);
+ @Alternate("glVertexAttribPointerARB")
+ void glVertexAttribPointerARB(@GLuint int index, int size, @GLenum int type, boolean normalized, @GLsizei int stride,
+ @CachedReference(index = "index", name = "glVertexAttribPointer_buffer")
+ @BufferObject(BufferKind.ArrayVBO)
+ @Check
+ @Const ByteBuffer buffer);
+
void glEnableVertexAttribArrayARB(@GLuint int index);
void glDisableVertexAttribArrayARB(@GLuint int index);
Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/GL20.java
===================================================================
--- trunk/LWJGL/src/templates/org/lwjgl/opengl/GL20.java 2012-11-20 19:10:15 UTC (rev 3829)
+++ trunk/LWJGL/src/templates/org/lwjgl/opengl/GL20.java 2012-11-25 00:54:00 UTC (rev 3830)
@@ -367,6 +367,13 @@
@GLfloat
@GLdouble Buffer buffer);
+ @Alternate("glVertexAttribPointer")
+ void glVertexAttribPointer(@GLuint int index, int size, @GLenum int type, boolean normalized, @GLsizei int stride,
+ @CachedReference(index = "index", name = "glVertexAttribPointer_buffer")
+ @BufferObject(BufferKind.ArrayVBO)
+ @Check
+ @Const ByteBuffer buffer);
+
void glEnableVertexAttribArray(@GLuint int index);
void glDisableVertexAttribArray(@GLuint int index);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sp...@us...> - 2012-11-20 19:10:27
|
Revision: 3829
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3829&view=rev
Author: spasi
Date: 2012-11-20 19:10:15 +0000 (Tue, 20 Nov 2012)
Log Message:
-----------
Added GREMEDY_frame_terminator.
Added Paths:
-----------
trunk/LWJGL/src/templates/org/lwjgl/opengl/GREMEDY_frame_terminator.java
Added: trunk/LWJGL/src/templates/org/lwjgl/opengl/GREMEDY_frame_terminator.java
===================================================================
--- trunk/LWJGL/src/templates/org/lwjgl/opengl/GREMEDY_frame_terminator.java (rev 0)
+++ trunk/LWJGL/src/templates/org/lwjgl/opengl/GREMEDY_frame_terminator.java 2012-11-20 19:10:15 UTC (rev 3829)
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2002-2012 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.
+ */
+package org.lwjgl.opengl;
+
+public interface GREMEDY_frame_terminator {
+
+ void glFrameTerminatorGREMEDY();
+
+}
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sp...@us...> - 2012-11-20 10:43:07
|
Revision: 3828
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3828&view=rev
Author: spasi
Date: 2012-11-20 10:42:54 +0000 (Tue, 20 Nov 2012)
Log Message:
-----------
Fixed GetAsyncKeyState usage. We read the MSB, not the LSB.
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsKeyboard.java
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsKeyboard.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsKeyboard.java 2012-11-14 21:06:09 UTC (rev 3827)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsKeyboard.java 2012-11-20 10:42:54 UTC (rev 3828)
@@ -154,6 +154,10 @@
return (state & 1) == 1;
}
+ private static boolean isKeyPressedAsync(int state) {
+ return (state >>> 31) == 1;
+ }
+
public void handleKey(int virt_key, int scan_code, boolean extended, byte event_state, long millis, boolean repeat) {
virt_key = translateExtended(virt_key, scan_code, event_state, extended);
if ( !repeat && isKeyPressed(event_state) == isKeyPressed(virt_key_down_buffer[virt_key]) )
@@ -176,7 +180,7 @@
public void fireLostKeyEvents() {
for ( int i = 0; i < virt_key_down_buffer.length; i++ ) {
- if ( isKeyPressed(virt_key_down_buffer[i]) && !isKeyPressed(GetAsyncKeyState(i)) )
+ if ( isKeyPressed(virt_key_down_buffer[i]) && !isKeyPressedAsync(GetAsyncKeyState(i)) )
handleKey(i, 0, false, (byte)0, System.currentTimeMillis(), false);
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2012-11-14 21:06:16
|
Revision: 3827
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3827&view=rev
Author: kappa1
Date: 2012-11-14 21:06:09 +0000 (Wed, 14 Nov 2012)
Log Message:
-----------
Implement Mouse Dragging when using the Right Mouse Button or the Scroll Wheel Button
Modified Paths:
--------------
branches/osx-java7/LWJGL/src/native/macosx/org_lwjgl_opengl_Display.m
Modified: branches/osx-java7/LWJGL/src/native/macosx/org_lwjgl_opengl_Display.m
===================================================================
--- branches/osx-java7/LWJGL/src/native/macosx/org_lwjgl_opengl_Display.m 2012-11-13 21:13:11 UTC (rev 3826)
+++ branches/osx-java7/LWJGL/src/native/macosx/org_lwjgl_opengl_Display.m 2012-11-14 21:06:09 UTC (rev 3827)
@@ -294,6 +294,30 @@
(*env)->CallVoidMethod(env, _parent->jmouse, mousemove, loc.x, loc.y, [event deltaX], [event deltaY], 0.0f, time);
}
+- (void)rightMouseDragged:(NSEvent *)event {
+ JNIEnv *env = attachCurrentThread();
+ if (env == nil || event == nil || _parent == nil) {
+ return;
+ }
+ long time = [event timestamp] * 1000000000;
+ jclass mouse_class = (*env)->GetObjectClass(env, _parent->jmouse);
+ jmethodID mousemove = (*env)->GetMethodID(env, mouse_class, "mouseMoved", "(FFFFFJ)V");
+ NSPoint loc = [self convertPoint:[event locationInWindow] toView:self];
+ (*env)->CallVoidMethod(env, _parent->jmouse, mousemove, loc.x, loc.y, [event deltaX], [event deltaY], 0.0f, time);
+}
+
+- (void)otherMouseDragged:(NSEvent *)event {
+ JNIEnv *env = attachCurrentThread();
+ if (env == nil || event == nil || _parent == nil) {
+ return;
+ }
+ long time = [event timestamp] * 1000000000;
+ jclass mouse_class = (*env)->GetObjectClass(env, _parent->jmouse);
+ jmethodID mousemove = (*env)->GetMethodID(env, mouse_class, "mouseMoved", "(FFFFFJ)V");
+ NSPoint loc = [self convertPoint:[event locationInWindow] toView:self];
+ (*env)->CallVoidMethod(env, _parent->jmouse, mousemove, loc.x, loc.y, [event deltaX], [event deltaY], 0.0f, time);
+}
+
- (void)mouseMoved:(NSEvent *)event {
JNIEnv *env = attachCurrentThread();
if (env == nil || event == nil || _parent == nil || _parent->jmouse == nil) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2012-11-13 21:13:21
|
Revision: 3826
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3826&view=rev
Author: kappa1
Date: 2012-11-13 21:13:11 +0000 (Tue, 13 Nov 2012)
Log Message:
-----------
Cleaned up code by removing unneeded java classes MacOSXFrame and MacOSXMouseEventQueue and native code by removing mouse.c
Modified Paths:
--------------
branches/osx-java7/LWJGL/build.xml
branches/osx-java7/LWJGL/src/java/org/lwjgl/opengl/MacOSXDisplay.java
branches/osx-java7/LWJGL/src/java/org/lwjgl/opengl/MacOSXNativeMouse.java
Removed Paths:
-------------
branches/osx-java7/LWJGL/src/java/org/lwjgl/opengl/MacOSXFrame.java
branches/osx-java7/LWJGL/src/java/org/lwjgl/opengl/MacOSXMouseEventQueue.java
branches/osx-java7/LWJGL/src/native/macosx/org_lwjgl_input_Mouse.c
Modified: branches/osx-java7/LWJGL/build.xml
===================================================================
--- branches/osx-java7/LWJGL/build.xml 2012-11-11 19:03:50 UTC (rev 3825)
+++ branches/osx-java7/LWJGL/build.xml 2012-11-13 21:13:11 UTC (rev 3826)
@@ -316,7 +316,6 @@
<javah classpath="${lwjgl.bin}" destdir="${lwjgl.src.native}/macosx" force="yes">
<class name="org.lwjgl.MacOSXSysImplementation" />
- <class name="org.lwjgl.opengl.MacOSXMouseEventQueue" />
<class name="org.lwjgl.opengl.MacOSXCanvasPeerInfo" />
<class name="org.lwjgl.opengl.MacOSXPeerInfo" />
<class name="org.lwjgl.opengl.MacOSXPbufferPeerInfo" />
Modified: branches/osx-java7/LWJGL/src/java/org/lwjgl/opengl/MacOSXDisplay.java
===================================================================
--- branches/osx-java7/LWJGL/src/java/org/lwjgl/opengl/MacOSXDisplay.java 2012-11-11 19:03:50 UTC (rev 3825)
+++ branches/osx-java7/LWJGL/src/java/org/lwjgl/opengl/MacOSXDisplay.java 2012-11-13 21:13:11 UTC (rev 3826)
@@ -70,7 +70,7 @@
private MacOSXCanvasListener canvas_listener;
private Canvas canvas;
private Robot robot;
- private MacOSXMouseEventQueue mouse_queue;
+ //private MacOSXMouseEventQueue mouse_queue;
private KeyboardEventQueue keyboard_queue;
private java.awt.DisplayMode requested_mode;
@@ -84,30 +84,10 @@
private int width;
private int height;
- /* Whether we're using a native window or an AWT canvas */
- private boolean native_mode;
+ private boolean close_requested;
- private boolean close_requested;
-
MacOSXDisplay() {
- try {
- AccessController.doPrivileged(new PrivilegedExceptionAction<Object>() {
- public Object run() throws Exception {
- Application.getApplication().addApplicationListener(new ApplicationAdapter() {
- public void handleQuit(ApplicationEvent event) {
- doHandleQuit();
- }
- });
- return null;
- }
- });
- } catch (Throwable e) {
- /**
- * In an applet environment, referencing com.apple.eawt.Application can fail with
- * a native exception. So log any exceptions instead of re-throwing.
- */
- LWJGLUtil.log("Failed to register quit handler: " + e.getMessage());
- }
+
}
private native ByteBuffer nCreateWindow(int x, int y, int width, int height, boolean fullscreen, boolean undecorated, ByteBuffer peer_info_handle, ByteBuffer window_handle) throws LWJGLException;
@@ -142,7 +122,6 @@
window = nCreateWindow(x, y, mode.getWidth(), mode.getHeight(),
fullscreen, isUndecorated(),
peer_handle, window);
- native_mode = true;
this.x = x;
this.y = y;
this.width = mode.getWidth();
@@ -165,15 +144,8 @@
public native void nDestroyWindow(ByteBuffer window_handle);
public void destroyWindow() {
- if (native_mode) {
- nDestroyWindow(window);
- } else {
- if (canvas_listener != null) {
- canvas_listener.disableListeners();
- canvas_listener = null;
- }
- }
- hideUI(false);
+ nDestroyWindow(window);
+ hideUI(false);
}
public int getGammaRampLength() {
@@ -213,11 +185,7 @@
}
public void resetDisplayMode() {
- if (!native_mode) {
- if (getDevice().getFullScreenWindow() != null)
- getDevice().setFullScreenWindow(null);
- }
- requested_mode = null;
+ requested_mode = null;
restoreGamma();
}
@@ -273,12 +241,8 @@
}
public boolean isActive() {
- if (native_mode) {
- boolean ret = nIsFocused(window);
- return ret;
- } else {
- return canvas.isFocusOwner();
- }
+ boolean ret = nIsFocused(window);
+ return ret;
}
public Canvas getCanvas() {
@@ -300,10 +264,7 @@
private static final IntBuffer current_viewport = BufferUtils.createIntBuffer(16);
public void update() {
boolean should_update = true;
- if (!native_mode) {
- should_update = canvas_listener.syncShouldUpdateContext();
- }
- /*
+ /*
* Workaround for the "white screen in fullscreen mode" problem
*
* Sometimes, switching from windowed mode to fullscreen or simply creating the Display
@@ -331,14 +292,6 @@
glGetInteger(GL_VIEWPORT, current_viewport);
glViewport(current_viewport.get(0), current_viewport.get(1), current_viewport.get(2), current_viewport.get(3));
}
- /*
- if (frame != null && mouse_queue != null) {
- if (frame.syncShouldReleaseCursor())
- MacOSXMouseEventQueue.nGrabMouse(false);
- if (frame.syncShouldWarpCursor())
- mouse_queue.warpCursor();
- }
- */
}
/**
@@ -369,52 +322,29 @@
}
public void createMouse() throws LWJGLException {
- if (native_mode) {
- mouse = new MacOSXNativeMouse(this, window);
- mouse.register();
- } else {
- mouse_queue = new MacOSXMouseEventQueue(canvas);
- mouse_queue.register();
- }
+ mouse = new MacOSXNativeMouse(this, window);
+ mouse.register();
}
public void destroyMouse() {
- MacOSXMouseEventQueue.nGrabMouse(false);
- if (native_mode) {
- if (mouse != null) {
- mouse.unregister();
- }
- mouse = null;
- } else {
- if (mouse_queue != null) {
- mouse_queue.unregister();
- }
- mouse_queue = null;
+ //MacOSXMouseEventQueue.nGrabMouse(false);
+
+ if (mouse != null) {
+ mouse.unregister();
}
+ mouse = null;
}
public void pollMouse(IntBuffer coord_buffer, ByteBuffer buttons_buffer) {
- if (native_mode) {
- mouse.poll(coord_buffer, buttons_buffer);
- } else {
- mouse_queue.poll(coord_buffer, buttons_buffer);
- }
+ mouse.poll(coord_buffer, buttons_buffer);
}
public void readMouse(ByteBuffer buffer) {
- if (native_mode) {
- mouse.copyEvents(buffer);
- } else {
- mouse_queue.copyEvents(buffer);
- }
+ mouse.copyEvents(buffer);
}
public void grabMouse(boolean grab) {
- if (native_mode) {
- mouse.setGrabbed(grab);
- } else {
- mouse_queue.setGrabbed(grab);
- }
+ mouse.setGrabbed(grab);
}
public int getNativeCursorCapabilities() {
@@ -422,7 +352,10 @@
}
public void setCursorPosition(int x, int y) {
- MacOSXMouseEventQueue.nWarpCursor(x, y);
+ if (mouse != null) {
+ mouse.warpCursor(x, y);
+ }
+ //MacOSXMouseEventQueue.nWarpCursor(x, y);
}
public void setNativeCursor(Object handle) throws LWJGLException {
@@ -438,41 +371,23 @@
/* Keyboard */
public void createKeyboard() throws LWJGLException {
- if (native_mode) {
- this.keyboard = new MacOSXNativeKeyboard(window);
- keyboard.register();
- } else {
- this.keyboard_queue = new KeyboardEventQueue(canvas);
- keyboard_queue.register();
- }
+ this.keyboard = new MacOSXNativeKeyboard(window);
+ keyboard.register();
}
public void destroyKeyboard() {
- if (native_mode) {
- if (keyboard != null)
- keyboard.unregister();
- keyboard = null;
- } else {
- if (keyboard_queue != null)
- keyboard_queue.unregister();
- keyboard_queue = null;
- }
+ if (keyboard != null) {
+ keyboard.unregister();
+ }
+ keyboard = null;
}
public void pollKeyboard(ByteBuffer keyDownBuffer) {
- if (native_mode) {
- keyboard.poll(keyDownBuffer);
- } else {
- keyboard_queue.poll(keyDownBuffer);
- }
+ keyboard.poll(keyDownBuffer);
}
public void readKeyboard(ByteBuffer buffer) {
- if (native_mode) {
- keyboard.copyEvents(buffer);
- } else {
- keyboard_queue.copyEvents(buffer);
- }
+ keyboard.copyEvents(buffer);
}
/** Native cursor handles */
@@ -577,9 +492,7 @@
}
public void setResizable(boolean resizable) {
- if (native_mode) {
- nSetResizable(window, resizable);
- }
+ nSetResizable(window, resizable);
}
public boolean wasResized() {
Deleted: branches/osx-java7/LWJGL/src/java/org/lwjgl/opengl/MacOSXFrame.java
===================================================================
--- branches/osx-java7/LWJGL/src/java/org/lwjgl/opengl/MacOSXFrame.java 2012-11-11 19:03:50 UTC (rev 3825)
+++ branches/osx-java7/LWJGL/src/java/org/lwjgl/opengl/MacOSXFrame.java 2012-11-13 21:13:11 UTC (rev 3826)
@@ -1,238 +0,0 @@
-/*
- * Copyright (c) 2002-2008 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.
- */
-package org.lwjgl.opengl;
-
-/**
- * This is the Mac OS X AWT Frame. It contains thread safe
- * methods to manipulateit from non-AWT threads
- * @author elias_naur
- */
-
-import java.awt.BorderLayout;
-import java.awt.Frame;
-import java.awt.GraphicsDevice;
-import java.awt.GraphicsEnvironment;
-import java.awt.Insets;
-import java.awt.Rectangle;
-import java.awt.event.ComponentEvent;
-import java.awt.event.ComponentListener;
-import java.awt.event.WindowEvent;
-import java.awt.event.WindowListener;
-import java.security.AccessController;
-import java.security.PrivilegedActionException;
-import java.security.PrivilegedExceptionAction;
-
-import org.lwjgl.LWJGLException;
-
-final class MacOSXFrame extends Frame implements WindowListener, ComponentListener {
-
- private static final long serialVersionUID = -5823294716668988777L;
-
- private final MacOSXGLCanvas canvas;
- private boolean close_requested;
-
- /* States */
- private Rectangle bounds;
- private boolean active;
- private boolean minimized;
- private boolean should_warp_cursor;
- private boolean should_release_cursor;
-
- MacOSXFrame(DisplayMode mode, final java.awt.DisplayMode requested_mode, boolean fullscreen, int x, int y) throws LWJGLException {
- setResizable(Display.isResizable());
- addWindowListener(this);
- addComponentListener(this);
- canvas = new MacOSXGLCanvas();
- canvas.setFocusTraversalKeysEnabled(false);
- add(canvas, BorderLayout.CENTER);
- boolean undecorated = Display.getPrivilegedBoolean("org.lwjgl.opengl.Window.undecorated");
- setUndecorated(fullscreen || undecorated);
- if ( fullscreen ) {
- try {
- AccessController.doPrivileged(new PrivilegedExceptionAction<Object>() {
- public Object run() throws Exception {
- getDevice().setFullScreenWindow(MacOSXFrame.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() != real_mode.getWidth() || requested_mode.getHeight() != real_mode.getHeight() ) {
- getDevice().setFullScreenWindow(null);
- if (isDisplayable())
- dispose();
- throw new LWJGLException("AWT capped mode: requested mode = " + requested_mode.getWidth() + "x" + requested_mode.getHeight() +
- " but got " + real_mode.getWidth() + " " + real_mode.getHeight());
- }
- return null;
- }
- });
- } catch (PrivilegedActionException e) {
- throw new LWJGLException(e);
- }
- }
- pack();
- resize(x, y, mode.getWidth(), mode.getHeight());
- setVisible(true);
- requestFocus();
- canvas.requestFocus();
- updateBounds();
- }
-
- public void resize(int x, int y, int width, int height) {
- Insets insets = getInsets();
- setBounds(x, y, width + insets.left + insets.right, height + insets.top + insets.bottom);
- }
-
- public int getWidth() {
- Insets insets = getInsets();
- return super.getWidth() - insets.left - insets.right;
- }
-
- public int getHeight() {
- Insets insets = getInsets();
- return super.getHeight() - insets.top - insets.bottom;
- }
-
- public Rectangle syncGetBounds() {
- synchronized ( this ) {
- return bounds;
- }
- }
-
- public void componentShown(ComponentEvent e) {
- }
-
- public void componentHidden(ComponentEvent e) {
- }
-
- private void updateBounds() {
- synchronized ( this ) {
- bounds = getBounds();
- }
- }
-
- public void componentResized(ComponentEvent e) {
- updateBounds();
- }
-
- public void componentMoved(ComponentEvent e) {
- updateBounds();
- }
-
- public static GraphicsDevice getDevice() {
- GraphicsEnvironment g_env = GraphicsEnvironment.getLocalGraphicsEnvironment();
- GraphicsDevice device = g_env.getDefaultScreenDevice();
- return device;
- }
-
- public void windowIconified(WindowEvent e) {
- synchronized ( this ) {
- minimized = true;
- }
- }
-
- public void windowDeiconified(WindowEvent e) {
- synchronized ( this ) {
- minimized = false;
- }
- }
-
- public void windowOpened(WindowEvent e) {
- }
-
- public void windowClosed(WindowEvent e) {
- }
-
- public void windowClosing(WindowEvent e) {
- synchronized ( this ) {
- close_requested = true;
- }
- }
-
- public void windowDeactivated(WindowEvent e) {
- synchronized ( this ) {
- active = false;
- should_release_cursor = true;
- should_warp_cursor = false;
- }
- }
-
- public void windowActivated(WindowEvent e) {
- synchronized ( this ) {
- active = true;
- should_warp_cursor = true;
- should_release_cursor = false;
- }
- }
-
- public boolean syncIsCloseRequested() {
- boolean result;
- synchronized ( this ) {
- result = close_requested;
- close_requested = false;
- }
- return result;
- }
-
- public boolean syncIsVisible() {
- synchronized ( this ) {
- return !minimized;
- }
- }
-
- public boolean syncIsActive() {
- synchronized ( this ) {
- return active;
- }
- }
-
- public MacOSXGLCanvas getCanvas() {
- return canvas;
- }
-
- public boolean syncShouldReleaseCursor() {
- boolean result;
- synchronized ( this ) {
- result = should_release_cursor;
- should_release_cursor = false;
- }
- return result;
- }
-
- public boolean syncShouldWarpCursor() {
- boolean result;
- synchronized ( this ) {
- result = should_warp_cursor;
- should_warp_cursor = false;
- }
- return result;
- }
-}
Deleted: branches/osx-java7/LWJGL/src/java/org/lwjgl/opengl/MacOSXMouseEventQueue.java
===================================================================
--- branches/osx-java7/LWJGL/src/java/org/lwjgl/opengl/MacOSXMouseEventQueue.java 2012-11-11 19:03:50 UTC (rev 3825)
+++ branches/osx-java7/LWJGL/src/java/org/lwjgl/opengl/MacOSXMouseEventQueue.java 2012-11-13 21:13:11 UTC (rev 3826)
@@ -1,106 +0,0 @@
-/*
- * Copyright (c) 2002-2008 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.
- */
-package org.lwjgl.opengl;
-
-/**
- * An AWT implementation of a LWJGL compatible Mouse event queue.
- * @author elias_naur
- */
-
-import java.awt.Component;
-import java.awt.Point;
-import java.awt.Rectangle;
-import java.nio.IntBuffer;
-
-import org.lwjgl.BufferUtils;
-
-final class MacOSXMouseEventQueue extends MouseEventQueue {
- private IntBuffer delta_buffer = BufferUtils.createIntBuffer(2);
-
- private boolean skip_event;
- private static boolean is_grabbed;
-
- MacOSXMouseEventQueue(Component component) {
- super(component);
- }
-
- public void setGrabbed(boolean grab) {
- if (is_grabbed != grab) {
- super.setGrabbed(grab);
- warpCursor();
- grabMouse(grab);
- }
- }
-
- private static synchronized void grabMouse(boolean grab) {
- is_grabbed = grab;
- if (!grab)
- nGrabMouse(grab);
- }
-
- protected void resetCursorToCenter() {
- super.resetCursorToCenter();
- /* Clear accumulated deltas */
- getMouseDeltas(delta_buffer);
- }
-
- protected void updateDeltas(long nanos) {
- super.updateDeltas(nanos);
- synchronized ( this ) {
- getMouseDeltas(delta_buffer);
- int dx = delta_buffer.get(0);
- int dy = -delta_buffer.get(1);
- if (skip_event) {
- skip_event = false;
- nGrabMouse(isGrabbed());
- return;
- }
- if ( dx != 0 || dy != 0 ) {
- putMouseEventWithCoords((byte)-1, (byte)0, dx, dy, 0, nanos);
- addDelta(dx, dy);
- }
- }
- }
-
- void warpCursor() {
- synchronized (this) {
- // If we're going to warp the cursor position, we'll skip the next event to avoid bogus delta values
- skip_event = isGrabbed();
- }
- }
-
- private static native void getMouseDeltas(IntBuffer delta_buffer);
-
- public static native void nWarpCursor(int x, int y);
-
- public static native void nGrabMouse(boolean grab);
-}
Modified: branches/osx-java7/LWJGL/src/java/org/lwjgl/opengl/MacOSXNativeMouse.java
===================================================================
--- branches/osx-java7/LWJGL/src/java/org/lwjgl/opengl/MacOSXNativeMouse.java 2012-11-11 19:03:50 UTC (rev 3825)
+++ branches/osx-java7/LWJGL/src/java/org/lwjgl/opengl/MacOSXNativeMouse.java 2012-11-13 21:13:11 UTC (rev 3826)
@@ -92,6 +92,10 @@
nRegisterMouseListener(window_handle);
}
+ public synchronized void warpCursor(int x, int y) {
+ nWarpCursor(window_handle, x, y);
+ }
+
public synchronized void unregister() {
nUnregisterMouseListener(window_handle);
}
Deleted: branches/osx-java7/LWJGL/src/native/macosx/org_lwjgl_input_Mouse.c
===================================================================
--- branches/osx-java7/LWJGL/src/native/macosx/org_lwjgl_input_Mouse.c 2012-11-11 19:03:50 UTC (rev 3825)
+++ branches/osx-java7/LWJGL/src/native/macosx/org_lwjgl_input_Mouse.c 2012-11-13 21:13:11 UTC (rev 3826)
@@ -1,73 +0,0 @@
-/*
- * Copyright (c) 2002-2008 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$
- *
- * Mac OS X mouse handling.
- *
- * @author elias_naur <eli...@us...>
- * @version $Revision$
- */
-
-#include <jni.h>
-#include <ApplicationServices/ApplicationServices.h>
-#include "org_lwjgl_opengl_MacOSXMouseEventQueue.h"
-#include "common_tools.h"
-
-JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXMouseEventQueue_nGrabMouse(JNIEnv *env, jclass unused, jboolean grab) {
- CGAssociateMouseAndMouseCursorPosition(grab == JNI_TRUE ? FALSE : TRUE);
- if (grab)
- CGDisplayHideCursor(kCGDirectMainDisplay);
- else
- CGDisplayShowCursor(kCGDirectMainDisplay);
-}
-
-JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXMouseEventQueue_nWarpCursor(JNIEnv *env, jclass unused, jint x, jint y) {
- CGPoint p;
- p.x = x;
- p.y = y;
- CGWarpMouseCursorPosition(p);
-}
-
-JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXMouseEventQueue_getMouseDeltas(JNIEnv *env, jclass unused, jobject delta_buffer) {
- CGMouseDelta dx, dy;
- CGGetLastMouseDelta(&dx, &dy);
- int buffer_length = (*env)->GetDirectBufferCapacity(env, delta_buffer);
- if (buffer_length != 2) {
- printfDebugJava(env, "Delta buffer not large enough!");
- return;
- }
- jint *buffer = (*env)->GetDirectBufferAddress(env, delta_buffer);
- buffer[0] = dx;
- buffer[1] = dy;
-}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2012-11-11 19:03:56
|
Revision: 3825
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3825&view=rev
Author: kappa1
Date: 2012-11-11 19:03:50 +0000 (Sun, 11 Nov 2012)
Log Message:
-----------
fix resizing when using Display.setParent()
Modified Paths:
--------------
branches/osx-java7/LWJGL/src/java/org/lwjgl/opengl/MacOSXDisplay.java
Modified: branches/osx-java7/LWJGL/src/java/org/lwjgl/opengl/MacOSXDisplay.java
===================================================================
--- branches/osx-java7/LWJGL/src/java/org/lwjgl/opengl/MacOSXDisplay.java 2012-11-11 18:43:14 UTC (rev 3824)
+++ branches/osx-java7/LWJGL/src/java/org/lwjgl/opengl/MacOSXDisplay.java 2012-11-11 19:03:50 UTC (rev 3825)
@@ -583,11 +583,7 @@
}
public boolean wasResized() {
- if (native_mode) {
- return nWasResized(window);
- } else {
- return canvas_listener.wasResized();
- }
+ return nWasResized(window);
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2012-11-11 18:43:22
|
Revision: 3824
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3824&view=rev
Author: kappa1
Date: 2012-11-11 18:43:14 +0000 (Sun, 11 Nov 2012)
Log Message:
-----------
implement missing functionality for Display.getWidth() and Display.getHeight() not updating correctly on resize
Modified Paths:
--------------
branches/osx-java7/LWJGL/src/java/org/lwjgl/opengl/MacOSXDisplay.java
branches/osx-java7/LWJGL/src/native/macosx/org_lwjgl_opengl_Display.m
Modified: branches/osx-java7/LWJGL/src/java/org/lwjgl/opengl/MacOSXDisplay.java
===================================================================
--- branches/osx-java7/LWJGL/src/java/org/lwjgl/opengl/MacOSXDisplay.java 2012-11-11 15:48:08 UTC (rev 3823)
+++ branches/osx-java7/LWJGL/src/java/org/lwjgl/opengl/MacOSXDisplay.java 2012-11-11 18:43:14 UTC (rev 3824)
@@ -121,6 +121,10 @@
private native void nResizeWindow(ByteBuffer window_handle, int x, int y, int width, int height);
private native boolean nWasResized(ByteBuffer window_handle);
+
+ private native int nGetWidth(ByteBuffer window_handle);
+
+ private native int nGetHeight(ByteBuffer window_handle);
private static boolean isUndecorated() {
return Display.getPrivilegedBoolean("org.lwjgl.opengl.Window.undecorated");
@@ -561,11 +565,11 @@
}
public int getWidth() {
- return width;
+ return nGetWidth(window);
}
-
+
public int getHeight() {
- return height;
+ return nGetHeight(window);
}
public boolean isInsideWindow() {
Modified: branches/osx-java7/LWJGL/src/native/macosx/org_lwjgl_opengl_Display.m
===================================================================
--- branches/osx-java7/LWJGL/src/native/macosx/org_lwjgl_opengl_Display.m 2012-11-11 15:48:08 UTC (rev 3823)
+++ branches/osx-java7/LWJGL/src/native/macosx/org_lwjgl_opengl_Display.m 2012-11-11 18:43:14 UTC (rev 3824)
@@ -370,6 +370,18 @@
return was_resized;
}
+JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_MacOSXDisplay_nGetWidth(JNIEnv *env, jobject this, jobject window_handle) {
+ MacOSXWindowInfo *window_info = (MacOSXWindowInfo *)(*env)->GetDirectBufferAddress(env, window_handle);
+ jint width = window_info->display_rect.size.width;
+ return width;
+}
+
+JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_MacOSXDisplay_nGetHeight(JNIEnv *env, jobject this, jobject window_handle) {
+ MacOSXWindowInfo *window_info = (MacOSXWindowInfo *)(*env)->GetDirectBufferAddress(env, window_handle);
+ jint height = window_info->display_rect.size.height;
+ return height;
+}
+
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXDisplay_nSetResizable(JNIEnv *env, jobject this, jobject window_handle, jboolean resizable) {
MacOSXWindowInfo *window_info = (MacOSXWindowInfo *)(*env)->GetDirectBufferAddress(env, window_handle);
NSUInteger style_mask = [window_info->window styleMask];
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2012-11-11 15:48:18
|
Revision: 3823
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3823&view=rev
Author: kappa1
Date: 2012-11-11 15:48:08 +0000 (Sun, 11 Nov 2012)
Log Message:
-----------
Run some Cocoa methods in nCreateWindow on the main thread (Thread-0) instead of the JNI thread.
Modified Paths:
--------------
branches/osx-java7/LWJGL/src/native/macosx/org_lwjgl_opengl_Display.m
Modified: branches/osx-java7/LWJGL/src/native/macosx/org_lwjgl_opengl_Display.m
===================================================================
--- branches/osx-java7/LWJGL/src/native/macosx/org_lwjgl_opengl_Display.m 2012-11-10 00:42:34 UTC (rev 3822)
+++ branches/osx-java7/LWJGL/src/native/macosx/org_lwjgl_opengl_Display.m 2012-11-11 15:48:08 UTC (rev 3823)
@@ -430,10 +430,14 @@
[window_info->view setParent:window_info];
[window_info->window setContentView:window_info->view];
- [window_info->window makeKeyAndOrderFront:[NSApplication sharedApplication]];
- [window_info->window makeFirstResponder:window_info->view];
- [window_info->window setReleasedWhenClosed:YES];
- [window_info->window setInitialFirstResponder:window_info->view];
+ //[window_info->window makeKeyAndOrderFront:[NSApplication sharedApplication]];
+ //[window_info->window makeFirstResponder:window_info->view];
+ //[window_info->window setReleasedWhenClosed:YES];
+ //[window_info->window setInitialFirstResponder:window_info->view];
+ [window_info->window performSelectorOnMainThread:@selector(makeKeyAndOrderFront:) withObject:[NSApplication sharedApplication] waitUntilDone:NO];
+ [window_info->window performSelectorOnMainThread:@selector(makeFirstResponder:) withObject:window_info->view waitUntilDone:NO];
+ [window_info->window performSelectorOnMainThread:@selector(setReleasedWhenClosed:) withObject:window_info->window waitUntilDone:NO];
+ [window_info->window performSelectorOnMainThread:@selector(setInitialFirstResponder:) withObject:window_info->view waitUntilDone:NO];
if (window_info->window_options != NSApplicationPresentationDefault) {
printf("Non-default\n"); fflush(stdout);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2012-11-10 00:42:41
|
Revision: 3822
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3822&view=rev
Author: kappa1
Date: 2012-11-10 00:42:34 +0000 (Sat, 10 Nov 2012)
Log Message:
-----------
Switch to using the correct Cocoa method for Display.isCloseRequested()
Modified Paths:
--------------
branches/osx-java7/LWJGL/src/native/macosx/org_lwjgl_opengl_Display.m
Modified: branches/osx-java7/LWJGL/src/native/macosx/org_lwjgl_opengl_Display.m
===================================================================
--- branches/osx-java7/LWJGL/src/native/macosx/org_lwjgl_opengl_Display.m 2012-11-06 21:55:11 UTC (rev 3821)
+++ branches/osx-java7/LWJGL/src/native/macosx/org_lwjgl_opengl_Display.m 2012-11-10 00:42:34 UTC (rev 3822)
@@ -78,16 +78,14 @@
return default_format;
}
-- (void) windowWillClose:(NSNotification *)notification
-{
- MacOSXKeyableWindow *closingWindow = [notification object];
-
- if (_parent != nil && closingWindow == _parent->window) {
+- (BOOL)windowShouldClose:(id)sender {
+ if (_parent != nil) {
JNIEnv *env = attachCurrentThread();
jclass display_class = (*env)->GetObjectClass(env, _parent->jdisplay);
jmethodID close_callback = (*env)->GetMethodID(env, display_class, "doHandleQuit", "()V");
(*env)->CallVoidMethod(env, _parent->jdisplay, close_callback);
}
+ return NO;
}
- (id)initWithFrame:(NSRect)frameRect pixelFormat:(NSOpenGLPixelFormat*)format
@@ -163,18 +161,10 @@
}
- (void)setParent:(MacOSXWindowInfo*)parent {
- // Un-register for native window close events if we have a parent window already
- if (_parent != nil) {
- [[NSNotificationCenter defaultCenter] removeObserver:self
- name:NSWindowWillCloseNotification
- object:_parent->window];
- }
_parent = parent;
- // Register for native window close events if we now have a parent window
+ // Set this NSView as delegate to get native window close events for windowShouldClose method
if (_parent != nil) {
- [[NSNotificationCenter defaultCenter] addObserver:self
- selector:@selector(windowWillClose:) name:NSWindowWillCloseNotification
- object:_parent->window];
+ [_parent->window setDelegate:self];
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2012-11-06 21:55:20
|
Revision: 3821
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3821&view=rev
Author: kappa1
Date: 2012-11-06 21:55:11 +0000 (Tue, 06 Nov 2012)
Log Message:
-----------
Fix main build file to generate MacOSXNativeKeyboard and MacOSXNativeMouse native headers
Modified Paths:
--------------
branches/osx-java7/LWJGL/build.xml
Modified: branches/osx-java7/LWJGL/build.xml
===================================================================
--- branches/osx-java7/LWJGL/build.xml 2012-11-06 21:45:45 UTC (rev 3820)
+++ branches/osx-java7/LWJGL/build.xml 2012-11-06 21:55:11 UTC (rev 3821)
@@ -322,6 +322,8 @@
<class name="org.lwjgl.opengl.MacOSXPbufferPeerInfo" />
<class name="org.lwjgl.opengl.MacOSXDisplay" />
<class name="org.lwjgl.opengl.MacOSXContextImplementation" />
+ <class name="org.lwjgl.opengl.MacOSXNativeKeyboard" />
+ <class name="org.lwjgl.opengl.MacOSXNativeMouse" />
</javah>
<javah classpath="${lwjgl.bin}" destdir="${lwjgl.src.headers}" force="yes">
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2012-11-06 21:45:52
|
Revision: 3820
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3820&view=rev
Author: kappa1
Date: 2012-11-06 21:45:45 +0000 (Tue, 06 Nov 2012)
Log Message:
-----------
upload mc78's latest build.xml fixes, gets rid of the depreciated warnings
Modified Paths:
--------------
branches/osx-java7/LWJGL/platform_build/macosx_ant/build.xml
Modified: branches/osx-java7/LWJGL/platform_build/macosx_ant/build.xml
===================================================================
--- branches/osx-java7/LWJGL/platform_build/macosx_ant/build.xml 2012-11-06 16:18:28 UTC (rev 3819)
+++ branches/osx-java7/LWJGL/platform_build/macosx_ant/build.xml 2012-11-06 21:45:45 UTC (rev 3820)
@@ -7,8 +7,11 @@
<mkdir dir="x86_64"/>
<property environment="env" />
<!-- Check which gcc we have, newer releasse of Mac OS do not have gcc-4.2 installed by defaault -->
- <available file="gcc" filepath="${env.PATH}" property="gcc" value="gcc"/>
- <available file="gcc-4.2" filepath="${env.PATH}" property="gcc" value="gcc-4.2"/>
+ <available file="gcc" filepath="${env.PATH}" property="gcc.name" value="gcc"/>
+ <available file="gcc-4.2" filepath="${env.PATH}" property="gcc42.name" value="gcc-4.2"/>
+ <condition property="gcc" value="${gcc42.name}" else="${gcc.name}">
+ <isset property="gcc42.name" />
+ </condition>
<!-- Ask Xcode for correct path to XCode tools -->
<!-- Will fail if XCode Command Line Tools are not installed on 10.7+ (Lion) -->
<exec executable="xcode-select" outputproperty="developer_path" errorproperty="xcode-select.error" failonerror="false" failifexecutionfails="false">
@@ -18,33 +21,77 @@
<condition property="developer_path" value="/Developer">
<isset property="xcode-select.error" />
</condition>
- <!-- Lion and above do not have /Developer nor the 10.6 SDK, so use 10.7 SDK -->
- <condition property="sdkroot" value="${developer_path}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk">
+ <!-- Detect Mac OS X 10.7 SDK in new Xcode path for for Mac OS 10.7+ -->
+ <condition property="sdk-10.7" value="${developer_path}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk">
<available file="${developer_path}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk" type="dir"/>
</condition>
- <condition property="javavmroot" value="${developer_path}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk">
+ <condition property="javavm-10.7" value="${developer_path}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk">
<available file="${developer_path}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/JavaVM.framework/Versions/A/Headers" type="dir"/>
</condition>
- <!-- Fallback to 10.6 SDK if present on file system under new Xcode location -->
- <condition property="sdkroot" value="${developer_path}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk">
+ <!-- Detect Mac OS X 10.6 SDK copied into new Xcode path for Mac OS 10.7+ -->
+ <condition property="sdk-10.6" value="${developer_path}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk">
<available file="${developer_path}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk" type="dir"/>
</condition>
- <condition property="javavmroot" value="${developer_path}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk">
+ <condition property="javavm-10.6" value="${developer_path}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk">
<available file="${developer_path}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/JavaVM.framework/Versions/A/Headers" type="dir"/>
</condition>
- <!-- Fallback to 10.6 SDK if present on old /Developer path -->
- <condition property="sdkroot" value="${developer_path}/SDKs/MacOSx10.6.sdk">
+ <!-- Detect Mac OS X 10.6 SDK in old XCode location for Mac OS 10.6 -->
+ <condition property="old.sdk-10.6" value="${developer_path}/SDKs/MacOSx10.6.sdk">
<available file="${developer_path}/SDKs/MacOSx10.6.sdk" type="dir"/>
</condition>
- <!-- Only use /System/Library/Frameworks/JavaVM.framework/ if nothing under other SDK's is found -->
- <condition property="javavmroot" value="">
+ <condition property="old.javavm-10.6" value="">
+ <available file="/System/Library/Frameworks/JavaVM.framework/Versions/A/Headers" type="dir"/>
+ </condition>
+ <!-- Use old JavaVM.framework location if nothing else is available -->
+ <condition property="javavmroot" value="${old.javavm-10.6}">
<and>
- <available file="/System/Library/Frameworks/JavaVM.framework/Versions/A/Headers" type="dir"/>
+ <isset property="old.javavm-10.6" />
<not>
- <isset property="javavmroot" />
+ <or>
+ <isset property="javavm-10.6" />
+ <isset property="javavm-10.7" />
+ </or>
</not>
</and>
</condition>
+ <!-- Use JavaVM.framework from 10.6 in new Xcode path if available -->
+ <condition property="javavmroot" value="${javavm-10.6}">
+ <isset property="javavm-10.6" />
+ </condition>
+ <!-- Use JavaVM.framework from 10.7 in new Xcode path if available and 10.6 isn't also there -->
+ <condition property="javavmroot" value="${javavm-10.7}">
+ <and>
+ <isset property="javavm-10.7" />
+ <not>
+ <isset property="javavm-10.6" />
+ </not>
+ </and>
+ </condition>
+ <!-- Use MacOS SDK 10.6 from /Developer if nothing else is available -->
+ <condition property="sdkroot" value="${old.sdk-10.6}">
+ <and>
+ <isset property="old.sdk-10.6" />
+ <not>
+ <or>
+ <isset property="sdk-10.6" />
+ <isset property="sdk-10.7" />
+ </or>
+ </not>
+ </and>
+ </condition>
+ <!-- Use MacOS SDK 10.6 from new Xcode location if available -->
+ <condition property="sdkroot" value="${sdk-10.6}">
+ <isset property="sdk-10.6" />
+ </condition>
+ <!-- Use MacOS SDK 10.7 in new Xcode path if available and 10.6 SDK isn't also there -->
+ <condition property="sdkroot" value="${sdk-10.7}">
+ <and>
+ <isset property="sdk-10.7" />
+ <not>
+ <isset property="sdk-10.6" />
+ </not>
+ </and>
+ </condition>
</target>
<target name="clean">
@@ -83,6 +130,9 @@
</target>
<target name="nativelibrary" depends="init">
+ <echo message=" GCC: ${gcc}"/>
+ <echo message=" Mac OS SDK: ${sdkroot}"/>
+ <echo message="JavaVM.framework: ${javavmroot}"/>
<property name="universal_sdkroot" location="${sdkroot}"/>
<property name="x86_64_sdkroot" location="${sdkroot}"/>
<property name="universal_flags" value="-isysroot ${universal_sdkroot}"/>
@@ -123,4 +173,4 @@
<fileset file="x86_64/liblwjgl-i86_64.jnilib"/>
</apply>
</target>
-</project>
+</project>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sp...@us...> - 2012-11-06 16:18:37
|
Revision: 3819
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3819&view=rev
Author: spasi
Date: 2012-11-06 16:18:28 +0000 (Tue, 06 Nov 2012)
Log Message:
-----------
Added missing alternative signature functions.
Modified Paths:
--------------
trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_shader_subroutine.java
trunk/LWJGL/src/templates/org/lwjgl/opengl/GL40.java
Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_shader_subroutine.java
===================================================================
--- trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_shader_subroutine.java 2012-11-06 12:14:03 UTC (rev 3818)
+++ trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_shader_subroutine.java 2012-11-06 16:18:28 UTC (rev 3819)
@@ -64,11 +64,19 @@
@Reuse("GL40")
int glGetSubroutineUniformLocation(@GLuint int program, @GLenum int shadertype, @Const @NullTerminated ByteBuffer name);
+ @Alternate("glGetSubroutineUniformLocation")
@Reuse("GL40")
+ int glGetSubroutineUniformLocation(@GLuint int program, @GLenum int shadertype, @NullTerminated CharSequence name);
+
+ @Reuse("GL40")
@GLuint
int glGetSubroutineIndex(@GLuint int program, @GLenum int shadertype, @Const @NullTerminated ByteBuffer name);
+ @Alternate("glGetSubroutineIndex")
@Reuse("GL40")
+ int glGetSubroutineIndex(@GLuint int program, @GLenum int shadertype, @NullTerminated CharSequence name);
+
+ @Reuse("GL40")
@StripPostfix("values")
void glGetActiveSubroutineUniformiv(@GLuint int program, @GLenum int shadertype, @GLuint int index, @GLenum int pname,
@Check("1") @OutParameter IntBuffer values);
Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/GL40.java
===================================================================
--- trunk/LWJGL/src/templates/org/lwjgl/opengl/GL40.java 2012-11-06 12:14:03 UTC (rev 3818)
+++ trunk/LWJGL/src/templates/org/lwjgl/opengl/GL40.java 2012-11-06 16:18:28 UTC (rev 3819)
@@ -218,9 +218,16 @@
int glGetSubroutineUniformLocation(@GLuint int program, @GLenum int shadertype, @Const @NullTerminated ByteBuffer name);
+ @Alternate("glGetSubroutineUniformLocation")
+ int glGetSubroutineUniformLocation(@GLuint int program, @GLenum int shadertype, @NullTerminated CharSequence name);
+
@GLuint
int glGetSubroutineIndex(@GLuint int program, @GLenum int shadertype, @Const @NullTerminated ByteBuffer name);
+ @Alternate("glGetSubroutineIndex")
+ @GLuint
+ int glGetSubroutineIndex(@GLuint int program, @GLenum int shadertype, @NullTerminated CharSequence name);
+
@StripPostfix("values")
void glGetActiveSubroutineUniformiv(@GLuint int program, @GLenum int shadertype, @GLuint int index, @GLenum int pname,
@OutParameter @Check("1") IntBuffer values);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sp...@us...> - 2012-11-06 12:14:15
|
Revision: 3818
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3818&view=rev
Author: spasi
Date: 2012-11-06 12:14:03 +0000 (Tue, 06 Nov 2012)
Log Message:
-----------
Removed redundant GLsync definition and replaced APIENTRY with GL_APIENTRY.
Modified Paths:
--------------
trunk/LWJGL/src/native/common/opengles/extgl.h
trunk/LWJGL/src/native/common/opengles/extgl_types.h
Modified: trunk/LWJGL/src/native/common/opengles/extgl.h
===================================================================
--- trunk/LWJGL/src/native/common/opengles/extgl.h 2012-11-06 00:34:36 UTC (rev 3817)
+++ trunk/LWJGL/src/native/common/opengles/extgl.h 2012-11-06 12:14:03 UTC (rev 3818)
@@ -79,7 +79,7 @@
#include "extgl_types.h"
/* KHR_debug callback function pointer. */
-typedef void (APIENTRY *GLDEBUGPROC)(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar* message, GLvoid* userParam);
+typedef void (GL_APIENTRY *GLDEBUGPROC)(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar* message, GLvoid* userParam);
/* initializes everything, call this right after the rc is created. the function returns true if successful */
extern bool extgl_Open(JNIEnv *env);
Modified: trunk/LWJGL/src/native/common/opengles/extgl_types.h
===================================================================
--- trunk/LWJGL/src/native/common/opengles/extgl_types.h 2012-11-06 00:34:36 UTC (rev 3817)
+++ trunk/LWJGL/src/native/common/opengles/extgl_types.h 2012-11-06 12:14:03 UTC (rev 3818)
@@ -70,7 +70,4 @@
// EGL_image_OES
typedef void* GLeglImageOES;
-// We need this to compile OpenCL
-typedef struct __GLsync * GLsync;
-
#endif
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2012-11-06 00:34:42
|
Revision: 3817
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3817&view=rev
Author: kappa1
Date: 2012-11-06 00:34:36 +0000 (Tue, 06 Nov 2012)
Log Message:
-----------
remove unused AWT import
Modified Paths:
--------------
branches/osx-java7/LWJGL/src/java/org/lwjgl/MacOSXSysImplementation.java
Modified: branches/osx-java7/LWJGL/src/java/org/lwjgl/MacOSXSysImplementation.java
===================================================================
--- branches/osx-java7/LWJGL/src/java/org/lwjgl/MacOSXSysImplementation.java 2012-11-05 23:19:46 UTC (rev 3816)
+++ branches/osx-java7/LWJGL/src/java/org/lwjgl/MacOSXSysImplementation.java 2012-11-06 00:34:36 UTC (rev 3817)
@@ -31,8 +31,6 @@
*/
package org.lwjgl;
-import java.awt.Toolkit;
-
import com.apple.eio.FileManager;
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|