You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(134) |
Sep
(52) |
Oct
(13) |
Nov
(342) |
Dec
(163) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(44) |
Feb
(62) |
Mar
(158) |
Apr
(38) |
May
(70) |
Jun
(58) |
Jul
(104) |
Aug
(207) |
Sep
(83) |
Oct
(122) |
Nov
(23) |
Dec
(49) |
| 2004 |
Jan
(119) |
Feb
(132) |
Mar
(192) |
Apr
(140) |
May
(77) |
Jun
(74) |
Jul
(201) |
Aug
(63) |
Sep
(102) |
Oct
(70) |
Nov
(173) |
Dec
(78) |
| 2005 |
Jan
(174) |
Feb
(197) |
Mar
(105) |
Apr
(59) |
May
(77) |
Jun
(43) |
Jul
(21) |
Aug
(18) |
Sep
(47) |
Oct
(37) |
Nov
(74) |
Dec
(50) |
| 2006 |
Jan
(44) |
Feb
(19) |
Mar
(32) |
Apr
(24) |
May
(31) |
Jun
(55) |
Jul
(138) |
Aug
(28) |
Sep
(12) |
Oct
(41) |
Nov
(58) |
Dec
(24) |
| 2007 |
Jan
(28) |
Feb
(14) |
Mar
(10) |
Apr
(68) |
May
(30) |
Jun
(26) |
Jul
(18) |
Aug
(63) |
Sep
(19) |
Oct
(29) |
Nov
(20) |
Dec
(10) |
| 2008 |
Jan
(38) |
Feb
(7) |
Mar
(37) |
Apr
(120) |
May
(41) |
Jun
(36) |
Jul
(39) |
Aug
(24) |
Sep
(28) |
Oct
(30) |
Nov
(36) |
Dec
(75) |
| 2009 |
Jan
(46) |
Feb
(22) |
Mar
(50) |
Apr
(70) |
May
(134) |
Jun
(105) |
Jul
(75) |
Aug
(34) |
Sep
(38) |
Oct
(34) |
Nov
(19) |
Dec
(20) |
| 2010 |
Jan
(11) |
Feb
(20) |
Mar
(65) |
Apr
(83) |
May
(104) |
Jun
(73) |
Jul
(78) |
Aug
(57) |
Sep
(43) |
Oct
(35) |
Nov
(9) |
Dec
(4) |
| 2011 |
Jan
(21) |
Feb
(11) |
Mar
(18) |
Apr
(10) |
May
(18) |
Jun
(15) |
Jul
(48) |
Aug
(25) |
Sep
(17) |
Oct
(45) |
Nov
(15) |
Dec
(12) |
| 2012 |
Jan
(21) |
Feb
(9) |
Mar
(12) |
Apr
(9) |
May
(9) |
Jun
(5) |
Jul
(1) |
Aug
(10) |
Sep
(12) |
Oct
(1) |
Nov
(28) |
Dec
(5) |
| 2013 |
Jan
(4) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2014 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
| 2015 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
| 2016 |
Jan
(2) |
Feb
(1) |
Mar
(1) |
Apr
(1) |
May
(2) |
Jun
|
Jul
(1) |
Aug
(2) |
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
1
(2) |
2
|
3
|
4
(2) |
5
|
6
|
7
(1) |
|
8
|
9
|
10
(1) |
11
(3) |
12
|
13
(2) |
14
(1) |
|
15
|
16
|
17
(3) |
18
|
19
|
20
|
21
(1) |
|
22
|
23
|
24
|
25
|
26
|
27
|
28
|
|
29
|
30
|
31
(2) |
|
|
|
|
|
From: <sp...@us...> - 2011-05-31 14:40:53
|
Revision: 3539
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3539&view=rev
Author: spasi
Date: 2011-05-31 14:40:47 +0000 (Tue, 31 May 2011)
Log Message:
-----------
Update current DisplayMode when the Display's parent is resized.
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/opengl/Display.java
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/Display.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/Display.java 2011-05-31 13:32:38 UTC (rev 3538)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/Display.java 2011-05-31 14:40:47 UTC (rev 3539)
@@ -270,7 +270,7 @@
}
private static DisplayMode getEffectiveMode() {
- return !isFullscreen() && parent != null ? new DisplayMode(parent.getWidth(), parent.getHeight()) : current_mode;
+ return !isFullscreen() && parent != null ? (current_mode = new DisplayMode(parent.getWidth(), parent.getHeight())) : current_mode;
}
private static int getWindowX() {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sp...@us...> - 2011-05-31 13:32:44
|
Revision: 3538
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3538&view=rev
Author: spasi
Date: 2011-05-31 13:32:38 +0000 (Tue, 31 May 2011)
Log Message:
-----------
Update current DisplayMode when the Display's parent is resized.
Modified Paths:
--------------
branches/opengles/LWJGL/src/java/org/lwjgl/opengl/Display.java
Modified: branches/opengles/LWJGL/src/java/org/lwjgl/opengl/Display.java
===================================================================
--- branches/opengles/LWJGL/src/java/org/lwjgl/opengl/Display.java 2011-05-21 10:48:05 UTC (rev 3537)
+++ branches/opengles/LWJGL/src/java/org/lwjgl/opengl/Display.java 2011-05-31 13:32:38 UTC (rev 3538)
@@ -249,7 +249,7 @@
}
private static DisplayMode getEffectiveMode() {
- return !isFullscreen() && parent != null ? new DisplayMode(parent.getWidth(), parent.getHeight()) : current_mode;
+ return !isFullscreen() && parent != null ? (current_mode = new DisplayMode(parent.getWidth(), parent.getHeight())) : current_mode;
}
private static int getWindowX() {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sp...@us...> - 2011-05-21 10:48:14
|
Revision: 3537
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3537&view=rev
Author: spasi
Date: 2011-05-21 10:48:05 +0000 (Sat, 21 May 2011)
Log Message:
-----------
Added support for NV_present_video and NV_video_capture.
Re-designed WindowsPeerInfo so that we can more easily use WGL extensions in the future.
Modified Paths:
--------------
branches/opengles/LWJGL/build.xml
branches/opengles/LWJGL/src/native/common/opengl/extgl.h
branches/opengles/LWJGL/src/native/linux/opengl/extgl_glx.c
branches/opengles/LWJGL/src/native/linux/opengl/extgl_glx.h
branches/opengles/LWJGL/src/native/windows/opengl/context.h
branches/opengles/LWJGL/src/native/windows/opengl/extgl_wgl.c
branches/opengles/LWJGL/src/native/windows/opengl/extgl_wgl.h
branches/opengles/LWJGL/src/native/windows/opengl/org_lwjgl_opengl_Pbuffer.c
branches/opengles/LWJGL/src/native/windows/opengl/org_lwjgl_opengl_WindowsContextImplementation.c
branches/opengles/LWJGL/src/native/windows/opengles/context.h
Added Paths:
-----------
branches/opengles/LWJGL/src/java/org/lwjgl/opengl/NVPresentVideoUtil.java
branches/opengles/LWJGL/src/java/org/lwjgl/opengl/NVVideoCaptureUtil.java
branches/opengles/LWJGL/src/native/common/opengl/org_lwjgl_opengl_NVPresentVideoUtil.c
branches/opengles/LWJGL/src/native/common/opengl/org_lwjgl_opengl_NVVideoCaptureUtil.c
branches/opengles/LWJGL/src/native/linux/opengl/GLX.c
branches/opengles/LWJGL/src/native/linux/opengl/GLX.h
branches/opengles/LWJGL/src/native/windows/opengl/WGL.c
branches/opengles/LWJGL/src/native/windows/opengl/WGL.h
branches/opengles/LWJGL/src/templates/org/lwjgl/opengl/NV_present_video.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengl/NV_video_capture.java
Modified: branches/opengles/LWJGL/build.xml
===================================================================
--- branches/opengles/LWJGL/build.xml 2011-05-17 17:26:33 UTC (rev 3536)
+++ branches/opengles/LWJGL/build.xml 2011-05-21 10:48:05 UTC (rev 3537)
@@ -49,6 +49,7 @@
<!-- Useful when we need to force native recompilation -->
<target name="clean-native" description="Cleans native files generated by this ant script" depends="clean-generated-native">
<delete dir="${lwjgl.bin}/lwjgl" quiet="true" failonerror="false" taskname="cleaning native bin folder" />
+ <delete dir="${lwjgl.bin}/lwjgles" quiet="true" failonerror="false" taskname="cleaning native OpenGL ES bin folder"/>
</target>
<!-- Creates a distribution of LWJGL -->
@@ -305,6 +306,8 @@
<class name="org.lwjgl.opengl.GLContext"/>
<class name="org.lwjgl.opengl.Pbuffer"/>
<class name="org.lwjgl.opengl.CallbackUtil"/>
+ <class name="org.lwjgl.opengl.NVPresentVideoUtil"/>
+ <class name="org.lwjgl.opengl.NVVideoCaptureUtil"/>
</javah>
<javah classpath="${lwjgl.bin}" destdir="${lwjgl.src.headers}/opengles" force="yes">
Added: branches/opengles/LWJGL/src/java/org/lwjgl/opengl/NVPresentVideoUtil.java
===================================================================
--- branches/opengles/LWJGL/src/java/org/lwjgl/opengl/NVPresentVideoUtil.java (rev 0)
+++ branches/opengles/LWJGL/src/java/org/lwjgl/opengl/NVPresentVideoUtil.java 2011-05-21 10:48:05 UTC (rev 3537)
@@ -0,0 +1,122 @@
+/*
+ * Copyright (c) 2002-2011 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;
+
+import org.lwjgl.BufferChecks;
+import org.lwjgl.LWJGLUtil;
+
+import java.nio.ByteBuffer;
+import java.nio.IntBuffer;
+import java.nio.LongBuffer;
+
+/**
+ * This class exposes the platform specific functionality present in the
+ * NV_present_video extension.
+ *
+ * @author Spasi
+ * @since 20/5/2011
+ */
+public final class NVPresentVideoUtil {
+
+ private NVPresentVideoUtil() {}
+
+ private static void checkExtension() {
+ if ( LWJGLUtil.CHECKS && !GLContext.getCapabilities().GL_NV_present_video )
+ throw new IllegalStateException("NV_present_video is not supported");
+ }
+
+ private static ByteBuffer getPeerInfo() {
+ return ContextGL.getCurrentContext().getPeerInfo().getHandle();
+ }
+
+ /**
+ * Enumerate the available video output devices. This method is the cross-platform
+ * equivalent of glXEnumerateVideoDevicesNV and wglEnumerateVideoDevicesNV. Since they are
+ * not really compatible, this method works like the WGL version. That is, you first
+ * call it with a null devices buffer, get the number of devices, then call it again
+ * with an appropriately sized buffer.
+ *
+ * @param devices the buffer to store devices in
+ *
+ * @return the number of available video output devices
+ */
+ public static int glEnumerateVideoDevicesNV(LongBuffer devices) {
+ checkExtension();
+
+ if ( devices != null )
+ BufferChecks.checkBuffer(devices, 1);
+ return nglEnumerateVideoDevicesNV(getPeerInfo(), devices, devices == null ? 0 : devices.position());
+ }
+
+ private static native int nglEnumerateVideoDevicesNV(ByteBuffer peer_info, LongBuffer devices, int devices_position);
+
+ /**
+ * Binds the video output device specified to one of the context's available video output slots.
+ * This method is the cross-platform equivalent of glXBindVideoDeviceNV and wglBindVideoDeviceNV.
+ * To release a video device without binding another device to the same slot, call it with
+ * video_device set to 0 (will use INVALID_HANDLE_VALUE on WGL).
+ *
+ * @param video_slot the video slot
+ * @param video_device the video device
+ * @param attrib_list the attributes to use
+ *
+ * @return true if the binding was successful
+ */
+ public static boolean glBindVideoDeviceNV(int video_slot, long video_device, IntBuffer attrib_list) {
+ checkExtension();
+
+ if ( attrib_list != null )
+ BufferChecks.checkNullTerminated(attrib_list);
+ return nglBindVideoDeviceNV(getPeerInfo(), video_slot, video_device, attrib_list, attrib_list == null ? 0 : attrib_list.position());
+ }
+
+ private static native boolean nglBindVideoDeviceNV(ByteBuffer peer_info, int video_slot, long video_device, IntBuffer attrib_list, int attrib_list_position);
+
+ /**
+ * Queries an attribute associated with the current context. This method is the cross-platform
+ * equivalent of glXQueryContext and wglQueryCurrentContextNV.
+ *
+ * @param attrib the attribute to query
+ * @param value the buffer to store the value in
+ */
+ public static boolean glQueryContextNV(int attrib, IntBuffer value) {
+ checkExtension();
+
+ BufferChecks.checkBuffer(value, 1);
+ ContextGL ctx = ContextGL.getCurrentContext();
+ return nglQueryContextNV(ctx.getPeerInfo().getHandle(), ctx.getHandle(), attrib, value, value.position());
+ }
+
+ private static native boolean nglQueryContextNV(ByteBuffer peer_info, ByteBuffer context_handle, int attrib, IntBuffer value, int value_position);
+
+}
Added: branches/opengles/LWJGL/src/java/org/lwjgl/opengl/NVVideoCaptureUtil.java
===================================================================
--- branches/opengles/LWJGL/src/java/org/lwjgl/opengl/NVVideoCaptureUtil.java (rev 0)
+++ branches/opengles/LWJGL/src/java/org/lwjgl/opengl/NVVideoCaptureUtil.java 2011-05-21 10:48:05 UTC (rev 3537)
@@ -0,0 +1,153 @@
+/*
+ * Copyright (c) 2002-2011 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;
+
+import org.lwjgl.BufferChecks;
+import org.lwjgl.LWJGLUtil;
+
+import java.nio.ByteBuffer;
+import java.nio.IntBuffer;
+import java.nio.LongBuffer;
+
+/**
+ * This class exposes the platform specific functionality present in the
+ * NV_video_capture extension.
+ *
+ * @author Spasi
+ * @since 20/5/2011
+ */
+public final class NVVideoCaptureUtil {
+
+ private NVVideoCaptureUtil() {}
+
+ private static void checkExtension() {
+ if ( LWJGLUtil.CHECKS && !GLContext.getCapabilities().GL_NV_video_capture )
+ throw new IllegalStateException("NV_video_capture is not supported");
+ }
+
+ private static ByteBuffer getPeerInfo() {
+ return ContextGL.getCurrentContext().getPeerInfo().getHandle();
+ }
+
+ /**
+ * After successfully locking a video capture device, use this method to bind it
+ * to the capture slot specified in the current context. This method is the cross-
+ * platform equivalent of glXBindVideoCaptureDeviceNV and wglBindVideoCaptureDeviceNV.
+ *
+ * @param video_slot the video slot
+ * @param device the video capture device
+ *
+ * @return true if the binding was successful
+ */
+ public static boolean glBindVideoCaptureDeviceNV(int video_slot, long device) {
+ checkExtension();
+ return nglBindVideoCaptureDeviceNV(getPeerInfo(), video_slot, device);
+ }
+
+ private static native boolean nglBindVideoCaptureDeviceNV(ByteBuffer peer_info, int video_slot, long device);
+
+ /**
+ * Enumerate the available video capture devices. This method is the cross-platform
+ * equivalent of glXEnumerateVideoCaptureDevicesNV and wglEnumerateVideoCaptureDevicesNV.
+ * Since they are not really compatible, this method works like the WGL version. That is,
+ * you first call it with a null devices buffer, get the number of devices, then call it
+ * again with an appropriately sized buffer.
+ *
+ * @param devices the buffer to store devices in
+ *
+ * @return the number of available video capture devices
+ */
+ public static int glEnumerateVideoCaptureDevicesNV(LongBuffer devices) {
+ checkExtension();
+
+ if ( devices != null )
+ BufferChecks.checkBuffer(devices, 1);
+ return nglEnumerateVideoCaptureDevicesNV(getPeerInfo(), devices, devices == null ? 0 : devices.position());
+ }
+
+ private static native int nglEnumerateVideoCaptureDevicesNV(ByteBuffer peer_info, LongBuffer devices, int devices_position);
+
+ /**
+ * To lock a video capture device to a display connection, use this method.
+ * Before using a video capture device, it must be locked. Once a
+ * video capture device is locked by a process, no other process can
+ * lock a video capture device with the same unique ID until the lock
+ * is released or the process ends.
+ *
+ * @param device the device to lock
+ *
+ * @return true if the lock was successful
+ */
+ public static boolean glLockVideoCaptureDeviceNV(long device) {
+ checkExtension();
+ return nglLockVideoCaptureDeviceNV(getPeerInfo(), device);
+ }
+
+ private static native boolean nglLockVideoCaptureDeviceNV(ByteBuffer peer_info, long device);
+
+ /**
+ * Use this method to query the unique ID of the physical device backing a
+ * video capture device handle.
+ *
+ * @param device the device
+ * @param attribute the attribute to query
+ * @param value the buffer to store the value in
+ *
+ * @return true if the query was successful
+ */
+ public static boolean glQueryVideoCaptureDeviceNV(long device, int attribute, IntBuffer value) {
+ checkExtension();
+
+ BufferChecks.checkBuffer(value, 1);
+ return nglQueryVideoCaptureDeviceNV(getPeerInfo(), device, attribute, value, value.position());
+ }
+
+ private static native boolean nglQueryVideoCaptureDeviceNV(ByteBuffer peer_info, long device, int attribute, IntBuffer value, int value_position);
+
+ /**
+ * Use this method when finished capturing data on a locked video capture device
+ * to unlock it.
+ *
+ * @param device the device
+ *
+ * @return true if the device was unlocked successfully
+ */
+ public static boolean glReleaseVideoCaptureDeviceNV(long device) {
+ checkExtension();
+ return nglReleaseVideoCaptureDeviceNV(getPeerInfo(), device);
+ }
+
+ private static native boolean nglReleaseVideoCaptureDeviceNV(ByteBuffer peer_info, long device);
+
+}
+
Modified: branches/opengles/LWJGL/src/native/common/opengl/extgl.h
===================================================================
--- branches/opengles/LWJGL/src/native/common/opengl/extgl.h 2011-05-17 17:26:33 UTC (rev 3536)
+++ branches/opengles/LWJGL/src/native/common/opengl/extgl.h 2011-05-21 10:48:05 UTC (rev 3537)
@@ -103,4 +103,19 @@
extern bool extgl_QueryExtension(const GLubyte*extensions, const char *name);
extern void *extgl_GetProcAddress(const char *name);
+
+#ifndef __APPLE__
+ /* NV_present_video functions (GLX & WGL only) */
+ extern jint extgl_EnumerateVideoDevicesNV(JNIEnv *env, jobject peer_info_handle, jobject devices, jint devices_position);
+ extern jboolean extgl_BindVideoDeviceNV(JNIEnv *env, jobject peer_info_handle, jint video_slot, jlong video_device, jobject attrib_list, jint attrib_list_position);
+ extern jboolean extgl_QueryContextNV(JNIEnv *env, jobject peer_info_handle, jobject context_handle, jint attrib, jobject value, jint value_position);
+
+ /* NV_video_capture functions (GLX & WGL only) */
+ extern jboolean extgl_BindVideoCaptureDeviceNV(JNIEnv *env, jobject peer_info_handle, jint video_slot, jlong device);
+ extern jint extgl_EnumerateVideoCaptureDevicesNV(JNIEnv *env, jobject peer_info_handle, jobject devices, jint devices_position);
+ extern jboolean extgl_LockVideoCaptureDeviceNV(JNIEnv *env, jobject peer_info_handle, jlong device);
+ extern jboolean extgl_QueryVideoCaptureDeviceNV(JNIEnv *env, jobject peer_info_handle, jlong device, jint attribute, jobject value, jint value_position);
+ extern jboolean extgl_ReleaseVideoCaptureDeviceNV(JNIEnv *env, jobject peer_info_handle, jlong device);
+#endif
+
#endif /* __EXTGL_H__ */
Added: branches/opengles/LWJGL/src/native/common/opengl/org_lwjgl_opengl_NVPresentVideoUtil.c
===================================================================
--- branches/opengles/LWJGL/src/native/common/opengl/org_lwjgl_opengl_NVPresentVideoUtil.c (rev 0)
+++ branches/opengles/LWJGL/src/native/common/opengl/org_lwjgl_opengl_NVPresentVideoUtil.c 2011-05-21 10:48:05 UTC (rev 3537)
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 2002-2011 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.
+ */
+
+/**
+ * JNI implementation of the NVPresentVideoUtil class (GLX & WGL only).
+ *
+ * @author Spasi
+ */
+
+#include <jni.h>
+#include "common_tools.h"
+#include "extgl.h"
+#include "org_lwjgl_opengl_NVPresentVideoUtil.h"
+
+JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_NVPresentVideoUtil_nglEnumerateVideoDevicesNV(
+ JNIEnv *env, jclass clazz, jobject peer_info, jobject devices, jint devices_position
+) {
+ #ifdef __APPLE__
+ return 0;
+ #else
+ return extgl_EnumerateVideoDevicesNV(env, peer_info, devices, devices_position);
+ #endif
+}
+
+JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_NVPresentVideoUtil_nglBindVideoDeviceNV(
+ JNIEnv *env, jclass clazz, jobject peer_info, jint video_slot, jlong video_device, jobject attrib_list, jint attrib_list_position
+) {
+ #ifdef __APPLE__
+ return false;
+ #else
+ return extgl_BindVideoDeviceNV(env, peer_info, video_slot, video_device, attrib_list, attrib_list_position);
+ #endif
+}
+
+JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_NVPresentVideoUtil_nglQueryContextNV(JNIEnv *env, jclass clazz, jobject peer_info, jobject context_handle, jint attrib, jobject value, jint value_position) {
+ #ifdef __APPLE__
+ return false;
+ #else
+ return extgl_QueryContextNV(env, peer_info, context_handle, attrib, value, value_position);
+ #endif
+}
Added: branches/opengles/LWJGL/src/native/common/opengl/org_lwjgl_opengl_NVVideoCaptureUtil.c
===================================================================
--- branches/opengles/LWJGL/src/native/common/opengl/org_lwjgl_opengl_NVVideoCaptureUtil.c (rev 0)
+++ branches/opengles/LWJGL/src/native/common/opengl/org_lwjgl_opengl_NVVideoCaptureUtil.c 2011-05-21 10:48:05 UTC (rev 3537)
@@ -0,0 +1,82 @@
+/*
+ * Copyright (c) 2002-2011 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.
+ */
+
+/**
+ * JNI implementation of the NVVideoCaptureUtil class (GLX & WGL only).
+ *
+ * @author Spasi
+ */
+
+#include <jni.h>
+#include "common_tools.h"
+#include "extgl.h"
+#include "org_lwjgl_opengl_NVVideoCaptureUtil.h"
+
+JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_NVVideoCaptureUtil_nglBindVideoCaptureDeviceNV(JNIEnv *env, jclass clazz, jobject peer_info, jint video_slot, jlong device) {
+ #ifdef __APPLE__
+ return false;
+ #else
+ return extgl_BindVideoCaptureDeviceNV(env, peer_info, video_slot, device);
+ #endif
+}
+
+JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_NVVideoCaptureUtil_nglEnumerateVideoCaptureDevicesNV(JNIEnv *env, jclass clazz, jobject peer_info, jobject devices, jint devices_position) {
+ #ifdef __APPLE__
+ return 0;
+ #else
+ return extgl_EnumerateVideoCaptureDevicesNV(env, peer_info, devices, devices_position);
+ #endif
+}
+
+JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_NVVideoCaptureUtil_nglLockVideoCaptureDeviceNV(JNIEnv *env, jclass clazz, jobject peer_info, jlong device) {
+ #ifdef __APPLE__
+ return false;
+ #else
+ return extgl_LockVideoCaptureDeviceNV(env, peer_info, device);
+ #endif
+}
+
+JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_NVVideoCaptureUtil_nglQueryVideoCaptureDeviceNV(JNIEnv *env, jclass clazz, jobject peer_info, jlong device, jint attribute, jobject value, jint value_position) {
+ #ifdef __APPLE__
+ return false;
+ #else
+ return extgl_QueryVideoCaptureDeviceNV(env, peer_info, device, attribute, value, value_position);
+ #endif
+}
+
+JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_NVVideoCaptureUtil_nglReleaseVideoCaptureDeviceNV(JNIEnv *env, jclass clazz, jobject peer_info, jlong device) {
+ #ifdef __APPLE__
+ return false;
+ #else
+ return extgl_ReleaseVideoCaptureDeviceNV(env, peer_info, device);
+ #endif
+}
\ No newline at end of file
Added: branches/opengles/LWJGL/src/native/linux/opengl/GLX.c
===================================================================
--- branches/opengles/LWJGL/src/native/linux/opengl/GLX.c (rev 0)
+++ branches/opengles/LWJGL/src/native/linux/opengl/GLX.c 2011-05-21 10:48:05 UTC (rev 3537)
@@ -0,0 +1,121 @@
+/*
+ * Copyright (c) 2002-2011 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.
+ */
+
+/**
+ * GLX extension implementations.
+ *
+ * @author Spasi
+ */
+#include "GLX.h"
+
+/* NV_present_video functions */
+
+typedef struct {
+ GLXExtensions extension_flags;
+ GLXContext context;
+} X11Context;
+
+jint extgl_EnumerateVideoDevicesNV(JNIEnv *env, jobject peer_info_handle, jobject devices, jint devices_position) {
+ X11PeerInfo *peer_info = (*env)->GetDirectBufferAddress(env, peer_info_handle);
+ jlong *devices_address = ((jlong *)safeGetBufferAddress(env, devices)) + devices_position;
+ unsigned int *result;
+ int i, elements;
+
+ result = lwjgl_glXEnumerateVideoDevicesNV(peer_info->display, peer_info->screen, &elements);
+ if ( devices_address != NULL ) {
+ for ( i = 0; i < elements; i++ )
+ devices_address[i] = (jlong)result[i];
+ }
+ XFree(result);
+
+ return elements;
+}
+
+jboolean extgl_BindVideoDeviceNV(JNIEnv *env, jobject peer_info_handle, jint video_slot, jlong video_device, jobject attrib_list, jint attrib_list_position) {
+ X11PeerInfo *peer_info = (*env)->GetDirectBufferAddress(env, peer_info_handle);
+ const int *attrib_list_address = ((const int *)safeGetBufferAddress(env, attrib_list)) + attrib_list_position;
+
+ return lwjgl_glXBindVideoDeviceNV(peer_info->display, video_slot, (unsigned int)video_device, attrib_list_address);
+}
+
+jboolean extgl_QueryContextNV(JNIEnv *env, jobject peer_info_handle, jobject context_handle, jint attrib, jobject value, jint value_position) {
+ X11PeerInfo *peer_info = (*env)->GetDirectBufferAddress(env, peer_info_handle);
+ X11Context *context_info = (*env)->GetDirectBufferAddress(env, context_handle);
+ int *value_address = ((int *)(*env)->GetDirectBufferAddress(env, value)) + value_position;
+
+ return lwjgl_glXQueryContext(peer_info->display, context_info->context, attrib, value_address) == GLX_BAD_ATTRIBUTE ? 0 : 1;
+}
+
+/* NV_video_capture functions */
+
+jboolean extgl_BindVideoCaptureDeviceNV(JNIEnv *env, jobject peer_info_handle, jint video_slot, jlong device) {
+ X11PeerInfo *peer_info = (*env)->GetDirectBufferAddress(env, peer_info_handle);
+
+ return lwjgl_glXBindVideoCaptureDeviceNV(peer_info->display, video_slot, (GLXVideoCaptureDeviceNV)device);
+}
+
+jint extgl_EnumerateVideoCaptureDevicesNV(JNIEnv *env, jobject peer_info_handle, jobject devices, jint devices_position) {
+ X11PeerInfo *peer_info = (*env)->GetDirectBufferAddress(env, peer_info_handle);
+ jlong *devices_address = ((jlong *)safeGetBufferAddress(env, devices)) + devices_position;
+ GLXVideoCaptureDeviceNV *result;
+ int i, elements;
+
+ result = lwjgl_glXEnumerateVideoCaptureDevicesNV(peer_info->display, peer_info->screen, &elements);
+ if ( devices_address != NULL ) {
+ for ( i = 0; i < elements; i++ )
+ devices_address[i] = (jlong)result[i];
+ }
+ XFree(devices);
+
+ return elements;
+}
+
+jboolean extgl_LockVideoCaptureDeviceNV(JNIEnv *env, jobject peer_info_handle, jlong device) {
+ X11PeerInfo *peer_info = (*env)->GetDirectBufferAddress(env, peer_info_handle);
+
+ lwjgl_glXLockVideoCaptureDeviceNV(peer_info->display, (GLXVideoCaptureDeviceNV)device);
+ return true;
+}
+
+jboolean extgl_QueryVideoCaptureDeviceNV(JNIEnv *env, jobject peer_info_handle, jlong device, jint attribute, jobject value, jint value_position) {
+ X11PeerInfo *peer_info = (*env)->GetDirectBufferAddress(env, peer_info_handle);
+ int *value_address = ((int *)(*env)->GetDirectBufferAddress(env, value)) + value_position;
+
+ return lwjgl_glXQueryVideoCaptureDeviceNV(peer_info->display, (GLXVideoCaptureDeviceNV)device, attribute, value_address);
+}
+
+jboolean extgl_ReleaseVideoCaptureDeviceNV(JNIEnv *env, jobject peer_info_handle, jlong device) {
+ X11PeerInfo *peer_info = (*env)->GetDirectBufferAddress(env, peer_info_handle);
+
+ lwjgl_glXReleaseVideoCaptureDeviceNV(peer_info->display, (GLXVideoCaptureDeviceNV)device);
+ return true;
+}
Added: branches/opengles/LWJGL/src/native/linux/opengl/GLX.h
===================================================================
--- branches/opengles/LWJGL/src/native/linux/opengl/GLX.h (rev 0)
+++ branches/opengles/LWJGL/src/native/linux/opengl/GLX.h 2011-05-21 10:48:05 UTC (rev 3537)
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2002-2011 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.
+ */
+
+/**
+ * GLX extension implementations.
+ *
+ * @author Spasi
+ */
+#ifndef __LWJGL_GLX_H
+#define __LWJGL_GLX_H
+
+#include <jni.h>
+#include "common_tools.h"
+#include "context.h"
+
+#include "extgl.h"
+#include "extgl_glx.h"
+
+/* NV_present_video functions */
+extern jint extgl_EnumerateVideoDevicesNV(JNIEnv *env, jobject peer_info_handle, jobject devices, jint devices_position);
+extern jboolean extgl_BindVideoDeviceNV(JNIEnv *env, jobject peer_info_handle, jint video_slot, jlong video_device, jobject attrib_list, jint attrib_list_position);
+extern jboolean extgl_QueryContextNV(JNIEnv *env, jobject peer_info_handle, jobject context_handle, jint attrib, jobject value, jint value_position);
+
+/* NV_video_capture functions */
+extern jboolean extgl_BindVideoCaptureDeviceNV(JNIEnv *env, jobject peer_info_handle, jint video_slot, jlong device);
+extern jint extgl_EnumerateVideoCaptureDevicesNV(JNIEnv *env, jobject peer_info_handle, jobject devices, jint devices_position);
+extern jboolean extgl_LockVideoCaptureDeviceNV(JNIEnv *env, jobject peer_info_handle, jlong device);
+extern jboolean extgl_QueryVideoCaptureDeviceNV(JNIEnv *env, jobject peer_info_handle, jlong device, jint attribute, jobject value, jint value_position);
+extern jboolean extgl_ReleaseVideoCaptureDeviceNV(JNIEnv *env, jobject peer_info_handle, jlong device);
+
+#endif
Modified: branches/opengles/LWJGL/src/native/linux/opengl/extgl_glx.c
===================================================================
--- branches/opengles/LWJGL/src/native/linux/opengl/extgl_glx.c 2011-05-17 17:26:33 UTC (rev 3536)
+++ branches/opengles/LWJGL/src/native/linux/opengl/extgl_glx.c 2011-05-21 10:48:05 UTC (rev 3537)
@@ -77,6 +77,17 @@
/* GLX_ARB_create_context */
glXCreateContextAttribsARBPROC lwjgl_glXCreateContextAttribsARB = NULL;
+/* GLX_NV_present_video */
+glXEnumerateVideoDevicesNVPROC lwjgl_glXEnumerateVideoDevicesNV = NULL;
+glXBindVideoDeviceNVPROC lwjgl_glXBindVideoDeviceNV = NULL;
+
+/* GLX_NV_video_capture */
+glXBindVideoCaptureDeviceNVPROC lwjgl_glXBindVideoCaptureDeviceNV = NULL;
+glXEnumerateVideoCaptureDevicesNVPROC lwjgl_glXEnumerateVideoCaptureDevicesNV = NULL;
+glXLockVideoCaptureDeviceNVPROC lwjgl_glXLockVideoCaptureDeviceNV = NULL;
+glXQueryVideoCaptureDeviceNVPROC lwjgl_glXQueryVideoCaptureDeviceNV = NULL;
+glXReleaseVideoCaptureDeviceNVPROC lwjgl_glXReleaseVideoCaptureDeviceNV = NULL;
+
static void * lib_gl_handle = NULL;
typedef void * (APIENTRY * glXGetProcAddressARBPROC) (const GLubyte *procName);
@@ -151,6 +162,27 @@
symbols_flags.GLX_ARB_create_context = extgl_InitializeFunctions(sizeof(functions)/sizeof(ExtFunction), functions);
}
+static void extgl_InitGLXNVPresentVideo() {
+ ExtFunction functions[] = {
+ { "glXEnumerateVideoDevicesNV", (void*)&lwjgl_glXEnumerateVideoDevicesNV },
+ { "glXBindVideoDeviceNV", (void*)&lwjgl_glXBindVideoDeviceNV }
+ };
+
+ symbols_flags.GLX_NV_present_video = extgl_InitializeFunctions(sizeof(functions)/sizeof(ExtFunction), functions);
+}
+
+static void extgl_InitGLXNVVideoCapture() {
+ ExtFunction functions[] = {
+ { "glXBindVideoCaptureDeviceNV", (void*)&lwjgl_glXBindVideoCaptureDeviceNV },
+ { "glXEnumerateVideoCaptureDevicesNV", (void*)&lwjgl_glXEnumerateVideoCaptureDevicesNV },
+ { "glXLockVideoCaptureDeviceNV", (void*)&lwjgl_glXLockVideoCaptureDeviceNV },
+ { "glXQueryVideoCaptureDeviceNV", (void*)&lwjgl_glXQueryVideoCaptureDeviceNV },
+ { "glXReleaseVideoCaptureDeviceNV", (void*)&lwjgl_glXReleaseVideoCaptureDeviceNV }
+ };
+
+ symbols_flags.GLX_NV_video_capture = extgl_InitializeFunctions(sizeof(functions)/sizeof(ExtFunction), functions);
+}
+
static void extgl_InitGLXSupportedExtensions(Display *disp, int screen, GLXExtensions *extension_flags) {
/* extension_flags.GLX_EXT_visual_info = GLXQueryExtension(disp, screen, "GLX_EXT_visual_info");
extension_flags.GLX_EXT_visual_rating = GLXQueryExtension(disp, screen, "GLX_EXT_visual_rating");*/
@@ -161,6 +193,8 @@
extension_flags->GLX_ARB_framebuffer_sRGB = GLXQueryExtension(disp, screen, "GLX_ARB_framebuffer_sRGB") || GLXQueryExtension(disp, screen, "GLX_EXT_framebuffer_sRGB");
extension_flags->GLX_ARB_create_context = GLXQueryExtension(disp, screen, "GLX_ARB_create_context");
extension_flags->GLX_NV_multisample_coverage = GLXQueryExtension(disp, screen, "GLX_NV_multisample_coverage");
+ extension_flags->GLX_NV_present_video = GLXQueryExtension(disp, screen, "GLX_NV_present_video");
+ extension_flags->GLX_NV_video_capture = GLXQueryExtension(disp, screen, "GLX_NV_video_capture");
}
bool extgl_Open(JNIEnv *env) {
@@ -193,6 +227,8 @@
extgl_InitGLX13();
extgl_InitGLXSGISwapControl();
extgl_InitGLXARBCreateContext();
+ extgl_InitGLXNVPresentVideo();
+ extgl_InitGLXNVVideoCapture();
return true;
}
Modified: branches/opengles/LWJGL/src/native/linux/opengl/extgl_glx.h
===================================================================
--- branches/opengles/LWJGL/src/native/linux/opengl/extgl_glx.h 2011-05-17 17:26:33 UTC (rev 3536)
+++ branches/opengles/LWJGL/src/native/linux/opengl/extgl_glx.h 2011-05-21 10:48:05 UTC (rev 3537)
@@ -272,10 +272,17 @@
#define GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x0002
/* GLX_NV_multisample_coverage */
-#define GLX_COVERAGE_SAMPLES_NV 100001
-#define GLX_COLOR_SAMPLES_NV 0x20B3
+#define GLX_COVERAGE_SAMPLES_NV 100001
+#define GLX_COLOR_SAMPLES_NV 0x20B3
+/* GLX_NV_present_video */
+#define GLX_NUM_VIDEO_SLOTS_NV 0x20F0
+/* GLX_NV_video_capture */
+#define GLX_DEVICE_ID_NV 0x20CD
+#define GLX_NUM_VIDEO_CAPTURE_SLOTS_NV 0x20CF
+#define GLX_UNIQUE_ID_NV 0x20CE
+
typedef XID GLXContextID;
typedef XID GLXPixmap;
typedef XID GLXDrawable;
@@ -339,6 +346,18 @@
/* GLX_ARB_create_context */
typedef GLXContext (APIENTRY * glXCreateContextAttribsARBPROC) (Display *dpy, GLXFBConfig config, GLXContext share_context, Bool direct, const int *attrib_list);
+/* GLX_NV_present_video */
+typedef unsigned int * (APIENTRY * glXEnumerateVideoDevicesNVPROC) (Display *dpy, int screen, int *nelements);
+typedef int (APIENTRY * glXBindVideoDeviceNVPROC) (Display *dpy, unsigned int video_slot, unsigned int video_device, const int *attrib_list);
+
+/* GLX_NV_video_capture */
+typedef XID GLXVideoCaptureDeviceNV;
+typedef int (APIENTRY * glXBindVideoCaptureDeviceNVPROC) (Display *dpy, unsigned int video_capture_slot, GLXVideoCaptureDeviceNV device);
+typedef GLXVideoCaptureDeviceNV * (APIENTRY * glXEnumerateVideoCaptureDevicesNVPROC) (Display *dpy, int screen, int *nelements);
+typedef void (APIENTRY * glXLockVideoCaptureDeviceNVPROC) (Display *dpy, GLXVideoCaptureDeviceNV device);
+typedef int (APIENTRY * glXQueryVideoCaptureDeviceNVPROC) (Display *dpy, GLXVideoCaptureDeviceNV device, int attribute, int *value);
+typedef void (APIENTRY * glXReleaseVideoCaptureDeviceNVPROC) (Display *dpy, GLXVideoCaptureDeviceNV device);
+
typedef struct {
bool GLX12;
bool GLX13;
@@ -352,6 +371,8 @@
bool GLX_ARB_framebuffer_sRGB;
bool GLX_ARB_create_context;
bool GLX_NV_multisample_coverage;
+ bool GLX_NV_present_video;
+ bool GLX_NV_video_capture;
} GLXExtensions;
/* Add _ to global symbols to avoid symbol clash with the OpenGL library */
@@ -399,6 +420,17 @@
extern glXCreateContextAttribsARBPROC lwjgl_glXCreateContextAttribsARB;
+/* GLX_NV_present_video */
+extern glXEnumerateVideoDevicesNVPROC lwjgl_glXEnumerateVideoDevicesNV;
+extern glXBindVideoDeviceNVPROC lwjgl_glXBindVideoDeviceNV;
+
+/* GLX_NV_video_capture */
+extern glXBindVideoCaptureDeviceNVPROC lwjgl_glXBindVideoCaptureDeviceNV;
+extern glXEnumerateVideoCaptureDevicesNVPROC lwjgl_glXEnumerateVideoCaptureDevicesNV;
+extern glXLockVideoCaptureDeviceNVPROC lwjgl_glXLockVideoCaptureDeviceNV;
+extern glXQueryVideoCaptureDeviceNVPROC lwjgl_glXQueryVideoCaptureDeviceNV;
+extern glXReleaseVideoCaptureDeviceNVPROC lwjgl_glXReleaseVideoCaptureDeviceNV;
+
extern bool extgl_InitGLX(Display *disp, int screen, GLXExtensions *extension_flags);
#endif
Added: branches/opengles/LWJGL/src/native/windows/opengl/WGL.c
===================================================================
--- branches/opengles/LWJGL/src/native/windows/opengl/WGL.c (rev 0)
+++ branches/opengles/LWJGL/src/native/windows/opengl/WGL.c 2011-05-21 10:48:05 UTC (rev 3537)
@@ -0,0 +1,95 @@
+/*
+ * Copyright (c) 2002-2011 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.
+ */
+
+/**
+ * WGL extension implementations.
+ *
+ * @author Spasi
+ */
+#include "WGL.h"
+
+/* NV_present_video functions */
+
+jint extgl_EnumerateVideoDevicesNV(JNIEnv *env, jobject peer_info_handle, jobject devices, jint devices_position) {
+ WindowsPeerInfo *peer_info = (WindowsPeerInfo *)(*env)->GetDirectBufferAddress(env, peer_info_handle);
+ HVIDEOOUTPUTDEVICENV *devices_address = ((HVIDEOOUTPUTDEVICENV *)safeGetBufferAddress(env, devices)) + devices_position;
+
+ return peer_info->extensions.wglEnumerateVideoDevicesNV(peer_info->drawable_hdc, devices_address);
+}
+
+jboolean extgl_BindVideoDeviceNV(JNIEnv *env, jobject peer_info_handle, jint video_slot, jlong video_device, jobject attrib_list, jint attrib_list_position) {
+ WindowsPeerInfo *peer_info = (WindowsPeerInfo *)(*env)->GetDirectBufferAddress(env, peer_info_handle);
+ const int *attrib_list_address = ((const int *)safeGetBufferAddress(env, attrib_list)) + attrib_list_position;
+
+ return peer_info->extensions.wglBindVideoDeviceNV(peer_info->drawable_hdc, video_slot, video_device == 0 ? INVALID_HANDLE_VALUE : (HVIDEOOUTPUTDEVICENV)(intptr_t)video_device, attrib_list_address);
+}
+
+jboolean extgl_QueryContextNV(JNIEnv *env, jobject peer_info_handle, jobject context_handle, jint attrib, jobject value, jint value_position) {
+ WindowsPeerInfo *peer_info = (WindowsPeerInfo *)(*env)->GetDirectBufferAddress(env, peer_info_handle);
+ int *value_address = ((int *)(*env)->GetDirectBufferAddress(env, value)) + value_position;
+
+ return peer_info->extensions.wglQueryCurrentContextNV(attrib, value_address);
+}
+
+/* NV_video_capture functions */
+
+jboolean extgl_BindVideoCaptureDeviceNV(JNIEnv *env, jobject peer_info_handle, jint video_slot, jlong device) {
+ WindowsPeerInfo *peer_info = (WindowsPeerInfo *)(*env)->GetDirectBufferAddress(env, peer_info_handle);
+
+ return peer_info->extensions.wglBindVideoCaptureDeviceNV(video_slot, (HVIDEOINPUTDEVICENV)(intptr_t)device);
+}
+
+jint extgl_EnumerateVideoCaptureDevicesNV(JNIEnv *env, jobject peer_info_handle, jobject devices, jint devices_position) {
+ WindowsPeerInfo *peer_info = (WindowsPeerInfo *)(*env)->GetDirectBufferAddress(env, peer_info_handle);
+ HVIDEOINPUTDEVICENV *devices_address = ((HVIDEOINPUTDEVICENV *)safeGetBufferAddress(env, devices)) + devices_position;
+
+ return peer_info->extensions.wglEnumerateVideoCaptureDevicesNV(peer_info->drawable_hdc, devices_address);
+}
+
+jboolean extgl_LockVideoCaptureDeviceNV(JNIEnv *env, jobject peer_info_handle, jlong device) {
+ WindowsPeerInfo *peer_info = (WindowsPeerInfo *)(*env)->GetDirectBufferAddress(env, peer_info_handle);
+
+ return peer_info->extensions.wglLockVideoCaptureDeviceNV(peer_info->drawable_hdc, (HVIDEOINPUTDEVICENV)(intptr_t)device);
+}
+
+jboolean extgl_QueryVideoCaptureDeviceNV(JNIEnv *env, jobject peer_info_handle, jlong device, jint attribute, jobject value, jint value_position) {
+ WindowsPeerInfo *peer_info = (WindowsPeerInfo *)(*env)->GetDirectBufferAddress(env, peer_info_handle);
+ int *value_address = ((int *)(*env)->GetDirectBufferAddress(env, value)) + value_position;
+
+ return peer_info->extensions.wglQueryVideoCaptureDeviceNV(peer_info->drawable_hdc, (HVIDEOINPUTDEVICENV)(intptr_t)device, attribute, value_address);
+}
+
+jboolean extgl_ReleaseVideoCaptureDeviceNV(JNIEnv *env, jobject peer_info_handle, jlong device) {
+ WindowsPeerInfo *peer_info = (WindowsPeerInfo *)(*env)->GetDirectBufferAddress(env, peer_info_handle);
+
+ return peer_info->extensions.wglReleaseVideoCaptureDeviceNV(peer_info->drawable_hdc, (HVIDEOINPUTDEVICENV)(intptr_t)device);
+}
\ No newline at end of file
Added: branches/opengles/LWJGL/src/native/windows/opengl/WGL.h
===================================================================
--- branches/opengles/LWJGL/src/native/windows/opengl/WGL.h (rev 0)
+++ branches/opengles/LWJGL/src/native/windows/opengl/WGL.h 2011-05-21 10:48:05 UTC (rev 3537)
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2002-2011 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.
+ */
+
+/**
+ * WGL extension implementations.
+ *
+ * @author Spasi
+ */
+#ifndef __LWJGL_WGL_H
+#define __LWJGL_WGL_H
+
+#include <jni.h>
+#include "common_tools.h"
+#include "context.h"
+
+#include "extgl.h"
+#include "extgl_wgl.h"
+
+/* NV_present_video functions */
+extern jint extgl_EnumerateVideoDevicesNV(JNIEnv *env, jobject peer_info_handle, jobject devices, jint devices_position);
+extern jboolean extgl_BindVideoDeviceNV(JNIEnv *env, jobject peer_info_handle, jint video_slot, jlong video_device, jobject attrib_list, jint attrib_list_position);
+extern jboolean extgl_QueryContextNV(JNIEnv *env, jobject peer_info_handle, jobject context_handle, jint attrib, jobject value, jint value_position);
+
+/* NV_video_capture functions */
+extern jboolean extgl_BindVideoCaptureDeviceNV(JNIEnv *env, jobject peer_info_handle, jint video_slot, jlong device);
+extern jint extgl_EnumerateVideoCaptureDevicesNV(JNIEnv *env, jobject peer_info_handle, jobject devices, jint devices_position);
+extern jboolean extgl_LockVideoCaptureDeviceNV(JNIEnv *env, jobject peer_info_handle, jlong device);
+extern jboolean extgl_QueryVideoCaptureDeviceNV(JNIEnv *env, jobject peer_info_handle, jlong device, jint attribute, jobject value, jint value_position);
+extern jboolean extgl_ReleaseVideoCaptureDeviceNV(JNIEnv *env, jobject peer_info_handle, jlong device);
+
+#endif
\ No newline at end of file
Modified: branches/opengles/LWJGL/src/native/windows/opengl/context.h
===================================================================
--- branches/opengles/LWJGL/src/native/windows/opengl/context.h 2011-05-17 17:26:33 UTC (rev 3536)
+++ branches/opengles/LWJGL/src/native/windows/opengl/context.h 2011-05-21 10:48:05 UTC (rev 3537)
@@ -1,31 +1,31 @@
-/*
+/*
* 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
+ * modification, are permitted provided that the following conditions are
* met:
- *
- * * Redistributions of source code must retain the above copyright
+ *
+ * * 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
+ * * 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
+ * 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
+ * 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.
*/
@@ -49,14 +49,10 @@
typedef struct {
union {
HWND hwnd;
- struct {
- HPBUFFERARB pbuffer;
- // Contains the function pointers that
- // created the pbuffer
- WGLExtensions extensions;
- } pbuffer;
+ HPBUFFERARB pbuffer;
} u;
HDC drawable_hdc;
+ WGLExtensions extensions;
} WindowsPeerInfo;
/*
@@ -86,7 +82,7 @@
* Create a window with the specified position, size, and
* fullscreen attribute. The window will have DirectInput associated
* with it.
- *
+ *
* Returns true for success, or false for failure
*/
extern HWND createWindow(LPCTSTR window_class_name, int x, int y, int width, int height, bool undecorated, bool child_window, HWND parent);
Modified: branches/opengles/LWJGL/src/native/windows/opengl/extgl_wgl.c
===================================================================
--- branches/opengles/LWJGL/src/native/windows/opengl/extgl_wgl.c 2011-05-17 17:26:33 UTC (rev 3536)
+++ branches/opengles/LWJGL/src/native/windows/opengl/extgl_wgl.c 2011-05-21 10:48:05 UTC (rev 3537)
@@ -84,6 +84,8 @@
return extgl_QueryExtension(extension_string, name);
}
+/*---------------------------------------------------------------------*/
+
static void extgl_InitWGLARBPbuffer(WGLExtensions *extensions) {
ExtFunction functions[] = {
{"wglCreatePbufferARB", (void *)&extensions->wglCreatePbufferARB},
@@ -137,6 +139,32 @@
extensions->WGL_ARB_create_context = extgl_InitializeFunctions(sizeof(functions)/sizeof(ExtFunction), functions);
}
+static void extgl_InitWGLNVPresentVideo(WGLExtensions *extensions) {
+ ExtFunction functions[] = {
+ {"wglEnumerateVideoDevicesNV", (void *)&extensions->wglEnumerateVideoDevicesNV},
+ {"wglBindVideoDeviceNV", (void *)&extensions->wglBindVideoDeviceNV},
+ {"wglQueryCurrentContextNV", (void *)&extensions->wglQueryCurrentContextNV}
+ };
+
+ if (extensions->WGL_NV_present_video)
+ extensions->WGL_NV_present_video = extgl_InitializeFunctions(sizeof(functions)/sizeof(ExtFunction), functions);
+}
+
+static void extgl_InitWGLNVVideoCapture(WGLExtensions *extensions) {
+ ExtFunction functions[] = {
+ {"wglBindVideoCaptureDeviceNV", (void *)&extensions->wglBindVideoCaptureDeviceNV},
+ {"wglEnumerateVideoCaptureDevicesNV", (void *)&extensions->wglEnumerateVideoCaptureDevicesNV},
+ {"wglLockVideoCaptureDeviceNV", (void *)&extensions->wglLockVideoCaptureDeviceNV},
+ {"wglQueryVideoCaptureDeviceNV", (void *)&extensions->wglQueryVideoCaptureDeviceNV},
+ {"wglReleaseVideoCaptureDeviceNV", (void *)&extensions->wglReleaseVideoCaptureDeviceNV}
+ };
+
+ if (extensions->WGL_NV_video_capture)
+ extensions->WGL_NV_video_capture = extgl_InitializeFunctions(sizeof(functions)/sizeof(ExtFunction), functions);
+}
+
+/*---------------------------------------------------------------------*/
+
static void extgl_InitSupportedWGLExtensions(WGLExtensions *extensions) {
extensions->WGL_ARB_buffer_region = WGLQueryExtension(extensions, "WGL_ARB_buffer_region");
extensions->WGL_ARB_make_current_read = WGLQueryExtension(extensions, "WGL_ARB_make_current_read");
@@ -153,6 +181,8 @@
extensions->WGL_EXT_pixel_format_packed_float = WGLQueryExtension(extensions, "WGL_EXT_pixel_format_packed_float");
extensions->WGL_ARB_create_context = WGLQueryExtension(extensions, "WGL_ARB_create_context");
extensions->WGL_NV_multisample_coverage = WGLQueryExtension(extensions, "WGL_NV_multisample_coverage");
+ extensions->WGL_NV_present_video = WGLQueryExtension(extensions, "WGL_NV_present_video");
+ extensions->WGL_NV_video_capture = WGLQueryExtension(extensions, "WGL_NV_video_capture");
}
static void extgl_InitWGLEXTExtensionsString(WGLExtensions *extensions) {
@@ -181,4 +211,6 @@
extgl_InitWGLARBPixelFormat(extensions);
extgl_InitWGLARBPbuffer(extensions);
extgl_InitWGLARBCreateContext(extensions);
+ extgl_InitWGLNVPresentVideo(extensions);
+ extgl_InitWGLNVVideoCapture(extensions);
}
Modified: branches/opengles/LWJGL/src/native/windows/opengl/extgl_wgl.h
===================================================================
--- branches/opengles/LWJGL/src/native/windows/opengl/extgl_wgl.h 2011-05-17 17:26:33 UTC (rev 3536)
+++ branches/opengles/LWJGL/src/native/windows/opengl/extgl_wgl.h 2011-05-21 10:48:05 UTC (rev 3537)
@@ -207,6 +207,32 @@
#define WGL_COVERAGE_SAMPLES_NV 0x2042
#define WGL_COLOR_SAMPLES_NV 0x20B9
+/*--------------------------------------------------------------*/
+/*------------ WGL_NV_present_video ----------------------------*/
+/*--------------------------------------------------------------*/
+
+DECLARE_HANDLE(HVIDEOOUTPUTDEVICENV);
+
+#define WGL_NUM_VIDEO_SLOTS_NV 0x20F0
+
+typedef int (APIENTRY * wglEnumerateVideoDevicesNVPROC) (HDC hDc, HVIDEOOUTPUTDEVICENV *phDeviceList);
+typedef BOOL (APIENTRY * wglBindVideoDeviceNVPROC) (HDC hDc, unsigned int uVideoSlot, HVIDEOOUTPUTDEVICENV hVideoDevice, const int *piAttribList);
+typedef BOOL (APIENTRY * wglQueryCurrentContextNVPROC) (int iAttribute, int *piValue);
+
+/*--------------------------------------------------------------*/
+/*------------ WGL_NV_video_capture ----------------------------*/
+/*--------------------------------------------------------------*/
+
+DECLARE_HANDLE(HVIDEOINPUTDEVICENV);
+
+#define WGL_NUM_VIDEO_SLOTS_NV 0x20F0
+
+typedef BOOL (APIENTRY * wglBindVideoCaptureDeviceNVPROC) (UINT uVideoSlot, HVIDEOINPUTDEVICENV hDevice);
+typedef UINT (APIENTRY * wglEnumerateVideoCaptureDevicesNVPROC) (HDC hDc, HVIDEOINPUTDEVICENV *phDeviceList);
+typedef BOOL (APIENTRY * wglLockVideoCaptureDeviceNVPROC) (HDC hDc, HVIDEOINPUTDEVICENV hDevice);
+typedef BOOL (APIENTRY * wglQueryVideoCaptureDeviceNVPROC) (HDC hDc, HVIDEOINPUTDEVICENV hDevice, int iAttribute, int *piValue);
+typedef BOOL (APIENTRY * wglReleaseVideoCaptureDeviceNVPROC) (HDC hDc, HVIDEOINPUTDEVICENV hDevice);
+
/*---------------------------------------------------------------------*/
typedef struct {
@@ -227,6 +253,8 @@
bool WGL_EXT_pixel_format_packed_float;
bool WGL_ARB_create_context;
bool WGL_NV_multisample_coverage;
+ bool WGL_NV_present_video;
+ bool WGL_NV_video_capture;
wglGetExtensionsStringEXTPROC wglGetExtensionsStringEXT;
@@ -253,6 +281,16 @@
wglGetCurrentReadDCARBPROC wglGetCurrentReadDCARB;
wglCreateContextAttribsARBPROC wglCreateContextAttribsARB;
+
+ wglEnumerateVideoDevicesNVPROC wglEnumerateVideoDevicesNV;
+ wglBindVideoDeviceNVPROC wglBindVideoDeviceNV;
+ wglQueryCurrentContextNVPROC wglQueryCurrentContextNV;
+
+ wglBindVideoCaptureDeviceNVPROC wglBindVideoCaptureDeviceNV;
+ wglEnumerateVideoCaptureDevicesNVPROC wglEnumerateVideoCaptureDevicesNV;
+ wglLockVideoCaptureDeviceNVPROC wglLockVideoCaptureDeviceNV;
+ wglQueryVideoCaptureDeviceNVPROC wglQueryVideoCaptureDeviceNV;
+ wglReleaseVideoCaptureDeviceNVPROC wglReleaseVideoCaptureDeviceNV;
} WGLExtensions;
extern void extgl_InitWGL(WGLExtensions *extensions);
Modified: branches/opengles/LWJGL/src/native/windows/opengl/org_lwjgl_opengl_Pbuffer.c
===================================================================
--- branches/opengles/LWJGL/src/native/windows/opengl/org_lwjgl_opengl_Pbuffer.c 2011-05-17 17:26:33 UTC (rev 3536)
+++ branches/opengles/LWJGL/src/native/windows/opengl/org_lwjgl_opengl_Pbuffer.c 2011-05-21 10:48:05 UTC (rev 3537)
@@ -167,23 +167,23 @@
throwException(env, "Could not get Pbuffer DC");
return;
}
- peer_info->u.pbuffer.extensions = extensions;
- peer_info->u.pbuffer.pbuffer = Pbuffer;
+ peer_info->extensions = extensions;
+ peer_info->u.pbuffer = Pbuffer;
peer_info->drawable_hdc = Pbuffer_dc;
}
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsPbufferPeerInfo_nDestroy
(JNIEnv *env, jclass clazz, jobject peer_info_handle) {
WindowsPeerInfo *peer_info = (WindowsPeerInfo *)(*env)->GetDirectBufferAddress(env, peer_info_handle);
- peer_info->u.pbuffer.extensions.wglReleasePbufferDCARB(peer_info->u.pbuffer.pbuffer, peer_info->drawable_hdc);
- peer_info->u.pbuffer.extensions.wglDestroyPbufferARB(peer_info->u.pbuffer.pbuffer);
+ peer_info->extensions.wglReleasePbufferDCARB(peer_info->u.pbuffer, peer_info->drawable_hdc);
+ peer_info->extensions.wglDestroyPbufferARB(peer_info->u.pbuffer);
}
JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_WindowsPbufferPeerInfo_nIsBufferLost
(JNIEnv *env, jclass clazz, jobject peer_info_handle) {
WindowsPeerInfo *peer_info = (WindowsPeerInfo *)(*env)->GetDirectBufferAddress(env, peer_info_handle);
BOOL buffer_lost;
- peer_info->u.pbuffer.extensions.wglQueryPbufferARB(peer_info->u.pbuffer.pbuffer, WGL_PBUFFER_LOST_ARB, &buffer_lost);
+ peer_info->extensions.wglQueryPbufferARB(peer_info->u.pbuffer, WGL_PBUFFER_LOST_ARB, &buffer_lost);
return buffer_lost ? JNI_TRUE : JNI_FALSE;
}
@@ -196,17 +196,17 @@
attribs[1] = value;
attribs[2] = 0;
- peer_info->u.pbuffer.extensions.wglSetPbufferAttribARB(peer_info->u.pbuffer.pbuffer, attribs);
+ peer_info->extensions.wglSetPbufferAttribARB(peer_info->u.pbuffer, attribs);
}
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsPbufferPeerInfo_nBindTexImageToPbuffer
(JNIEnv *env, jclass clazz, jobject peer_info_handle, jint buffer) {
WindowsPeerInfo *peer_info = (WindowsPeerInfo *)(*env)->GetDirectBufferAddress(env, peer_info_handle);
- peer_info->u.pbuffer.extensions.wglBindTexImageARB(peer_info->u.pbuffer.pbuffer, buffer);
+ peer_info->extensions.wglBindTexImageARB(peer_info->u.pbuffer, buffer);
}
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsPbufferPeerInfo_nReleaseTexImageFromPbuffer
(JNIEnv *env, jclass clazz, jobject peer_info_handle, jint buffer) {
WindowsPeerInfo *peer_info = (WindowsPeerInfo *)(*env)->GetDirectBufferAddress(env, peer_info_handle);
- peer_info->u.pbuffer.extensions.w...
[truncated message content] |
|
From: <sp...@us...> - 2011-05-17 17:26:40
|
Revision: 3536
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3536&view=rev
Author: spasi
Date: 2011-05-17 17:26:33 +0000 (Tue, 17 May 2011)
Log Message:
-----------
Added Context.
Added Paths:
-----------
branches/opengles/LWJGL/src/java/org/lwjgl/opengl/Context.java
Added: branches/opengles/LWJGL/src/java/org/lwjgl/opengl/Context.java
===================================================================
--- branches/opengles/LWJGL/src/java/org/lwjgl/opengl/Context.java (rev 0)
+++ branches/opengles/LWJGL/src/java/org/lwjgl/opengl/Context.java 2011-05-17 17:26:33 UTC (rev 3536)
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2002-2011 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;
+
+import org.lwjgl.LWJGLException;
+import org.lwjgl.opengles.PowerManagementEventException;
+
+/**
+ * @author Spasi
+ * @since 14/5/2011
+ */
+interface Context {
+
+ boolean isCurrent() throws LWJGLException;
+
+ void makeCurrent() throws LWJGLException;
+
+ void releaseCurrent() throws LWJGLException;
+
+ void releaseDrawable() throws LWJGLException;
+
+}
\ 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...> - 2011-05-17 17:00:47
|
Revision: 3535
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3535&view=rev
Author: spasi
Date: 2011-05-17 17:00:41 +0000 (Tue, 17 May 2011)
Log Message:
-----------
Added the Linux emulator libs.
Added Paths:
-----------
branches/opengles/LWJGL/libs/linux/libEGL.so
branches/opengles/LWJGL/libs/linux/libGLESv2.so
branches/opengles/LWJGL/libs/linux/x64/libEGL.so
branches/opengles/LWJGL/libs/linux/x64/libGLESv2.so
Added: branches/opengles/LWJGL/libs/linux/libEGL.so
===================================================================
(Binary files differ)
Property changes on: branches/opengles/LWJGL/libs/linux/libEGL.so
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: branches/opengles/LWJGL/libs/linux/libGLESv2.so
===================================================================
(Binary files differ)
Property changes on: branches/opengles/LWJGL/libs/linux/libGLESv2.so
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: branches/opengles/LWJGL/libs/linux/x64/libEGL.so
===================================================================
(Binary files differ)
Property changes on: branches/opengles/LWJGL/libs/linux/x64/libEGL.so
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: branches/opengles/LWJGL/libs/linux/x64/libGLESv2.so
===================================================================
(Binary files differ)
Property changes on: branches/opengles/LWJGL/libs/linux/x64/libGLESv2.so
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sp...@us...> - 2011-05-17 16:54:09
|
Revision: 3534
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3534&view=rev
Author: spasi
Date: 2011-05-17 16:53:57 +0000 (Tue, 17 May 2011)
Log Message:
-----------
Added support for OpenGL ES.
Modified Paths:
--------------
branches/opengles/LWJGL/build.xml
branches/opengles/LWJGL/platform_build/build-definitions.xml
branches/opengles/LWJGL/platform_build/build-generator.xml
branches/opengles/LWJGL/platform_build/linux_ant/build.xml
branches/opengles/LWJGL/platform_build/windows_ant/build.xml
branches/opengles/LWJGL/src/java/org/lwjgl/opengl/AWTGLCanvas.java
branches/opengles/LWJGL/src/java/org/lwjgl/opengl/CallbackUtil.java
branches/opengles/LWJGL/src/java/org/lwjgl/opengl/Display.java
branches/opengles/LWJGL/src/java/org/lwjgl/opengl/DisplayImplementation.java
branches/opengles/LWJGL/src/java/org/lwjgl/opengl/DrawableLWJGL.java
branches/opengles/LWJGL/src/java/org/lwjgl/opengl/LinuxContextImplementation.java
branches/opengles/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java
branches/opengles/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplayPeerInfo.java
branches/opengles/LWJGL/src/java/org/lwjgl/opengl/MacOSXContextImplementation.java
branches/opengles/LWJGL/src/java/org/lwjgl/opengl/MacOSXDisplay.java
branches/opengles/LWJGL/src/java/org/lwjgl/opengl/Pbuffer.java
branches/opengles/LWJGL/src/java/org/lwjgl/opengl/PixelFormat.java
branches/opengles/LWJGL/src/java/org/lwjgl/opengl/SharedDrawable.java
branches/opengles/LWJGL/src/java/org/lwjgl/opengl/WindowsContextImplementation.java
branches/opengles/LWJGL/src/java/org/lwjgl/opengl/WindowsDisplay.java
branches/opengles/LWJGL/src/java/org/lwjgl/opengl/WindowsDisplayPeerInfo.java
branches/opengles/LWJGL/src/java/org/lwjgl/util/generator/FieldsGenerator.java
branches/opengles/LWJGL/src/java/org/lwjgl/util/generator/JavaMethodsGenerator.java
branches/opengles/LWJGL/src/java/org/lwjgl/util/generator/NativeMethodStubsGenerator.java
branches/opengles/LWJGL/src/java/org/lwjgl/util/generator/RegisterStubsGenerator.java
branches/opengles/LWJGL/src/java/org/lwjgl/util/vector/Matrix4f.java
branches/opengles/LWJGL/src/native/windows/org_lwjgl_opengl_Display.c
branches/opengles/LWJGL/src/templates/org/lwjgl/opengl/EXT_texture_lod_bias.java
Added Paths:
-----------
branches/opengles/LWJGL/libs/linux/x64/
branches/opengles/LWJGL/libs/windows/libEGL.dll
branches/opengles/LWJGL/libs/windows/libEGL.lib
branches/opengles/LWJGL/libs/windows/libGLESv2.dll
branches/opengles/LWJGL/platform_build/linux_ant/build_es.xml
branches/opengles/LWJGL/platform_build/windows_ant/build_es.xml
branches/opengles/LWJGL/src/java/org/lwjgl/opengl/ContextGL.java
branches/opengles/LWJGL/src/java/org/lwjgl/opengl/ContextGLES.java
branches/opengles/LWJGL/src/java/org/lwjgl/opengl/DrawableGL.java
branches/opengles/LWJGL/src/java/org/lwjgl/opengl/DrawableGLES.java
branches/opengles/LWJGL/src/java/org/lwjgl/opengl/PixelFormatLWJGL.java
branches/opengles/LWJGL/src/java/org/lwjgl/opengles/
branches/opengles/LWJGL/src/java/org/lwjgl/opengles/APIUtil.java
branches/opengles/LWJGL/src/java/org/lwjgl/opengles/ContextAttribs.java
branches/opengles/LWJGL/src/java/org/lwjgl/opengles/EGL.java
branches/opengles/LWJGL/src/java/org/lwjgl/opengles/EGLConfig.java
branches/opengles/LWJGL/src/java/org/lwjgl/opengles/EGLContext.java
branches/opengles/LWJGL/src/java/org/lwjgl/opengles/EGLDisplay.java
branches/opengles/LWJGL/src/java/org/lwjgl/opengles/EGLImageOES.java
branches/opengles/LWJGL/src/java/org/lwjgl/opengles/EGLKHRFenceSync.java
branches/opengles/LWJGL/src/java/org/lwjgl/opengles/EGLKHRReusableSync.java
branches/opengles/LWJGL/src/java/org/lwjgl/opengles/EGLNVSync.java
branches/opengles/LWJGL/src/java/org/lwjgl/opengles/EGLSurface.java
branches/opengles/LWJGL/src/java/org/lwjgl/opengles/EGLSyncKHR.java
branches/opengles/LWJGL/src/java/org/lwjgl/opengles/EGLSyncNV.java
branches/opengles/LWJGL/src/java/org/lwjgl/opengles/GLChecks.java
branches/opengles/LWJGL/src/java/org/lwjgl/opengles/GLContext.java
branches/opengles/LWJGL/src/java/org/lwjgl/opengles/PeerInfo.java
branches/opengles/LWJGL/src/java/org/lwjgl/opengles/PixelFormat.java
branches/opengles/LWJGL/src/java/org/lwjgl/opengles/PowerManagementEventException.java
branches/opengles/LWJGL/src/java/org/lwjgl/opengles/StateTracker.java
branches/opengles/LWJGL/src/java/org/lwjgl/opengles/Util.java
branches/opengles/LWJGL/src/java/org/lwjgl/test/opengles/
branches/opengles/LWJGL/src/java/org/lwjgl/test/opengles/FullScreenWindowedTest.java
branches/opengles/LWJGL/src/java/org/lwjgl/test/opengles/Gears.java
branches/opengles/LWJGL/src/java/org/lwjgl/test/opengles/MappedIndexedVBOTest.java
branches/opengles/LWJGL/src/java/org/lwjgl/test/opengles/QuadRenderer.java
branches/opengles/LWJGL/src/java/org/lwjgl/test/opengles/util/
branches/opengles/LWJGL/src/java/org/lwjgl/test/opengles/util/BufferObject.java
branches/opengles/LWJGL/src/java/org/lwjgl/test/opengles/util/BufferObjectArray.java
branches/opengles/LWJGL/src/java/org/lwjgl/test/opengles/util/BufferObjectElement.java
branches/opengles/LWJGL/src/java/org/lwjgl/test/opengles/util/GLLight.java
branches/opengles/LWJGL/src/java/org/lwjgl/test/opengles/util/GLMatrix.java
branches/opengles/LWJGL/src/java/org/lwjgl/test/opengles/util/GLObject.java
branches/opengles/LWJGL/src/java/org/lwjgl/test/opengles/util/Geometry.java
branches/opengles/LWJGL/src/java/org/lwjgl/test/opengles/util/ImmediateModeBuffer.java
branches/opengles/LWJGL/src/java/org/lwjgl/test/opengles/util/Shader.java
branches/opengles/LWJGL/src/java/org/lwjgl/test/opengles/util/ShaderProgram.java
branches/opengles/LWJGL/src/java/org/lwjgl/test/opengles/util/Sphere.java
branches/opengles/LWJGL/src/java/org/lwjgl/util/generator/opengl/EGLint64NV.java
branches/opengles/LWJGL/src/java/org/lwjgl/util/generator/opengl/EGLuint64NV.java
branches/opengles/LWJGL/src/java/org/lwjgl/util/generator/opengl/GLESCapabilitiesGenerator.java
branches/opengles/LWJGL/src/java/org/lwjgl/util/generator/opengl/GLESGeneratorProcessorFactory.java
branches/opengles/LWJGL/src/java/org/lwjgl/util/generator/opengl/GLESTypeMap.java
branches/opengles/LWJGL/src/native/common/EGL/
branches/opengles/LWJGL/src/native/common/EGL/egl.h
branches/opengles/LWJGL/src/native/common/EGL/eglext.h
branches/opengles/LWJGL/src/native/common/EGL/eglplatform.h
branches/opengles/LWJGL/src/native/common/GLES2/
branches/opengles/LWJGL/src/native/common/GLES2/gl2.h
branches/opengles/LWJGL/src/native/common/GLES2/gl2ext.h
branches/opengles/LWJGL/src/native/common/GLES2/gl2extimg.h
branches/opengles/LWJGL/src/native/common/GLES2/gl2platform.h
branches/opengles/LWJGL/src/native/common/KHR/
branches/opengles/LWJGL/src/native/common/KHR/khrplatform.h
branches/opengles/LWJGL/src/native/common/opengl/
branches/opengles/LWJGL/src/native/common/opengl/extgl.c
branches/opengles/LWJGL/src/native/common/opengl/extgl.h
branches/opengles/LWJGL/src/native/common/opengl/extgl_types.h
branches/opengles/LWJGL/src/native/common/opengl/org_lwjgl_opengl_CallbackUtil.c
branches/opengles/LWJGL/src/native/common/opengl/org_lwjgl_opengl_GLContext.c
branches/opengles/LWJGL/src/native/common/opengles/
branches/opengles/LWJGL/src/native/common/opengles/extgl.c
branches/opengles/LWJGL/src/native/common/opengles/extgl.h
branches/opengles/LWJGL/src/native/common/opengles/extgl_egl.c
branches/opengles/LWJGL/src/native/common/opengles/extgl_egl.h
branches/opengles/LWJGL/src/native/common/opengles/extgl_types.h
branches/opengles/LWJGL/src/native/common/opengles/org_lwjgl_opengles_EGL.c
branches/opengles/LWJGL/src/native/common/opengles/org_lwjgl_opengles_EGLKHRFenceSync.c
branches/opengles/LWJGL/src/native/common/opengles/org_lwjgl_opengles_EGLKHRReusableSync.c
branches/opengles/LWJGL/src/native/common/opengles/org_lwjgl_opengles_EGLNVSync.c
branches/opengles/LWJGL/src/native/common/opengles/org_lwjgl_opengles_GLContext.c
branches/opengles/LWJGL/src/native/linux/opengl/
branches/opengles/LWJGL/src/native/linux/opengl/context.c
branches/opengles/LWJGL/src/native/linux/opengl/context.h
branches/opengles/LWJGL/src/native/linux/opengl/display.c
branches/opengles/LWJGL/src/native/linux/opengl/extgl_glx.c
branches/opengles/LWJGL/src/native/linux/opengl/extgl_glx.h
branches/opengles/LWJGL/src/native/linux/opengl/org_lwjgl_opengl_Display.c
branches/opengles/LWJGL/src/native/linux/opengl/org_lwjgl_opengl_LinuxAWTGLCanvasPeerInfo.c
branches/opengles/LWJGL/src/native/linux/opengl/org_lwjgl_opengl_LinuxCanvasImplementation.c
branches/opengles/LWJGL/src/native/linux/opengl/org_lwjgl_opengl_LinuxContextImplementation.c
branches/opengles/LWJGL/src/native/linux/opengl/org_lwjgl_opengl_Pbuffer.c
branches/opengles/LWJGL/src/native/linux/opengles/
branches/opengles/LWJGL/src/native/linux/opengles/context.c
branches/opengles/LWJGL/src/native/linux/opengles/context.h
branches/opengles/LWJGL/src/native/linux/opengles/display.c
branches/opengles/LWJGL/src/native/linux/opengles/extgl_glx.c
branches/opengles/LWJGL/src/native/linux/opengles/org_lwjgl_opengl_Display.c
branches/opengles/LWJGL/src/native/windows/opengl/
branches/opengles/LWJGL/src/native/windows/opengl/context.c
branches/opengles/LWJGL/src/native/windows/opengl/context.h
branches/opengles/LWJGL/src/native/windows/opengl/extgl_wgl.c
branches/opengles/LWJGL/src/native/windows/opengl/extgl_wgl.h
branches/opengles/LWJGL/src/native/windows/opengl/org_lwjgl_opengl_Pbuffer.c
branches/opengles/LWJGL/src/native/windows/opengl/org_lwjgl_opengl_WindowsContextImplementation.c
branches/opengles/LWJGL/src/native/windows/opengl/org_lwjgl_opengl_WindowsPeerInfo.c
branches/opengles/LWJGL/src/native/windows/opengles/
branches/opengles/LWJGL/src/native/windows/opengles/context.c
branches/opengles/LWJGL/src/native/windows/opengles/context.h
branches/opengles/LWJGL/src/native/windows/opengles/extgl_wgl.c
branches/opengles/LWJGL/src/native/windows/opengles/org_lwjgl_opengl_WindowsPeerInfo.c
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/AMD_compressed_3DC_texture.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/AMD_compressed_ATC_texture.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/AMD_performance_monitor.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/AMD_program_binary_Z400.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/ANGLE_framebuffer_blit.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/ANGLE_framebuffer_multisample.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/APPLE_framebuffer_multisample.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/APPLE_rgb_422.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/APPLE_texture_format_BGRA8888.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/APPLE_texture_max_level.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/ARB_draw_buffers.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/ARB_half_float_pixel.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/ARB_texture_rectangle.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/ARM_mali_shader_binary.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/ARM_rgba8.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/DMP_shader_binary.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/EXT_Cg_shader.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/EXT_bgra.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/EXT_blend_minmax.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/EXT_discard_framebuffer.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/EXT_frag_depth.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/EXT_multi_draw_arrays.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/EXT_packed_float.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/EXT_read_format_bgra.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/EXT_shader_texture_lod.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/EXT_texture_array.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/EXT_texture_compression_dxt1.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/EXT_texture_compression_latc.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/EXT_texture_compression_s3tc.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/EXT_texture_filter_anisotropic.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/EXT_texture_format_BGRA8888.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/EXT_texture_lod_bias.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/EXT_texture_type_2_10_10_10_REV.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/GLES20.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/IMG_multisamples_render_to_texture.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/IMG_program_binary.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/IMG_shader_binary.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/IMG_texture_compression_pvrtc.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/NV_coverage_sample.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/NV_depth_nonlinear.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/NV_draw_path.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/NV_fbo_color_attachments.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/NV_fence.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/NV_framebuffer_vertex_attrib_array.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/NV_get_tex_image.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/NV_read_buffer.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/NV_shader_framebuffer_fetch.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/NV_system_time.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/OES_EGL_image.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/OES_EGL_image_external.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/OES_EGL_sync.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/OES_blend_equation_separate.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/OES_blend_func_separate.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/OES_blend_subtract.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/OES_compressed_ETC1_RGB8_texture.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/OES_compressed_paletted_texture.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/OES_depth24.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/OES_depth32.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/OES_depth_texture.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/OES_element_index_uint.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/OES_fbo_render_mipmap.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/OES_framebuffer_object.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/OES_get_program_binary.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/OES_mapbuffer.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/OES_packed_depth_stencil.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/OES_rgb8_rgba8.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/OES_standard_derivatives.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/OES_stencil1.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/OES_stencil4.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/OES_stencil8.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/OES_texture_3D.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/OES_texture_float.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/OES_texture_float_linear.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/OES_texture_half_float.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/OES_texture_half_float_linear.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/OES_texture_npot.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/OES_vertex_array_object.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/OES_vertex_half_float.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/OES_vertex_type_10_10_10_2.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/QCOM_driver_control.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/QCOM_extended_get.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/QCOM_extended_get2.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/QCOM_performance_monitor_global_mode.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/QCOM_tiled_rendering.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/QCOM_writeonly_rendering.java
branches/opengles/LWJGL/src/templates/org/lwjgl/opengles/VIV_shader_binary.java
Removed Paths:
-------------
branches/opengles/LWJGL/src/java/org/lwjgl/opengl/AbstractDrawable.java
branches/opengles/LWJGL/src/java/org/lwjgl/opengl/Context.java
branches/opengles/LWJGL/src/native/common/extgl.c
branches/opengles/LWJGL/src/native/common/extgl.h
branches/opengles/LWJGL/src/native/common/extgl_types.h
branches/opengles/LWJGL/src/native/common/org_lwjgl_opengl_CallbackUtil.c
branches/opengles/LWJGL/src/native/common/org_lwjgl_opengl_GLContext.c
branches/opengles/LWJGL/src/native/linux/context.c
branches/opengles/LWJGL/src/native/linux/context.h
branches/opengles/LWJGL/src/native/linux/display.c
branches/opengles/LWJGL/src/native/linux/extgl_glx.c
branches/opengles/LWJGL/src/native/linux/extgl_glx.h
branches/opengles/LWJGL/src/native/linux/org_lwjgl_opengl_Display.c
branches/opengles/LWJGL/src/native/linux/org_lwjgl_opengl_LinuxAWTGLCanvasPeerInfo.c
branches/opengles/LWJGL/src/native/linux/org_lwjgl_opengl_LinuxCanvasImplementation.c
branches/opengles/LWJGL/src/native/linux/org_lwjgl_opengl_LinuxContextImplementation.c
branches/opengles/LWJGL/src/native/linux/org_lwjgl_opengl_Pbuffer.c
branches/opengles/LWJGL/src/native/windows/context.c
branches/opengles/LWJGL/src/native/windows/context.h
branches/opengles/LWJGL/src/native/windows/extgl_wgl.c
branches/opengles/LWJGL/src/native/windows/extgl_wgl.h
branches/opengles/LWJGL/src/native/windows/org_lwjgl_opengl_Pbuffer.c
branches/opengles/LWJGL/src/native/windows/org_lwjgl_opengl_WindowsContextImplementation.c
branches/opengles/LWJGL/src/native/windows/org_lwjgl_opengl_WindowsPeerInfo.c
Property Changed:
----------------
branches/opengles/LWJGL/
branches/opengles/LWJGL/libs/
branches/opengles/LWJGL/libs/windows/
branches/opengles/LWJGL/src/native/common/
branches/opengles/LWJGL/src/native/linux/
Property changes on: branches/opengles/LWJGL
___________________________________________________________________
Modified: svn:ignore
- .classpath
*.class
*.class~
*.java~
.nbattrs
.project
dist
libs
temp
+ *.class
*.class~
*.java~
.classpath
.nbattrs
.project
bin
dist
libs
temp
Modified: branches/opengles/LWJGL/build.xml
===================================================================
--- branches/opengles/LWJGL/build.xml 2011-05-14 15:14:23 UTC (rev 3533)
+++ branches/opengles/LWJGL/build.xml 2011-05-17 16:53:57 UTC (rev 3534)
@@ -9,16 +9,17 @@
<import file="platform_build/build-maven.xml"/>
<!-- ================================================================== -->
- <!-- Everything below this line is targets. -->
- <!-- Do not modify, unless you know what you're doing -->
+ <!-- Everything below this line is targets. -->
+ <!-- Do not modify, unless you know what you're doing -->
<!-- ================================================================== -->
<!-- ================================================================== -->
- <!-- Initialize build -->
+ <!-- Initialize build -->
<!-- ================================================================== -->
<target name="-initialize">
<mkdir dir="${lwjgl.bin}" taskname="initialiazing bin folder" />
<mkdir dir="${lwjgl.bin}/lwjgl" taskname="initialiazing native bin folder" />
+ <mkdir dir="${lwjgl.bin}/lwjgles" taskname="initialiazing native OpenGL ES bin folder"/>
<mkdir dir="${lwjgl.lib}" taskname="initialiazing lib folder" />
<mkdir dir="${lwjgl.dist}" taskname="initialiazing dist folder" />
<mkdir dir="${lwjgl.docs}/javadoc" taskname="initialiazing docs folder" />
@@ -111,6 +112,12 @@
<antcall target="-jars_NoDEP" />
</target>
+ <!-- Create ONLY the jar archives for the ES build -->
+ <target name="jars_es" description="Creates the Java archives ONLY for the ES build and places them in libs/"
+ depends="-initialize, generate-all, compile, -createjars_es">
+ <antcall target="-jars_NoDEP"/>
+ </target>
+
<target name="-jars_NoDEP">
<move todir="libs/">
<fileset dir="${lwjgl.temp}/jar">
@@ -161,6 +168,22 @@
</jar>
</target>
+ <!-- Packages the java files for the ES build -->
+ <target name="-createjars_es">
+ <!-- Create lwjgl.jar -->
+ <jar destfile="${lwjgl.temp}/jar/lwjgl.jar" taskname="lwjgl.jar">
+ <fileset refid="lwjgl_es.fileset"/>
+ <manifest>
+ <attribute name="Sealed" value="true"/>
+ </manifest>
+ </jar>
+
+ <!-- Create lwjgl_test.jar -->
+ <jar destfile="${lwjgl.temp}/jar/lwjgl_test.jar" taskname="lwjgl_test.jar">
+ <fileset refid="lwjgl_test_es.fileset"/>
+ </jar>
+ </target>
+
<!-- Distributes files -->
<target name="-distribute">
<delete>
@@ -227,25 +250,35 @@
<class name="org.lwjgl.opengl.LinuxKeyboard" />
<class name="org.lwjgl.opengl.LinuxDisplay" />
<class name="org.lwjgl.opengl.LinuxPeerInfo" />
- <class name="org.lwjgl.opengl.LinuxPbufferPeerInfo" />
- <class name="org.lwjgl.opengl.LinuxDisplayPeerInfo" />
- <class name="org.lwjgl.opengl.LinuxAWTGLCanvasPeerInfo" />
- <class name="org.lwjgl.opengl.LinuxContextImplementation" />
- <class name="org.lwjgl.opengl.LinuxCanvasImplementation" />
</javah>
+ <javah classpath="${lwjgl.bin}" destdir="${lwjgl.src.native}/linux/opengl" force="yes">
+ <class name="org.lwjgl.opengl.LinuxPbufferPeerInfo"/>
+ <class name="org.lwjgl.opengl.LinuxDisplayPeerInfo"/>
+ <class name="org.lwjgl.opengl.LinuxAWTGLCanvasPeerInfo"/>
+ <class name="org.lwjgl.opengl.LinuxContextImplementation"/>
+ <class name="org.lwjgl.opengl.LinuxCanvasImplementation"/>
+ </javah>
+
<javah classpath="${lwjgl.bin}" destdir="${lwjgl.src.native}/windows" force="yes">
+ <class name="org.lwjgl.WindowsSysImplementation"/>
<class name="org.lwjgl.opengl.WindowsKeyboard" />
- <class name="org.lwjgl.opengl.WindowsPbufferPeerInfo" />
- <class name="org.lwjgl.opengl.WindowsDisplay" />
<class name="org.lwjgl.opengl.WindowsRegistry" />
- <class name="org.lwjgl.WindowsSysImplementation" />
- <class name="org.lwjgl.opengl.WindowsAWTGLCanvasPeerInfo" />
- <class name="org.lwjgl.opengl.WindowsPeerInfo" />
- <class name="org.lwjgl.opengl.WindowsDisplayPeerInfo" />
- <class name="org.lwjgl.opengl.WindowsContextImplementation" />
+ <class name="org.lwjgl.opengl.WindowsDisplay"/>
+ <class name="org.lwjgl.opengl.WindowsDisplayPeerInfo"/>
+ <class name="org.lwjgl.opengl.WindowsAWTGLCanvasPeerInfo"/>
</javah>
+ <javah classpath="${lwjgl.bin}" destdir="${lwjgl.src.native}/windows/opengl" force="yes">
+ <class name="org.lwjgl.opengl.WindowsPbufferPeerInfo"/>
+ <class name="org.lwjgl.opengl.WindowsPeerInfo"/>
+ <class name="org.lwjgl.opengl.WindowsContextImplementation"/>
+ </javah>
+
+ <javah classpath="${lwjgl.bin}" destdir="${lwjgl.src.native}/windows/opengles" force="yes">
+ <class name="org.lwjgl.opengl.WindowsPeerInfo"/>
+ </javah>
+
<javah classpath="${lwjgl.bin}" destdir="${lwjgl.src.native}/macosx" force="yes">
<class name="org.lwjgl.MacOSXSysImplementation" />
<class name="org.lwjgl.opengl.MacOSXMouseEventQueue" />
@@ -263,13 +296,24 @@
<class name="org.lwjgl.input.Keyboard" />
<class name="org.lwjgl.input.Mouse" />
<class name="org.lwjgl.openal.AL" />
- <class name="org.lwjgl.opengl.GLContext" />
- <class name="org.lwjgl.opengl.Pbuffer" />
- <class name="org.lwjgl.opengl.CallbackUtil" />
- <class name="org.lwjgl.opencl.CL" />
+ <class name="org.lwjgl.opencl.CL" />
<class name="org.lwjgl.opencl.CallbackUtil" />
- <class name="org.lwjgl.BufferUtils" />
+ <class name="org.lwjgl.BufferUtils" />
</javah>
+
+ <javah classpath="${lwjgl.bin}" destdir="${lwjgl.src.headers}/opengl" force="yes">
+ <class name="org.lwjgl.opengl.GLContext"/>
+ <class name="org.lwjgl.opengl.Pbuffer"/>
+ <class name="org.lwjgl.opengl.CallbackUtil"/>
+ </javah>
+
+ <javah classpath="${lwjgl.bin}" destdir="${lwjgl.src.headers}/opengles" force="yes">
+ <class name="org.lwjgl.opengles.EGL"/>
+ <class name="org.lwjgl.opengles.EGLKHRFenceSync"/>
+ <class name="org.lwjgl.opengles.EGLKHRReusableSync"/>
+ <class name="org.lwjgl.opengles.EGLNVSync"/>
+ <class name="org.lwjgl.opengles.GLContext"/>
+ </javah>
</target>
<target name="touch-version">
@@ -364,6 +408,7 @@
<include name="org/lwjgl/*.java"/>
<include name="org/lwjgl/input/**"/>
<include name="org/lwjgl/opengl/**"/>
+ <include name="org/lwjgl/opengles/**"/>
<include name="org/lwjgl/openal/**"/>
<include name="org/lwjgl/opencl/**"/>
<include name="org/lwjgl/util/**"/>
@@ -430,6 +475,34 @@
<version-check platform="macosx"/>
</target>
+ <target name="compile_native_es" depends="-initialize, headers, touch-version, version-mismatch" description="Compiles the native files">
+ <condition property="lwjgl.platform.windows">
+ <os family="windows"/>
+ </condition>
+ <antcall target="-compile_native_win32_es"/>
+
+ <condition property="lwjgl.platform.linux">
+ <os name="Linux"/>
+ </condition>
+ <antcall target="-compile_native_linux_es"/>
+ </target>
+
+ <!-- Compiles LWJGL ES on Win32 platforms -->
+ <target name="-compile_native_win32_es" if="lwjgl.platform.windows">
+ <ant antfile="platform_build/windows_ant/build_es.xml" inheritAll="false"/>
+ <copy todir="${lwjgl.lib}/windows">
+ <fileset dir="${lwjgl.bin}/lwjgles" includes="lwjgl*.dll"/>
+ </copy>
+ </target>
+
+ <!-- Compiles LWJGL ES on Linux platforms -->
+ <target name="-compile_native_linux_es" if="lwjgl.platform.linux">
+ <ant antfile="platform_build/linux_ant/build_es.xml" inheritAll="false"/>
+ <copy todir="${lwjgl.lib}/linux">
+ <fileset dir="${lwjgl.bin}/lwjgles" includes="liblwjgl*.so"/>
+ </copy>
+ </target>
+
<target name="repack200" description="Pack200-repack a jar file">
<pack200 src="${input}" destfile="${output}" repack="true"/>
</target>
Property changes on: branches/opengles/LWJGL/libs
___________________________________________________________________
Added: svn:ignore
+ lwjgl-debug.jar
lwjgl.jar
lwjgl_test.jar
lwjgl_util.jar
lwjgl_util_applet.jar
Property changes on: branches/opengles/LWJGL/libs/windows
___________________________________________________________________
Added: svn:ignore
+ lwjgl.dll
Added: branches/opengles/LWJGL/libs/windows/libEGL.dll
===================================================================
(Binary files differ)
Property changes on: branches/opengles/LWJGL/libs/windows/libEGL.dll
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: branches/opengles/LWJGL/libs/windows/libEGL.lib
===================================================================
(Binary files differ)
Property changes on: branches/opengles/LWJGL/libs/windows/libEGL.lib
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: branches/opengles/LWJGL/libs/windows/libGLESv2.dll
===================================================================
(Binary files differ)
Property changes on: branches/opengles/LWJGL/libs/windows/libGLESv2.dll
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: branches/opengles/LWJGL/platform_build/build-definitions.xml
===================================================================
--- branches/opengles/LWJGL/platform_build/build-definitions.xml 2011-05-14 15:14:23 UTC (rev 3533)
+++ branches/opengles/LWJGL/platform_build/build-definitions.xml 2011-05-17 16:53:57 UTC (rev 3534)
@@ -16,6 +16,7 @@
<property name="lwjgl.web" location="www" />
<property name="opengl-template-pattern" value="org/lwjgl/opengl/GL*.java,org/lwjgl/opengl/ARB*.java,org/lwjgl/opengl/AMD*.java,org/lwjgl/opengl/APPLE*.java,org/lwjgl/opengl/ATI*.java,org/lwjgl/opengl/EXT*.java,org/lwjgl/opengl/NV*.java,org/lwjgl/opengl/NVX*.java,org/lwjgl/opengl/HP*.java,org/lwjgl/opengl/IBM*.java,org/lwjgl/opengl/SUN*.java,org/lwjgl/opengl/SGIS*.java,org/lwjgl/opengl/GREMEDY*.java"/>
+ <property name="opengles-template-pattern" value="org/lwjgl/opengles/GLES*.java,org/lwjgl/opengles/ARB*.java,org/lwjgl/opengles/EXT*.java,org/lwjgl/opengles/AMD*.java,org/lwjgl/opengles/ANGLE*.java,org/lwjgl/opengles/APPLE*.java,org/lwjgl/opengles/ARM*.java,org/lwjgl/opengles/DMP*.java,org/lwjgl/opengles/IMG*.java,org/lwjgl/opengles/NV*.java,org/lwjgl/opengles/OES*.java,org/lwjgl/opengles/QCOM*.java,org/lwjgl/opengles/VIV*.java"/>
<property name="opencl-template-pattern-extensions" value="org/lwjgl/opencl/KHR*.java,org/lwjgl/opencl/EXT*.java,org/lwjgl/opencl/APPLE*.java,org/lwjgl/opencl/AMD*.java,org/lwjgl/opencl/NV*.java"/>
<property name="opencl-template-pattern" value="org/lwjgl/opencl/CL*.java,${opencl-template-pattern-extensions}"/>
@@ -27,13 +28,25 @@
<fileset id="lwjgl.fileset" dir="${lwjgl.bin}">
<patternset id="lwjgl.package.pattern">
<include name="org/**/*" />
+ <exclude name="org/lwjgl/opengles/**"/>
<exclude name="org/lwjgl/d3d/**" />
<exclude name="org/lwjgl/test/**" />
<exclude name="org/lwjgl/util/**" />
<exclude name="org/lwjgl/examples/**" />
</patternset>
</fileset>
-
+
+ <!-- Files to include in the lwjgl.jar file, for the ES build -->
+ <fileset id="lwjgl_es.fileset" dir="${lwjgl.bin}">
+ <patternset id="lwjgl_es.package.pattern">
+ <include name="org/**/*"/>
+ <exclude name="org/lwjgl/d3d/**"/>
+ <exclude name="org/lwjgl/test/**"/>
+ <exclude name="org/lwjgl/util/**"/>
+ <exclude name="org/lwjgl/examples/**"/>
+ </patternset>
+ </fileset>
+
<!-- Files to include in the lwjgl_util_applet.jar file -->
<fileset id="lwjgl_util_applet.fileset" dir="${lwjgl.bin}">
<patternset id="lwjgl_util_applet.package.pattern">
@@ -46,6 +59,7 @@
<fileset id="lwjgl_test.fileset" dir="${lwjgl.bin}">
<exclude name="**.*" />
<include name="org/lwjgl/test/**" />
+ <exclude name="org/lwjgl/test/opengles/**"/>
<include name="org/lwjgl/examples/**" />
</fileset>
@@ -59,6 +73,14 @@
<include name="org/lwjgl/test/opencl/gl/*.cl" />
</fileset>
+ <!-- Files to include in the lwjgl_test.jar file for the ES build -->
+ <fileset id="lwjgl_test_es.fileset" dir="${lwjgl.bin}">
+ <exclude name="**.*"/>
+ <include name="org/lwjgl/test/**"/>
+ <exclude name="org/lwjgl/test/opengl/**"/>
+ <exclude name="org/lwjgl/test/*.*"/>
+ </fileset>
+
<!-- Files to include in the lwjgl_util.jar file -->
<fileset id="lwjgl_util.fileset" dir="${lwjgl.bin}">
<patternset id="lwjgl_util.package.pattern">
@@ -68,8 +90,8 @@
<include name="org/lwjgl/util/**" />
</patternset>
</fileset>
-
+
<!-- Files to include in the lwjgl_applet.jar file -->
<fileset id="lwjgl_applet.fileset" dir="${lwjgl.bin}">
<exclude name="**.*"/>
@@ -116,7 +138,7 @@
<include name="liblwjgl*.so" />
<include name="libopenal*.so" />
</patternset>
- <patternset id="lwjgl-linux-jinput.fileset">
+ <patternset id="lwjgl-linux-jinput.fileset">
<include name="libjinput-linux.so" />
<include name="libjinput-linux64.so" />
</patternset>
Modified: branches/opengles/LWJGL/platform_build/build-generator.xml
===================================================================
--- branches/opengles/LWJGL/platform_build/build-generator.xml 2011-05-14 15:14:23 UTC (rev 3533)
+++ branches/opengles/LWJGL/platform_build/build-generator.xml 2011-05-17 16:53:57 UTC (rev 3534)
@@ -18,6 +18,7 @@
<javac debug="yes" srcdir="${lwjgl.src}/java/" destdir="${lwjgl.bin}" includes="org/lwjgl/util/generator/**.java" source="1.5" target="1.5" taskname="generator">
<include name="org/lwjgl/util/generator/openal/**.java"/>
<include name="org/lwjgl/util/generator/opengl/**.java"/>
+ <include name="org/lwjgl/util/generator/opengles/**.java"/>
<include name="org/lwjgl/util/generator/opencl/**.java"/>
<compilerarg value="-Xlint:all"/>
</javac>
@@ -29,6 +30,8 @@
<include name="org/lwjgl/opengl/GLSync.java"/>
<include name="org/lwjgl/opengl/AMDDebugOutputCallback.java"/>
<include name="org/lwjgl/opengl/ARBDebugOutputCallback.java"/>
+ <!-- OpenGL ES -->
+ <include name="org/lwjgl/opengles/EGLImageOES.java"/>
<!-- OpenCL -->
<include name="org/lwjgl/opencl/CLPlatform.java"/>
<include name="org/lwjgl/opencl/CLDevice.java"/>
@@ -45,10 +48,16 @@
</target>
<!-- Proxy target to generate it all -->
- <target name="generate-all" depends="generate-openal, generate-opengl, generate-opengl-capabilities, generate-opengl-references, generate-opencl, generate-opencl-capabilities" description="Generates java and native source"/>
+ <target name="generate-all" depends="generate-openal, generate-opengl, generate-opengl-capabilities, generate-opengl-references, generate-opengles, generate-opengles-capabilities, generate-opencl, generate-opencl-capabilities" description="Generates java and native source"/>
<target name="generate-debug" depends="generate-openal-debug, generate-opengl-debug, generate-opengl-capabilities-debug, generate-opengl-references, generate-opencl-debug, generate-opencl-capabilities-debug" description="Generates java and native source with debug functionality"/>
+ <!-- ********************************************************************************
+ *********************************************************************************
+ OPENAL
+ *********************************************************************************
+ **************************************************************************** -->
+
<!-- Generate OpenAL -->
<target name="generate-openal" depends="generators" description="Generates java and native source for AL">
<apply executable="apt" parallel="true">
@@ -60,7 +69,7 @@
<arg value="-s"/>
<arg path="${lwjgl.src}/generated"/>
<arg value="-d"/>
- <arg path="${lwjgl.src.native}/generated"/>
+ <arg path="${lwjgl.src.native}/generated/openal"/>
<arg value="-Atypemap=org.lwjgl.util.generator.openal.ALTypeMap"/>
<fileset dir="${lwjgl.src.templates}" includes="org/lwjgl/openal/AL10.java, org/lwjgl/openal/AL11.java, org/lwjgl/openal/EFX10.java"/>
</apply>
@@ -77,13 +86,19 @@
<arg value="-s"/>
<arg path="${lwjgl.src}/generated"/>
<arg value="-d"/>
- <arg path="${lwjgl.src.native}/generated"/>
+ <arg path="${lwjgl.src.native}/generated/openal"/>
<arg value="-Atypemap=org.lwjgl.util.generator.openal.ALTypeMap"/>
<arg value="-Ageneratechecks"/>
<fileset dir="${lwjgl.src.templates}" includes="org/lwjgl/openal/AL10.java, org/lwjgl/openal/AL11.java, org/lwjgl/openal/EFX10.java"/>
</apply>
</target>
+ <!-- ********************************************************************************
+ *********************************************************************************
+ OPENGL
+ *********************************************************************************
+ **************************************************************************** -->
+
<!-- Generate OpenGL -->
<target name="generate-opengl" depends="generators" description="Generates java and native source for GL">
<apply executable="apt" parallel="true">
@@ -95,7 +110,7 @@
<arg value="-s"/>
<arg path="${lwjgl.src}/generated"/>
<arg value="-d"/>
- <arg path="${lwjgl.src.native}/generated"/>
+ <arg path="${lwjgl.src.native}/generated/opengl"/>
<arg value="-Acontextspecific"/>
<arg value="-Atypemap=org.lwjgl.util.generator.opengl.GLTypeMap"/>
<fileset dir="${lwjgl.src.templates}" includes="${opengl-template-pattern}"/>
@@ -103,7 +118,7 @@
</target>
<!-- Generate OpenGL [DEBUG] -->
- <target name="generate-opengl-debug" depends="generators" description="Generates java and native source for GL">
+ <target name="generate-opengl-debug" depends="generators" description="Generates debug java and native source for GL">
<apply executable="apt" parallel="true">
<arg value="-nocompile"/>
<arg value="-factory"/>
@@ -113,7 +128,7 @@
<arg value="-s"/>
<arg path="${lwjgl.src}/generated"/>
<arg value="-d"/>
- <arg path="${lwjgl.src.native}/generated"/>
+ <arg path="${lwjgl.src.native}/generated/opengl"/>
<arg value="-Ageneratechecks"/>
<arg value="-Acontextspecific"/>
<arg value="-Atypemap=org.lwjgl.util.generator.opengl.GLTypeMap"/>
@@ -151,7 +166,7 @@
</target>
<!-- Generate OpenGL context capabilities [DEBUG] -->
- <target name="generate-opengl-capabilities-debug" depends="generators" description="Generates java and native source for GL">
+ <target name="generate-opengl-capabilities-debug" depends="generators" description="Generates debug java and native source for GL">
<apply executable="apt" parallel="true">
<arg value="-nocompile"/>
<arg value="-factory"/>
@@ -166,7 +181,87 @@
</apply>
</target>
- <!-- Generate OpenCL -->
+ <!-- ********************************************************************************
+ *********************************************************************************
+ OPENGL ES
+ *********************************************************************************
+ **************************************************************************** -->
+
+ <!-- Generate OpenGL ES -->
+ <target name="generate-opengles" depends="generators" description="Generates java and native source for GL ES">
+ <apply executable="apt" parallel="true">
+ <arg value="-nocompile"/>
+ <arg value="-factory"/>
+ <arg value="org.lwjgl.util.generator.GeneratorProcessorFactory"/>
+ <arg value="-cp"/>
+ <arg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
+ <arg value="-s"/>
+ <arg path="${lwjgl.src}/generated"/>
+ <arg value="-d"/>
+ <arg path="${lwjgl.src.native}/generated/opengles"/>
+ <!--<arg value="-Acontextspecific"/>-->
+ <arg value="-Atypemap=org.lwjgl.util.generator.opengl.GLESTypeMap"/>
+ <fileset dir="${lwjgl.src.templates}" includes="${opengles-template-pattern}"/>
+ </apply>
+ </target>
+
+ <!-- Generate OpenGL ES [DEBUG] -->
+ <target name="generate-opengles-debug" depends="generators" description="Generates debug java and native source for GL ES">
+ <apply executable="apt" parallel="true">
+ <arg value="-nocompile"/>
+ <arg value="-factory"/>
+ <arg value="org.lwjgl.util.generator.GeneratorProcessorFactory"/>
+ <arg value="-cp"/>
+ <arg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
+ <arg value="-s"/>
+ <arg path="${lwjgl.src}/generated"/>
+ <arg value="-d"/>
+ <arg path="${lwjgl.src.native}/generated/opengles"/>
+ <arg value="-Ageneratechecks"/>
+ <!--<arg value="-Acontextspecific"/>-->
+ <arg value="-Atypemap=org.lwjgl.util.generator.opengl.GLESTypeMap"/>
+ <fileset dir="${lwjgl.src.templates}" includes="${opengles-template-pattern}"/>
+ </apply>
+ </target>
+
+ <!-- Generate OpenGL ES context capabilities -->
+ <target name="generate-opengles-capabilities" depends="generators" description="Generates java and native source for GL ES">
+ <apply executable="apt" parallel="true">
+ <arg value="-nocompile"/>
+ <arg value="-factory"/>
+ <arg value="org.lwjgl.util.generator.opengl.GLESGeneratorProcessorFactory"/>
+ <arg value="-cp"/>
+ <arg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
+ <arg value="-s"/>
+ <arg path="${lwjgl.src}/generated"/>
+ <!--<arg value="-Acontextspecific"/>-->
+ <fileset dir="${lwjgl.src.templates}" includes="${opengles-template-pattern}"/>
+ </apply>
+ </target>
+
+ <!-- Generate OpenGL ES context capabilities [DEBUG] -->
+ <target name="generate-opengles-capabilities-debug" depends="generators" description="Generates debug java and native source for GL ES">
+ <apply executable="apt" parallel="true">
+ <arg value="-nocompile"/>
+ <arg value="-factory"/>
+ <arg value="org.lwjgl.util.generator.opengl.GLESGeneratorProcessorFactory"/>
+ <arg value="-cp"/>
+ <arg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
+ <arg value="-s"/>
+ <arg path="${lwjgl.src}/generated"/>
+ <arg value="-Ageneratechecks"/>
+ <!--<arg value="-Acontextspecific"/>-->
+ <fileset dir="${lwjgl.src.templates}" includes="${opengles-template-pattern}"/>
+ </apply>
+ </target>
+
+ <!-- ********************************************************************************
+ *********************************************************************************
+ OPENCL
+ *********************************************************************************
+ **************************************************************************** -->
+
+ <!-- Generate OpenCL -->
<target name="generate-opencl" depends="generators" description="Generates java and native source for CL">
<apply executable="apt" parallel="true">
<arg value="-nocompile"/>
@@ -177,7 +272,7 @@
<arg value="-s"/>
<arg path="${lwjgl.src}/generated"/>
<arg value="-d"/>
- <arg path="${lwjgl.src.native}/generated"/>
+ <arg path="${lwjgl.src.native}/generated/opencl"/>
<arg value="-Acontextspecific"/>
<arg value="-Atypemap=org.lwjgl.util.generator.opencl.CLTypeMap"/>
<fileset dir="${lwjgl.src.templates}" includes="${opencl-template-pattern}"/>
@@ -185,7 +280,7 @@
</target>
<!-- Generate OpenCL [DEBUG] -->
- <target name="generate-opencl-debug" depends="generators" description="Generates java and native source for CL">
+ <target name="generate-opencl-debug" depends="generators" description="Generates debug java and native source for CL">
<apply executable="apt" parallel="true">
<arg value="-nocompile"/>
<arg value="-factory"/>
@@ -195,7 +290,7 @@
<arg value="-s"/>
<arg path="${lwjgl.src}/generated"/>
<arg value="-d"/>
- <arg path="${lwjgl.src.native}/generated"/>
+ <arg path="${lwjgl.src.native}/generated/opencl"/>
<arg value="-Ageneratechecks"/>
<arg value="-Acontextspecific"/>
<arg value="-Atypemap=org.lwjgl.util.generator.opencl.CLTypeMap"/>
@@ -219,7 +314,7 @@
</target>
<!-- Generate OpenCL capabilities [DEBUG] -->
- <target name="generate-opencl-capabilities-debug" depends="generators" description="Generates capabilities for CL">
+ <target name="generate-opencl-capabilities-debug" depends="generators" description="Generates debug capabilities for CL">
<apply executable="apt" parallel="true">
<arg value="-nocompile"/>
<arg value="-factory"/>
Modified: branches/opengles/LWJGL/platform_build/linux_ant/build.xml
===================================================================
--- branches/opengles/LWJGL/platform_build/linux_ant/build.xml 2011-05-14 15:14:23 UTC (rev 3533)
+++ branches/opengles/LWJGL/platform_build/linux_ant/build.xml 2011-05-17 16:53:57 UTC (rev 3534)
@@ -73,12 +73,16 @@
<arg value="-I${java.home}/../include/linux"/>
<arg value="-I${java.home}/../include/solaris"/>
<arg value="-I${native}/common"/>
+ <arg value="-I${native}/common/opengl"/>
<arg value="-I${native}/linux"/>
+ <arg value="-I${native}/linux/opengl"/>
<mapper type="glob" from="*.c" to="*.o"/>
- <fileset dir="${native}/linux" includes="*.c"/>
- <fileset dir="${native}/generated" includes="*.c"/>
- <fileset dir="${native}/common" includes="*.c"/>
- </apply>
+ <fileset dir="${native}/common" includes="*.c"/>
+ <fileset dir="${native}/common/opengl" includes="*.c"/>
+ <fileset dir="${native}/generated/opengl" includes="*.c"/>
+ <fileset dir="${native}/linux" includes="*.c"/>
+ <fileset dir="${native}/linux/opengl" includes="*.c"/>
+ </apply>
<apply dir="." parallel="true" executable="gcc" failonerror="true">
<srcfile/>
<arg line="${linker_flags32}"/>
@@ -99,12 +103,16 @@
<arg value="-I${java.home}/../include/linux"/>
<arg value="-I${java.home}/../include/solaris"/>
<arg value="-I${native}/common"/>
+ <arg value="-I${native}/common/opengl"/>
<arg value="-I${native}/linux"/>
+ <arg value="-I${native}/linux/opengl"/>
<mapper type="glob" from="*.c" to="*.o"/>
- <fileset dir="${native}/linux" includes="*.c"/>
- <fileset dir="${native}/generated" includes="*.c"/>
- <fileset dir="${native}/common" includes="*.c"/>
- </apply>
+ <fileset dir="${native}/common" includes="*.c"/>
+ <fileset dir="${native}/common/opengl" includes="*.c"/>
+ <fileset dir="${native}/generated/opengl" includes="*.c"/>
+ <fileset dir="${native}/linux" includes="*.c"/>
+ <fileset dir="${native}/linux/opengl" includes="*.c"/>
+ </apply>
<apply dir="." parallel="true" executable="gcc" failonerror="true">
<srcfile/>
<arg line="${linker_flags64}"/>
Added: branches/opengles/LWJGL/platform_build/linux_ant/build_es.xml
===================================================================
--- branches/opengles/LWJGL/platform_build/linux_ant/build_es.xml (rev 0)
+++ branches/opengles/LWJGL/platform_build/linux_ant/build_es.xml 2011-05-17 16:53:57 UTC (rev 3534)
@@ -0,0 +1,125 @@
+<?xml version="1.0"?>
+
+<project name="lwjgl native code, linux" basedir="../../bin/lwjgles" default="compile">
+ <property name="native" location="../../src/native"/>
+ <property name="libname32" value="liblwjgl.so"/>
+ <property name="libname64" value="liblwjgl64.so"/>
+ <property name="libs32" value="-L/home/spasi/lwjgl/libs/linux -lEGL -L/usr/X11R6/lib -L/usr/X11/lib -lm -lX11 -lXext -lXcursor -lXrandr -lpthread -L${java.home}/lib/i386 -ljawt" />
+ <property name="libs64" value="-L${lib_folder}/x64 -lEGL -L/usr/X11R6/lib64 -L/usr/X11/lib64 -lm -lX11 -lXext -lXcursor -lXrandr -lXxf86vm -lpthread -L${java.home}/lib/amd64 -ljawt" />
+ <property name="cflags32" value="-O2 -Wall -c -fPIC -std=c99 -Wunused"/>
+
+ <target name="clean">
+ <delete>
+ <fileset dir="x32"/>
+ <fileset dir="x64"/>
+ <fileset dir="." includes="*.o"/>
+ <fileset dir="." includes="*.so"/>
+ </delete>
+ </target>
+
+ <target name="compile">
+ <exec executable="uname" outputproperty="hwplatform">
+ <arg value="-m"/>
+ </exec>
+ <condition property="xf86vm_lib" value="-lXxf86vm" else="-Wl,-static,-lXxf86vm,-call_shared">
+ <os name="SunOS" />
+ </condition>
+ <condition property="cflags_pthread" value="-pthreads" else="-pthread">
+ <os name="SunOS" />
+ </condition>
+ <condition property="version_script_flags32" value="" else="-Wl,--version-script='${native}/linux/lwjgl.map'">
+ <os name="SunOS" />
+ </condition>
+ <condition property="version_script_flags64" value="-m64" else="-Wl,--version-script='${native}/linux/lwjgl.map'">
+ <and>
+ <os name="SunOS" />
+ </and>
+ </condition>
+ <condition property="cflags64" value="-O2 -m64 -Wall -c -fPIC -std=c99 -Wunused" else="-O2 -Wall -c -fPIC -std=c99 -Wunused">
+ <os name="SunOS" />
+ </condition>
+
+ <property name="linker_flags32" value="${version_script_flags32} -shared -O2 -Wall -o ${libname32} ${libs32} ${xf86vm_lib}"/>
+ <property name="linker_flags64" value="${version_script_flags64} -shared -O2 -Wall -o ${libname64} ${libs64} ${xf86vm_lib}"/>
+
+ <condition property="build.32bit.only">
+ <not>
+ <or>
+ <equals arg1="${hwplatform}" arg2="x86_64"/>
+ <equals arg1="${hwplatform}" arg2="i86pc"/>
+ </or>
+ </not>
+ </condition>
+
+ <!-- On linux, the 64 bit jre doesn't have the 32 bit libs -->
+ <condition property="build.64bit.only">
+ <and>
+ <os name="Linux"/>
+ <equals arg1="${hwplatform}" arg2="x86_64"/>
+ </and>
+ </condition>
+
+ <antcall target="compile32"/>
+ <antcall target="compile64"/>
+ </target>
+
+ <target name="compile32" unless="build.64bit.only">
+ <mkdir dir="x32"/>
+ <apply dir="x32" executable="gcc" skipemptyfilesets="true" failonerror="true">
+ <arg line="${cflags32} ${cflags_pthread}"/>
+ <arg value="-I${java.home}/include"/>
+ <arg value="-I${java.home}/include/linux"/>
+ <arg value="-I${java.home}/../include"/>
+ <arg value="-I${java.home}/../include/linux"/>
+ <arg value="-I${java.home}/../include/solaris"/>
+ <arg value="-I${native}/common"/>
+ <arg value="-I${native}/common/opengles"/>
+ <arg value="-I${native}/linux"/>
+ <arg value="-I${native}/linux/opengles"/>
+ <mapper type="glob" from="*.c" to="*.o"/>
+ <fileset dir="${native}/common" includes="*.c"/>
+ <fileset dir="${native}/common/opengles" includes="*.c"/>
+ <fileset dir="${native}/generated/opengles" includes="*.c"/>
+ <fileset dir="${native}/linux" includes="*.c"/>
+ <fileset dir="${native}/linux/opengles" includes="*.c"/>
+ </apply>
+ <apply dir="." parallel="true" executable="gcc" failonerror="true">
+ <srcfile/>
+ <arg line="${linker_flags32}"/>
+ <fileset dir="x32" includes="*.o"/>
+ </apply>
+ <apply dir="." parallel="true" executable="strip" failonerror="true">
+ <fileset file="${libname32}"/>
+ </apply>
+ </target>
+
+ <target name="compile64" unless="build.32bit.only">
+ <mkdir dir="x64"/>
+ <apply dir="x64" executable="gcc" skipemptyfilesets="true" failonerror="true">
+ <arg line="${cflags64} ${cflags_pthread}"/>
+ <arg value="-I${java.home}/include"/>
+ <arg value="-I${java.home}/include/linux"/>
+ <arg value="-I${java.home}/../include"/>
+ <arg value="-I${java.home}/../include/linux"/>
+ <arg value="-I${java.home}/../include/solaris"/>
+ <arg value="-I${native}/common"/>
+ <arg value="-I${native}/common/opengles"/>
+ <arg value="-I${native}/linux"/>
+ <arg value="-I${native}/linux/opengles"/>
+ <mapper type="glob" from="*.c" to="*.o"/>
+ <fileset dir="${native}/common" includes="*.c"/>
+ <fileset dir="${native}/common/opengles" includes="*.c"/>
+ <fileset dir="${native}/generated/opengles" includes="*.c"/>
+ <fileset dir="${native}/linux" includes="*.c"/>
+ <fileset dir="${native}/linux/opengles" includes="*.c"/>
+ </apply>
+ <apply dir="." parallel="true" executable="gcc" failonerror="true">
+ <srcfile/>
+ <arg line="${linker_flags64}"/>
+ <fileset dir="x64" includes="*.o"/>
+ </apply>
+ <apply dir="." parallel="true" executable="strip" failonerror="true">
+ <fileset file="${libname64}"/>
+ </apply>
+ </target>
+</project>
Modified: branches/opengles/LWJGL/platform_build/windows_ant/build.xml
===================================================================
--- branches/opengles/LWJGL/platform_build/windows_ant/build.xml 2011-05-14 15:14:23 UTC (rev 3533)
+++ branches/opengles/LWJGL/platform_build/windows_ant/build.xml 2011-05-17 16:53:57 UTC (rev 3534)
@@ -12,11 +12,15 @@
<arg value="/I${java.home}\..\include"/>
<arg value="/I${java.home}\..\include\win32"/>
<arg value="/I${native}\common"/>
+ <arg value="/I${native}\common\opengl"/>
<arg value="/I${native}\windows"/>
+ <arg value="/I${native}\windows\opengl"/>
<srcfile/>
+ <fileset dir="${native}/common" includes="*.c"/>
+ <fileset dir="${native}/common/opengl" includes="*.c"/>
+ <fileset dir="${native}/generated/opengl" includes="*.c"/>
<fileset dir="${native}/windows" includes="*.c"/>
- <fileset dir="${native}/common" includes="*.c"/>
- <fileset dir="${native}/generated" includes="*.c"/>
+ <fileset dir="${native}/windows/opengl" includes="*.c"/>
<mapper type="glob" from="*.c" to="*.obj"/>
</apply>
</target>
@@ -43,7 +47,7 @@
<fileset dir="." includes="*.lib"/>
</delete>
</target>
-
+
<target name="compile">
<condition property="sdkhomelib" value="${sdkhome}\lib" else="${sdkhome}\lib\x64">
<equals arg1="${os.arch}" arg2="x86"/>
Added: branches/opengles/LWJGL/platform_build/windows_ant/build_es.xml
===================================================================
--- branches/opengles/LWJGL/platform_build/windows_ant/build_es.xml (rev 0)
+++ branches/opengles/LWJGL/platform_build/windows_ant/build_es.xml 2011-05-17 16:53:57 UTC (rev 3534)
@@ -0,0 +1,65 @@
+<?xml version="1.0"?>
+
+<project name="lwjgl native code, native code" basedir="../../bin/lwjgles" default="compile">
+ <property name="native" location="../../src/native"/>
+ <property environment="env"/>
+ <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"/>
+ <arg value="/I${sdkhome}\include"/>
+ <arg value="/I${java.home}\..\include"/>
+ <arg value="/I${java.home}\..\include\win32"/>
+ <arg value="/I${native}\common"/>
+ <arg value="/I${native}\common\opengles"/>
+ <arg value="/I${native}\windows"/>
+ <arg value="/I${native}\windows\opengles"/>
+ <srcfile/>
+ <fileset dir="${native}/common" includes="*.c"/>
+ <fileset dir="${native}/common/opengles" includes="*.c"/>
+ <fileset dir="${native}/generated/opengles" includes="*.c"/>
+ <fileset dir="${native}/windows" includes="*.c"/>
+ <fileset dir="${native}/windows/opengles" includes="*.c"/>
+ <mapper type="glob" from="*.c" to="*.obj"/>
+ </apply>
+ </target>
+
+ <target name="link">
+ <apply dir="." parallel="true" executable="cl" failonerror="true">
+ <arg line="/LD /nologo"/>
+ <srcfile/>
+ <arg line="/Fe${dllname} /link"/>
+ <arg value="/LIBPATH:${java.home}\..\lib"/>
+ <arg value="/LIBPATH:${sdkhomelib}"/>
+ <arg value="/LIBPATH:..\..\libs\windows"/>
+ <arg value="/OPT:REF"/>
+ <arg value="/OPT:ICF"/>
+ <arg line="/DLL /DELAYLOAD:jawt.dll ${libs}"/>
+ <fileset dir="." includes="*.obj"/>
+ </apply>
+ </target>
+
+ <target name="clean">
+ <delete>
+ <fileset dir="." includes="*.obj"/>
+ <fileset dir="." includes="*.dll"/>
+ <fileset dir="." includes="*.exp"/>
+ <fileset dir="." includes="*.lib"/>
+ </delete>
+ </target>
+
+ <target name="compile">
+ <condition property="sdkhomelib" value="${sdkhome}\lib" else="${sdkhome}\lib\x64">
+ <equals arg1="${os.arch}" arg2="x86"/>
+ </condition>
+ <condition property="dllname" value="lwjgl.dll" else="lwjgl64.dll">
+ <equals arg1="${os.arch}" arg2="x86"/>
+ </condition>
+ <echo message="${sdkhomelib}"/>
+ <property name="libs" value="Kernel32.lib ole32.lib libEGL.lib Version.lib user32.lib Gdi32.lib Advapi32.lib jawt.lib delayimp.lib winmm.lib Comctl32.lib"/>
+ <antcall target="compile_dir"/>
+ <antcall target="link"/>
+ </target>
+</project>
+
Modified: branches/opengles/LWJGL/src/java/org/lwjgl/opengl/AWTGLCanvas.java
===================================================================
--- branches/opengles/LWJGL/src/java/org/lwjgl/opengl/AWTGLCanvas.java 2011-05-14 15:14:23 UTC (rev 3533)
+++ branches/opengles/LWJGL/src/java/org/lwjgl/opengl/AWTGLCanvas.java 2011-05-17 16:53:57 UTC (rev 3534)
@@ -42,6 +42,8 @@
import java.awt.event.HierarchyEvent;
import java.awt.event.HierarchyListener;
+import static org.lwjgl.opengl.GL11.*;
+
/**
* <p/>
* An AWT rendering context.
@@ -56,7 +58,7 @@
private static final long serialVersionUID = 1L;
private static final AWTCanvasImplementation implementation;
- private boolean update_context;
+ private boolean update_context;
private Object SYNC_LOCK = new Object();
/** The requested pixel format */
@@ -69,8 +71,8 @@
private final ContextAttribs attribs;
/** Context handle */
- private PeerInfo peer_info;
- private Context context;
+ private PeerInfo peer_info;
+ private ContextGL context;
/**
* re-entry counter for support for re-entrant
@@ -105,20 +107,39 @@
}
}
+ public void setPixelFormat(final PixelFormatLWJGL pf) throws LWJGLException {
+ throw new UnsupportedOperationException();
+ }
+
+ public PixelFormatLWJGL getPixelFormat() {
+ return pixel_format;
+ }
+
/** This method should only be called internally. */
- public Context getContext() {
+ public ContextGL getContext() {
return context;
}
/** This method should only be called internally. */
- public Context createSharedContext() throws LWJGLException {
+ public ContextGL createSharedContext() throws LWJGLException {
synchronized ( SYNC_LOCK ) {
if ( context == null ) throw new IllegalStateException("Canvas not yet displayable");
- return new Context(peer_info, context.getContextAttribs(), context);
+ return new ContextGL(peer_info, context.getContextAttribs(), context);
}
}
+ public void checkGLError() {
+ Util.checkGLError();
+ }
+
+ public void initContext(final float r, final float g, final float b) {
+ // set background clear color
+ glClearColor(r, g, b, 0.0f);
+ // Clear window to avoid the desktop "showing through"
+ glClear(GL_COLOR_BUFFER_BIT);
+ }
+
/** Constructor using the default PixelFormat. */
public AWTGLCanvas() throws LWJGLException {
this(new PixelFormat());
@@ -195,7 +216,7 @@
synchronized ( SYNC_LOCK ) {
if ( context == null )
throw new IllegalStateException("Canvas not yet displayable");
- Context.setSwapInterval(swap_interval);
+ ContextGL.setSwapInterval(swap_interval);
}
}
@@ -209,7 +230,7 @@
synchronized ( SYNC_LOCK ) {
if ( context == null )
throw new IllegalStateException("Canvas not yet displayable");
- Context.swapBuffers();
+ ContextGL.swapBuffers();
}
}
@@ -238,7 +259,7 @@
if ( context == null )
throw new IllegalStateException("Canvas not yet displayable");
if ( context.isCurrent() )
- Context.releaseCurrentContext();
+ context.releaseCurrent();
}
}
@@ -295,7 +316,7 @@
peer_info.lockAndGetHandle();
try {
if ( context == null ) {
- this.context = new Context(peer_info, attribs, drawable != null ? ((DrawableLWJGL)drawable).getContext() : null);
+ this.context = new ContextGL(peer_info, attribs, drawable != null ? (ContextGL)((DrawableLWJGL)drawable).getContext() : null);
first_run = true;
}
@@ -315,7 +336,7 @@
} finally {
reentry_count--;
if ( reentry_count == 0 )
- Context.releaseCurrentContext();
+ context.releaseCurrent();
}
...
[truncated message content] |
|
From: <sp...@us...> - 2011-05-14 15:14:29
|
Revision: 3533
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3533&view=rev
Author: spasi
Date: 2011-05-14 15:14:23 +0000 (Sat, 14 May 2011)
Log Message:
-----------
Development branch for OpenGL ES support
Added Paths:
-----------
branches/opengles/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2011-05-13 19:16:40
|
Revision: 3532
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3532&view=rev
Author: kappa1
Date: 2011-05-13 19:16:34 +0000 (Fri, 13 May 2011)
Log Message:
-----------
AppletLoader: small fix to also include "ppc64" on macs.
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java
Modified: trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java 2011-05-13 16:24:10 UTC (rev 3531)
+++ trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java 2011-05-13 19:16:34 UTC (rev 3532)
@@ -140,14 +140,15 @@
* <li>Arielsan</li>
* <li>Bobjob</li>
* <li>Dashiva</li>
+ * <li>Dr_evil</li>
* <li>Kevin Glass</li>
* <li>Matthias Mann</li>
* <li>Mickelukas</li>
* <li>NateS</li>
+ * <li>pjohnsen</li>
* <li>Riven</li>
* <li>Ruben01</li>
* <li>Shannon Smith</li>
- * <li>pjohnsen</li>
* </ul>
*
*/
@@ -717,7 +718,7 @@
// check if arch specific natives have been specified
if (System.getProperty("os.arch").endsWith("64")) {
nativeJarList = getParameter("al_mac64");
- } else if (System.getProperty("os.arch").endsWith("ppc")) {
+ } else if (System.getProperty("os.arch").contains("ppc")) {
nativeJarList = getParameter("al_macppc");
} else {
nativeJarList = getParameter("al_mac32");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2011-05-13 16:24:17
|
Revision: 3531
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3531&view=rev
Author: kappa1
Date: 2011-05-13 16:24:10 +0000 (Fri, 13 May 2011)
Log Message:
-----------
AppletLoader: add support for optional mac arch specific natives, al_mac32, al_mac64, al_macppc, if they are not specified AppletLoader will fall back to the usual al_mac parameter.
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java
Modified: trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java 2011-05-11 14:21:59 UTC (rev 3530)
+++ trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java 2011-05-13 16:24:10 UTC (rev 3531)
@@ -713,7 +713,20 @@
}
} else if (osName.startsWith("Mac") || osName.startsWith("Darwin")) {
- nativeJarList = getParameter("al_mac");
+
+ // check if arch specific natives have been specified
+ if (System.getProperty("os.arch").endsWith("64")) {
+ nativeJarList = getParameter("al_mac64");
+ } else if (System.getProperty("os.arch").endsWith("ppc")) {
+ nativeJarList = getParameter("al_macppc");
+ } else {
+ nativeJarList = getParameter("al_mac32");
+ }
+
+ if (nativeJarList == null) {
+ nativeJarList = getParameter("al_mac");
+ }
+
} else if (osName.startsWith("Solaris") || osName.startsWith("SunOS")) {
nativeJarList = getParameter("al_solaris");
} else if (osName.startsWith("FreeBSD")) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sp...@us...> - 2011-05-11 14:22:05
|
Revision: 3530
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3530&view=rev
Author: spasi
Date: 2011-05-11 14:21:59 +0000 (Wed, 11 May 2011)
Log Message:
-----------
Added missing include.
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/PointerBuffer.java
trunk/LWJGL/src/native/common/org_lwjgl_BufferUtils.c
Modified: trunk/LWJGL/src/java/org/lwjgl/PointerBuffer.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/PointerBuffer.java 2011-05-11 09:50:50 UTC (rev 3529)
+++ trunk/LWJGL/src/java/org/lwjgl/PointerBuffer.java 2011-05-11 14:21:59 UTC (rev 3530)
@@ -80,13 +80,9 @@
* @param source the source buffer
*/
public PointerBuffer(final ByteBuffer source) {
- if ( !source.isDirect() )
- throw new IllegalArgumentException("ByteBuffer is not direct");
+ if ( LWJGLUtil.CHECKS )
+ checkSource(source);
- final int alignment = is64Bit ? 8 : 4;
- if ( (BufferUtils.getBufferAddress(source) + source.position()) % alignment != 0 || source.remaining() % alignment != 0 )
- throw new IllegalArgumentException("The source buffer is not aligned to " + alignment + " bytes.");
-
pointers = source.slice().order(source.order());
if ( is64Bit ) {
@@ -98,6 +94,15 @@
}
}
+ private static void checkSource(final ByteBuffer source) {
+ if ( !source.isDirect() )
+ throw new IllegalArgumentException("The source buffer is not direct.");
+
+ final int alignment = is64Bit ? 8 : 4;
+ if ( (BufferUtils.getBufferAddress(source) + source.position()) % alignment != 0 || source.remaining() % alignment != 0 )
+ throw new IllegalArgumentException("The source buffer is not aligned to " + alignment + " bytes.");
+ }
+
/**
* Returns the ByteBuffer that backs this PointerBuffer.
*
Modified: trunk/LWJGL/src/native/common/org_lwjgl_BufferUtils.c
===================================================================
--- trunk/LWJGL/src/native/common/org_lwjgl_BufferUtils.c 2011-05-11 09:50:50 UTC (rev 3529)
+++ trunk/LWJGL/src/native/common/org_lwjgl_BufferUtils.c 2011-05-11 14:21:59 UTC (rev 3530)
@@ -1,4 +1,5 @@
#include "org_lwjgl_BufferUtils.h"
+#include "common_tools.h"
JNIEXPORT void JNICALL Java_org_lwjgl_BufferUtils_zeroBuffer0(JNIEnv *env, jclass clazz, jobject buffer, jlong offset, jlong size) {
memset((char*)(*env)->GetDirectBufferAddress(env, buffer) + (size_t)offset, 0, (size_t)size);
@@ -6,4 +7,4 @@
JNIEXPORT jlong JNICALL Java_org_lwjgl_BufferUtils_getBufferAddress(JNIEnv *env, jclass clazz, jobject buffer) {
return (intptr_t)(*env)->GetDirectBufferAddress(env, buffer);
-}
\ 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...> - 2011-05-11 09:50:57
|
Revision: 3529
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3529&view=rev
Author: spasi
Date: 2011-05-11 09:50:50 +0000 (Wed, 11 May 2011)
Log Message:
-----------
Pointer cast fix.
Modified Paths:
--------------
trunk/LWJGL/src/native/common/org_lwjgl_BufferUtils.c
Modified: trunk/LWJGL/src/native/common/org_lwjgl_BufferUtils.c
===================================================================
--- trunk/LWJGL/src/native/common/org_lwjgl_BufferUtils.c 2011-05-11 00:12:52 UTC (rev 3528)
+++ trunk/LWJGL/src/native/common/org_lwjgl_BufferUtils.c 2011-05-11 09:50:50 UTC (rev 3529)
@@ -5,5 +5,5 @@
}
JNIEXPORT jlong JNICALL Java_org_lwjgl_BufferUtils_getBufferAddress(JNIEnv *env, jclass clazz, jobject buffer) {
- return (uintptr_t)(*env)->GetDirectBufferAddress(env, buffer);
+ return (intptr_t)(*env)->GetDirectBufferAddress(env, buffer);
}
\ 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...> - 2011-05-11 00:12:59
|
Revision: 3528
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3528&view=rev
Author: spasi
Date: 2011-05-11 00:12:52 +0000 (Wed, 11 May 2011)
Log Message:
-----------
Added alignment checks to PointerBuffer constructor.
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/BufferUtils.java
trunk/LWJGL/src/java/org/lwjgl/PointerBuffer.java
trunk/LWJGL/src/native/common/org_lwjgl_BufferUtils.c
Modified: trunk/LWJGL/src/java/org/lwjgl/BufferUtils.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/BufferUtils.java 2011-05-10 20:22:08 UTC (rev 3527)
+++ trunk/LWJGL/src/java/org/lwjgl/BufferUtils.java 2011-05-11 00:12:52 UTC (rev 3528)
@@ -192,4 +192,14 @@
/** Fill buffer with zeros from position to remaining */
private static native void zeroBuffer0(Buffer b, long off, long size);
+
+ /**
+ * Returns the memory address of the specified buffer.
+ *
+ * @param buffer the buffer
+ *
+ * @return the memory address
+ */
+ static native long getBufferAddress(Buffer buffer);
+
}
Modified: trunk/LWJGL/src/java/org/lwjgl/PointerBuffer.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/PointerBuffer.java 2011-05-10 20:22:08 UTC (rev 3527)
+++ trunk/LWJGL/src/java/org/lwjgl/PointerBuffer.java 2011-05-11 00:12:52 UTC (rev 3528)
@@ -59,8 +59,8 @@
protected final ByteBuffer pointers;
- protected final Buffer view;
- protected final IntBuffer view32;
+ protected final Buffer view;
+ protected final IntBuffer view32;
protected final LongBuffer view64;
/**
@@ -83,6 +83,10 @@
if ( !source.isDirect() )
throw new IllegalArgumentException("ByteBuffer is not direct");
+ final int alignment = is64Bit ? 8 : 4;
+ if ( (BufferUtils.getBufferAddress(source) + source.position()) % alignment != 0 || source.remaining() % alignment != 0 )
+ throw new IllegalArgumentException("The source buffer is not aligned to " + alignment + " bytes.");
+
pointers = source.slice().order(source.order());
if ( is64Bit ) {
Modified: trunk/LWJGL/src/native/common/org_lwjgl_BufferUtils.c
===================================================================
--- trunk/LWJGL/src/native/common/org_lwjgl_BufferUtils.c 2011-05-10 20:22:08 UTC (rev 3527)
+++ trunk/LWJGL/src/native/common/org_lwjgl_BufferUtils.c 2011-05-11 00:12:52 UTC (rev 3528)
@@ -2,4 +2,8 @@
JNIEXPORT void JNICALL Java_org_lwjgl_BufferUtils_zeroBuffer0(JNIEnv *env, jclass clazz, jobject buffer, jlong offset, jlong size) {
memset((char*)(*env)->GetDirectBufferAddress(env, buffer) + (size_t)offset, 0, (size_t)size);
+}
+
+JNIEXPORT jlong JNICALL Java_org_lwjgl_BufferUtils_getBufferAddress(JNIEnv *env, jclass clazz, jobject buffer) {
+ return (uintptr_t)(*env)->GetDirectBufferAddress(env, buffer);
}
\ 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...> - 2011-05-10 20:22:14
|
Revision: 3527
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3527&view=rev
Author: spasi
Date: 2011-05-10 20:22:08 +0000 (Tue, 10 May 2011)
Log Message:
-----------
Added support for AMD_sample_positions.
Added Paths:
-----------
trunk/LWJGL/src/templates/org/lwjgl/opengl/AMD_sample_positions.java
Added: trunk/LWJGL/src/templates/org/lwjgl/opengl/AMD_sample_positions.java
===================================================================
--- trunk/LWJGL/src/templates/org/lwjgl/opengl/AMD_sample_positions.java (rev 0)
+++ trunk/LWJGL/src/templates/org/lwjgl/opengl/AMD_sample_positions.java 2011-05-10 20:22:08 UTC (rev 3527)
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2002-2011 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;
+
+import org.lwjgl.util.generator.Check;
+import org.lwjgl.util.generator.Const;
+import org.lwjgl.util.generator.StripPostfix;
+import org.lwjgl.util.generator.opengl.GLenum;
+import org.lwjgl.util.generator.opengl.GLuint;
+
+import java.nio.FloatBuffer;
+
+public interface AMD_sample_positions {
+
+ /** Accepted by the <pname> parameter of GetFloatv: */
+ int GL_SUBSAMPLE_DISTANCE_AMD = 0x883F;
+
+ @StripPostfix("val")
+ void glSetMultisamplefvAMD(@GLenum int pname, @GLuint int index, @Check("2") @Const FloatBuffer val);
+
+}
\ 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...> - 2011-05-07 16:29:21
|
Revision: 3526
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3526&view=rev
Author: kappa1
Date: 2011-05-07 16:29:13 +0000 (Sat, 07 May 2011)
Log Message:
-----------
AppletLoader: remove the last dependency on the sun.* package.
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java
Modified: trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java 2011-05-04 23:11:11 UTC (rev 3525)
+++ trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java 2011-05-07 16:29:13 UTC (rev 3526)
@@ -84,8 +84,6 @@
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
-import sun.security.util.SecurityConstants;
-
/**
* <p>
* The AppletLoader enables deployment of LWJGL to applets in an easy
@@ -1046,12 +1044,12 @@
if (host != null && (host.length() > 0)) {
// add permission for downloaded jars to access host they were from
- perms.add(new SocketPermission(host, SecurityConstants.SOCKET_CONNECT_ACCEPT_ACTION));
+ perms.add(new SocketPermission(host, "connect,accept"));
}
else if ( "file".equals(codesource.getLocation().getProtocol()) ) {
// if running locally add file permission
String path = codesource.getLocation().getFile().replace('/', File.separatorChar);
- perms.add(new FilePermission(path, SecurityConstants.FILE_READ_ACTION));
+ perms.add(new FilePermission(path, "read"));
}
} catch (Exception e) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2011-05-04 23:11:17
|
Revision: 3525
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3525&view=rev
Author: kappa1
Date: 2011-05-04 23:11:11 +0000 (Wed, 04 May 2011)
Log Message:
-----------
AppletLoader: fix String replace bug on file names, full credits to Riven for spotting it and assisting with the fix.
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java
Modified: trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java 2011-05-04 19:24:57 UTC (rev 3524)
+++ trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java 2011-05-04 23:11:11 UTC (rev 3525)
@@ -665,11 +665,11 @@
*/
protected String trimExtensionByCapabilities(String file) {
if (!pack200Supported) {
- file = file.replaceAll(".pack", "");
+ file = replaceLast(file, ".pack", "");
}
if (!lzmaSupported) {
- file = file.replaceAll(".lzma", "");
+ file = replaceLast(file, ".lzma", "");
}
return file;
}
@@ -1027,7 +1027,7 @@
for (int i = 0; i < urlList.length; i++) {
String file = new File(path, getJarName(urlList[i])).toURI().toString();
// fix JVM bug where ! is not escaped
- file = file.replaceAll("!", "%21");
+ file = file.replace("!", "%21");
urls[i] = new URL(file);
}
@@ -1486,37 +1486,37 @@
String filename = getFileName(urlList[i]);
if (filename.endsWith(".pack.lzma")) {
- subtaskMessage = "Extracting: " + filename + " to " + filename.replaceAll(".lzma", "");
+ subtaskMessage = "Extracting: " + filename + " to " + replaceLast(filename, ".lzma", "");
debug_sleep(1000);
- extractLZMA(path + filename, path + filename.replaceAll(".lzma", ""));
+ extractLZMA(path + filename, path + replaceLast(filename, ".lzma", ""));
- subtaskMessage = "Extracting: " + filename.replaceAll(".lzma", "") + " to " + filename.replaceAll(".pack.lzma", "");
+ subtaskMessage = "Extracting: " + replaceLast(filename, ".lzma", "") + " to " + replaceLast(filename, ".pack.lzma", "");
debug_sleep(1000);
- extractPack(path + filename.replaceAll(".lzma", ""), path + filename.replaceAll(".pack.lzma", ""));
+ extractPack(path + replaceLast(filename, ".lzma", ""), path + replaceLast(filename, ".pack.lzma", ""));
}
else if (filename.endsWith(".pack.gz")) {
- subtaskMessage = "Extracting: " + filename + " to " + filename.replaceAll(".gz", "");
+ subtaskMessage = "Extracting: " + filename + " to " + replaceLast(filename, ".gz", "");
debug_sleep(1000);
- extractGZip(path + filename, path + filename.replaceAll(".gz", ""));
+ extractGZip(path + filename, path + replaceLast(filename, ".gz", ""));
- subtaskMessage = "Extracting: " + filename.replaceAll(".gz", "") + " to " + filename.replaceAll(".pack.gz", "");
+ subtaskMessage = "Extracting: " + replaceLast(filename, ".gz", "") + " to " + replaceLast(filename, ".pack.gz", "");
debug_sleep(1000);
- extractPack(path + filename.replaceAll(".gz", ""), path + filename.replaceAll(".pack.gz", ""));
+ extractPack(path + replaceLast(filename, ".gz", ""), path + replaceLast(filename, ".pack.gz", ""));
}
else if (filename.endsWith(".pack")) {
- subtaskMessage = "Extracting: " + filename + " to " + filename.replace(".pack", "");
+ subtaskMessage = "Extracting: " + filename + " to " + replaceLast(filename, ".pack", "");
debug_sleep(1000);
- extractPack(path + filename, path + filename.replace(".pack", ""));
+ extractPack(path + filename, path + replaceLast(filename, ".pack", ""));
}
else if (filename.endsWith(".lzma")) {
- subtaskMessage = "Extracting: " + filename + " to " + filename.replace(".lzma", "");
+ subtaskMessage = "Extracting: " + filename + " to " + replaceLast(filename, ".lzma", "");
debug_sleep(1000);
- extractLZMA(path + filename, path + filename.replace(".lzma", ""));
+ extractLZMA(path + filename, path + replaceLast(filename, ".lzma", ""));
}
else if (filename.endsWith(".gz")) {
- subtaskMessage = "Extracting: " + filename + " to " + filename.replace(".gz", "");
+ subtaskMessage = "Extracting: " + filename + " to " + replaceLast(filename, ".gz", "");
debug_sleep(1000);
- extractGZip(path + filename, path + filename.replace(".gz", ""));
+ extractGZip(path + filename, path + replaceLast(filename, ".gz", ""));
}
}
}
@@ -1814,15 +1814,15 @@
String fileName = url.getFile();
if (fileName.endsWith(".pack.lzma")) {
- fileName = fileName.replaceAll(".pack.lzma", "");
+ fileName = replaceLast(fileName, ".pack.lzma", "");
} else if (fileName.endsWith(".pack.gz")) {
- fileName = fileName.replaceAll(".pack.gz", "");
+ fileName = replaceLast(fileName, ".pack.gz", "");
} else if (fileName.endsWith(".pack")) {
- fileName = fileName.replaceAll(".pack", "");
+ fileName = replaceLast(fileName, ".pack", "");
} else if (fileName.endsWith(".lzma")) {
- fileName = fileName.replaceAll(".lzma", "");
+ fileName = replaceLast(fileName, ".lzma", "");
} else if (fileName.endsWith(".gz")) {
- fileName = fileName.replaceAll(".gz", "");
+ fileName = replaceLast(fileName, ".gz", "");
}
return fileName.substring(fileName.lastIndexOf('/') + 1);
@@ -1882,6 +1882,25 @@
}
/**
+ * Replaces the last occurrence of the specified target substring with
+ * the specified replacement string in a string.
+ *
+ * @param original - String to search
+ * @param target - substring to find
+ * @param replacement - what to replace target substring with
+ * @return - return the modified string, if target substring not found return original string
+ */
+ public String replaceLast(String original, String target, String replacement) {
+ int index = original.lastIndexOf(target);
+
+ if(index == -1) {
+ return original;
+ }
+
+ return original.substring(0, index) + replacement + original.substring(index + target.length());
+ }
+
+ /**
* Retrieves the String value for the parameter
* @param name Name of parameter
* @param defaultValue default value to return if no such parameter
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2011-05-04 19:25:03
|
Revision: 3524
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3524&view=rev
Author: matzon
Date: 2011-05-04 19:24:57 +0000 (Wed, 04 May 2011)
Log Message:
-----------
excessively verbose exception description added to lower support requests :)
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/BufferChecks.java
Modified: trunk/LWJGL/src/java/org/lwjgl/BufferChecks.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/BufferChecks.java 2011-05-01 00:09:43 UTC (rev 3523)
+++ trunk/LWJGL/src/java/org/lwjgl/BufferChecks.java 2011-05-04 19:24:57 UTC (rev 3524)
@@ -159,7 +159,7 @@
* This is a separate call to help inline checkBufferSize.
*/
private static void throwBufferSizeException(Buffer buf, int size) {
- throw new IllegalArgumentException("Number of remaining buffer elements is " + buf.remaining() + ", must be at least " + size);
+ throw new IllegalArgumentException("Number of remaining buffer elements is " + buf.remaining() + ", must be at least " + size + ". Because at most " + size + " elements can be returned, a buffer with at least " + size + " elements is required, regardless of actual returned element count");
}
private static void throwBufferSizeException(PointerBuffer buf, int size) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2011-05-01 00:09:49
|
Revision: 3523
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3523&view=rev
Author: kappa1
Date: 2011-05-01 00:09:43 +0000 (Sun, 01 May 2011)
Log Message:
-----------
AppletLoader: remove unneeded debug code
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java
Modified: trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java 2011-05-01 00:03:26 UTC (rev 3522)
+++ trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java 2011-05-01 00:09:43 UTC (rev 3523)
@@ -1730,7 +1730,6 @@
}
if (crc.getValue() != zipEntry.getCrc()) {
- System.out.println("CRC " + crc.getValue() + " " + zipEntry.getCrc());
return false; // CRC match failed, corrupt zip
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2011-05-01 00:03:32
|
Revision: 3522
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3522&view=rev
Author: kappa1
Date: 2011-05-01 00:03:26 +0000 (Sun, 01 May 2011)
Log Message:
-----------
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java
Modified: trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java 2011-04-30 23:56:24 UTC (rev 3521)
+++ trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java 2011-05-01 00:03:26 UTC (rev 3522)
@@ -1667,7 +1667,7 @@
/**
* Check and validate jars which will be loaded into the classloader to make
* sure that they are not corrupt. This ensures corrupt files are never marked
- * as successfully downloadeds by the cache system.
+ * as successful downloadeds by the cache system.
*
* @param path - where the jars are stored
* @throws Exception if a corrupt jar is found
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|