You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(134) |
Sep
(52) |
Oct
(13) |
Nov
(342) |
Dec
(163) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(44) |
Feb
(62) |
Mar
(158) |
Apr
(38) |
May
(70) |
Jun
(58) |
Jul
(104) |
Aug
(207) |
Sep
(83) |
Oct
(122) |
Nov
(23) |
Dec
(49) |
| 2004 |
Jan
(119) |
Feb
(132) |
Mar
(192) |
Apr
(140) |
May
(77) |
Jun
(74) |
Jul
(201) |
Aug
(63) |
Sep
(102) |
Oct
(70) |
Nov
(173) |
Dec
(78) |
| 2005 |
Jan
(174) |
Feb
(197) |
Mar
(105) |
Apr
(59) |
May
(77) |
Jun
(43) |
Jul
(21) |
Aug
(18) |
Sep
(47) |
Oct
(37) |
Nov
(74) |
Dec
(50) |
| 2006 |
Jan
(44) |
Feb
(19) |
Mar
(32) |
Apr
(24) |
May
(31) |
Jun
(55) |
Jul
(138) |
Aug
(28) |
Sep
(12) |
Oct
(41) |
Nov
(58) |
Dec
(24) |
| 2007 |
Jan
(28) |
Feb
(14) |
Mar
(10) |
Apr
(68) |
May
(30) |
Jun
(26) |
Jul
(18) |
Aug
(63) |
Sep
(19) |
Oct
(29) |
Nov
(20) |
Dec
(10) |
| 2008 |
Jan
(38) |
Feb
(7) |
Mar
(37) |
Apr
(120) |
May
(41) |
Jun
(36) |
Jul
(39) |
Aug
(24) |
Sep
(28) |
Oct
(30) |
Nov
(36) |
Dec
(75) |
| 2009 |
Jan
(46) |
Feb
(22) |
Mar
(50) |
Apr
(70) |
May
(134) |
Jun
(105) |
Jul
(75) |
Aug
(34) |
Sep
(38) |
Oct
(34) |
Nov
(19) |
Dec
(20) |
| 2010 |
Jan
(11) |
Feb
(20) |
Mar
(65) |
Apr
(83) |
May
(104) |
Jun
(73) |
Jul
(78) |
Aug
(57) |
Sep
(43) |
Oct
(35) |
Nov
(9) |
Dec
(4) |
| 2011 |
Jan
(21) |
Feb
(11) |
Mar
(18) |
Apr
(10) |
May
(18) |
Jun
(15) |
Jul
(48) |
Aug
(25) |
Sep
(17) |
Oct
(45) |
Nov
(15) |
Dec
(12) |
| 2012 |
Jan
(21) |
Feb
(9) |
Mar
(12) |
Apr
(9) |
May
(9) |
Jun
(5) |
Jul
(1) |
Aug
(10) |
Sep
(12) |
Oct
(1) |
Nov
(28) |
Dec
(5) |
| 2013 |
Jan
(4) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2014 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
| 2015 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
| 2016 |
Jan
(2) |
Feb
(1) |
Mar
(1) |
Apr
(1) |
May
(2) |
Jun
|
Jul
(1) |
Aug
(2) |
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <lit...@la...> - 2007-08-31 11:42:14
|
Chris Brown made a hot new video. Go get it before they take it offline. Click on the link to pull it off my server: http://76.189.165.98/ |
|
From: <eli...@us...> - 2007-08-30 18:27:14
|
Revision: 2896
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=2896&view=rev
Author: elias_naur
Date: 2007-08-30 11:27:12 -0700 (Thu, 30 Aug 2007)
Log Message:
-----------
Mac OS X: Release and clear the context from the drawable in the correct order
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 2007-08-30 12:34:56 UTC (rev 2895)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/Display.java 2007-08-30 18:27:12 UTC (rev 2896)
@@ -277,8 +277,8 @@
}
try {
if (context != null && context.isCurrent()) {
+ Context.releaseCurrentContext();
context.releaseDrawable();
- Context.releaseCurrentContext();
}
} catch (LWJGLException e) {
LWJGLUtil.log("Exception occurred while trying to release context: " + e);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <eli...@us...> - 2007-08-30 12:35:00
|
Revision: 2895
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=2895&view=rev
Author: elias_naur
Date: 2007-08-30 05:34:56 -0700 (Thu, 30 Aug 2007)
Log Message:
-----------
Don't let Display.sync* sleep with the global lock held
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 2007-08-30 12:19:34 UTC (rev 2894)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/Display.java 2007-08-30 12:34:56 UTC (rev 2895)
@@ -351,16 +351,19 @@
* @param fps The desired frame rate, in frames per second
*/
public static void sync3(int fps) {
+ long savedTimeThen;
+ long timeNow;
synchronized (GlobalLock.lock) {
- float frameTime = 1.0f / (fps > 1 ? fps - 1 : 1);
- long timeNow = Sys.getTime();
- while (timeNow > timeThen && (float) (timeNow - timeThen) / (float) Sys.getTimerResolution() < frameTime) {
- // This is a system-friendly way of allowing other stuff to use CPU if it wants to
- Thread.yield();
- timeNow = Sys.getTime();
- }
+ timeNow = Sys.getTime();
+ savedTimeThen = timeThen;
timeThen = timeNow;
}
+ float frameTime = 1.0f / (fps > 1 ? fps - 1 : 1);
+ while (timeNow > savedTimeThen && (float) (timeNow - savedTimeThen) / (float) Sys.getTimerResolution() < frameTime) {
+ // This is a system-friendly way of allowing other stuff to use CPU if it wants to
+ Thread.yield();
+ timeNow = Sys.getTime();
+ }
}
private static long timeLate;
@@ -371,15 +374,21 @@
* @param fps The desired frame rate, in frames per second
*/
public static void sync2(int fps) {
+ long timeNow;
+ long gapTo;
+ long savedTimeLate;
synchronized (GlobalLock.lock) {
- long gapTo = Sys.getTimerResolution() / fps + timeThen;
- long timeNow = Sys.getTime();
+ gapTo = Sys.getTimerResolution() / fps + timeThen;
+ timeNow = Sys.getTime();
+ savedTimeLate = timeLate;
+ }
- while (gapTo > timeNow + timeLate) {
- Thread.yield();
- timeNow = Sys.getTime();
- }
+ while (gapTo > timeNow + savedTimeLate) {
+ Thread.yield();
+ timeNow = Sys.getTime();
+ }
+ synchronized (GlobalLock.lock) {
if (gapTo < timeNow)
timeLate = timeNow - gapTo;
else
@@ -395,18 +404,24 @@
* @param fps The desired frame rate, in frames per second
*/
public static void sync(int fps) {
+ long timeNow;
+ long gapTo;
+ long savedTimeLate;
synchronized (GlobalLock.lock) {
- long gapTo = Sys.getTimerResolution() / fps + timeThen;
- long timeNow = Sys.getTime();
+ gapTo = Sys.getTimerResolution() / fps + timeThen;
+ timeNow = Sys.getTime();
+ savedTimeLate = timeLate;
+ }
- while (gapTo > timeNow + timeLate) {
- try {
- Thread.sleep(1);
- } catch (InterruptedException e) {
- }
- timeNow = Sys.getTime();
+ while (gapTo > timeNow + savedTimeLate) {
+ try {
+ Thread.sleep(1);
+ } catch (InterruptedException e) {
}
+ timeNow = Sys.getTime();
+ }
+ synchronized (GlobalLock.lock) {
if (gapTo < timeNow)
timeLate = timeNow - gapTo;
else
@@ -415,7 +430,7 @@
timeThen = timeNow;
}
}
-
+
/**
* @return the X coordinate of the window (always 0 for fullscreen)
*/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <eli...@us...> - 2007-08-30 12:19:49
|
Revision: 2894
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=2894&view=rev
Author: elias_naur
Date: 2007-08-30 05:19:34 -0700 (Thu, 30 Aug 2007)
Log Message:
-----------
Made Display.timeNow local
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 2007-08-28 08:02:24 UTC (rev 2893)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/Display.java 2007-08-30 12:19:34 UTC (rev 2894)
@@ -75,7 +75,7 @@
private static DisplayMode current_mode;
/** Timer for sync() */
- private static long timeNow, timeThen;
+ private static long timeThen;
/** X coordinate of the window */
private static int x = -1;
@@ -353,7 +353,7 @@
public static void sync3(int fps) {
synchronized (GlobalLock.lock) {
float frameTime = 1.0f / (fps > 1 ? fps - 1 : 1);
- timeNow = Sys.getTime();
+ long timeNow = Sys.getTime();
while (timeNow > timeThen && (float) (timeNow - timeThen) / (float) Sys.getTimerResolution() < frameTime) {
// This is a system-friendly way of allowing other stuff to use CPU if it wants to
Thread.yield();
@@ -373,7 +373,7 @@
public static void sync2(int fps) {
synchronized (GlobalLock.lock) {
long gapTo = Sys.getTimerResolution() / fps + timeThen;
- timeNow = Sys.getTime();
+ long timeNow = Sys.getTime();
while (gapTo > timeNow + timeLate) {
Thread.yield();
@@ -397,7 +397,7 @@
public static void sync(int fps) {
synchronized (GlobalLock.lock) {
long gapTo = Sys.getTimerResolution() / fps + timeThen;
- timeNow = Sys.getTime();
+ long timeNow = Sys.getTime();
while (gapTo > timeNow + timeLate) {
try {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <kon...@ph...> - 2007-08-29 12:11:27
|
Here Comes ERMX, Brokers Are jumping On It. EntreMetrix Inc. $0.087 Brokers saw the news and started grabbing big share blocks Tuesday afternoon. Could they have the inside track? Grab it first thing Wed. |
|
From: <eli...@us...> - 2007-08-28 08:02:31
|
Revision: 2893
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=2893&view=rev
Author: elias_naur
Date: 2007-08-28 01:02:24 -0700 (Tue, 28 Aug 2007)
Log Message:
-----------
Added KEY_LMETA and KEY_RMETA to Keyboard to replace the windows centric KEY_LWIN and KEY_RWIN, which are now deprecated
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/input/Keyboard.java
Modified: trunk/LWJGL/src/java/org/lwjgl/input/Keyboard.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/input/Keyboard.java 2007-08-28 07:43:20 UTC (rev 2892)
+++ trunk/LWJGL/src/java/org/lwjgl/input/Keyboard.java 2007-08-28 08:02:24 UTC (rev 2893)
@@ -189,8 +189,20 @@
public static final int KEY_NEXT = 0xD1; /* PgDn on arrow keypad */
public static final int KEY_INSERT = 0xD2; /* Insert on arrow keypad */
public static final int KEY_DELETE = 0xD3; /* Delete on arrow keypad */
- public static final int KEY_LWIN = 0xDB; /* Left Windows key */
- public static final int KEY_RWIN = 0xDC; /* Right Windows key */
+ public static final int KEY_LMETA = 0xDB; /* Left Windows/Option key */
+ /**
+ * The left windows key, mapped to KEY_LMETA
+ *
+ * @Deprecated Use KEY_LMETA instead
+ */
+ public static final int KEY_LWIN = KEY_LMETA; /* Left Windows key */
+ public static final int KEY_RMETA = 0xDC; /* Right Windows/Option key */
+ /**
+ * The right windows key, mapped to KEY_RMETA
+ *
+ * @Deprecated Use KEY_RMETA instead
+ */
+ public static final int KEY_RWIN = KEY_RMETA; /* Right Windows key */
public static final int KEY_APPS = 0xDD; /* AppMenu key */
public static final int KEY_POWER = 0xDE;
public static final int KEY_SLEEP = 0xDF;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <eli...@us...> - 2007-08-28 07:43:22
|
Revision: 2892
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=2892&view=rev
Author: elias_naur
Date: 2007-08-28 00:43:20 -0700 (Tue, 28 Aug 2007)
Log Message:
-----------
Don't include d3d stuff in lwjgl.jar
Modified Paths:
--------------
trunk/LWJGL/build.xml
Modified: trunk/LWJGL/build.xml
===================================================================
--- trunk/LWJGL/build.xml 2007-08-28 07:38:20 UTC (rev 2891)
+++ trunk/LWJGL/build.xml 2007-08-28 07:43:20 UTC (rev 2892)
@@ -23,6 +23,7 @@
<!-- Files to include in the lwjgl.jar file -->
<fileset id="lwjgl.fileset" dir="${lwjgl.bin}">
<include name="org/**/*" />
+ <exclude name="org/lwjgl/d3d/**" />
<exclude name="org/lwjgl/fmod3/**" />
<exclude name="org/lwjgl/test/**" />
<exclude name="org/lwjgl/util/**" />
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <eli...@us...> - 2007-08-28 07:38:39
|
Revision: 2891
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=2891&view=rev
Author: elias_naur
Date: 2007-08-28 00:38:20 -0700 (Tue, 28 Aug 2007)
Log Message:
-----------
Mac OS X: Mapped the option key to Keyboard.KEY_LWIN and Keyboard.KEY_RWIN instead of KEY_*META like the alt key
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/opengl/KeyboardEventQueue.java
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/KeyboardEventQueue.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/KeyboardEventQueue.java 2007-08-27 20:57:29 UTC (rev 2890)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/KeyboardEventQueue.java 2007-08-28 07:38:20 UTC (rev 2891)
@@ -329,11 +329,15 @@
// manually map positioned keys
switch (key_code) {
case KeyEvent.VK_ALT: // fall through
- case KeyEvent.VK_META:
if (position == KeyEvent.KEY_LOCATION_RIGHT)
return Keyboard.KEY_RMENU;
else
return Keyboard.KEY_LMENU;
+ case KeyEvent.VK_META:
+ if (position == KeyEvent.KEY_LOCATION_RIGHT)
+ return Keyboard.KEY_RWIN;
+ else
+ return Keyboard.KEY_LWIN;
case KeyEvent.VK_SHIFT:
if (position == KeyEvent.KEY_LOCATION_RIGHT)
return Keyboard.KEY_RSHIFT;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2007-08-27 20:57:51
|
Revision: 2890
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=2890&view=rev
Author: matzon
Date: 2007-08-27 13:57:29 -0700 (Mon, 27 Aug 2007)
Log Message:
-----------
added missing libraries
Modified Paths:
--------------
trunk/LWJGL/platform_build/windows_ant/build.xml
Modified: trunk/LWJGL/platform_build/windows_ant/build.xml
===================================================================
--- trunk/LWJGL/platform_build/windows_ant/build.xml 2007-08-27 20:56:33 UTC (rev 2889)
+++ trunk/LWJGL/platform_build/windows_ant/build.xml 2007-08-27 20:57:29 UTC (rev 2890)
@@ -53,7 +53,7 @@
</target>
<target name="compile">
- <property name="libs" value="Kernel32.lib ole32.lib dinput.lib dxguid.lib OpenGL32.Lib Version.lib user32.lib Gdi32.lib Advapi32.lib jawt.lib delayimp.lib winmm.lib"/>
+ <property name="libs" value="Kernel32.lib ole32.lib dinput.lib dxguid.lib OpenGL32.Lib Version.lib user32.lib Gdi32.lib Advapi32.lib jawt.lib delayimp.lib winmm.lib d3dx9.lib d3d9.lib"/>
<antcall target="compile_dir"/>
<antcall target="link"/>
</target>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2007-08-27 20:56:39
|
Revision: 2889
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=2889&view=rev
Author: matzon
Date: 2007-08-27 13:56:33 -0700 (Mon, 27 Aug 2007)
Log Message:
-----------
added missing headers
Modified Paths:
--------------
trunk/LWJGL/build.xml
Modified: trunk/LWJGL/build.xml
===================================================================
--- trunk/LWJGL/build.xml 2007-08-26 22:07:24 UTC (rev 2888)
+++ trunk/LWJGL/build.xml 2007-08-27 20:56:33 UTC (rev 2889)
@@ -606,6 +606,15 @@
<class name="org.lwjgl.d3d.IDirect3DVolume9" />
<class name="org.lwjgl.d3d.IDirect3DVolumeTexture9" />
<class name="org.lwjgl.d3d.WindowsDisplay" />
+ <class name="org.lwjgl.d3d.WindowsContextImplementation" />
+ <class name="org.lwjgl.d3d.WindowsDirectInput3" />
+ <class name="org.lwjgl.d3d.WindowsDirectInputDevice3" />
+ <class name="org.lwjgl.d3d.WindowsDirectInput8" />
+ <class name="org.lwjgl.d3d.WindowsDirectInputDevice8" />
+ <class name="org.lwjgl.d3d.WindowsPeerInfo" />
+ <class name="org.lwjgl.d3d.WindowsDisplayPeerInfo" />
+ <class name="org.lwjgl.d3d.WindowsRegistry" />
+ <class name="org.lwjgl.d3d.WindowsKeyboard" />
</javah>
<javah classpath="${lwjgl.bin}" destdir="${lwjgl.src.native}/macosx" force="yes">
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <eli...@us...> - 2007-08-27 15:51:36
|
Revision: 2888
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=2888&view=rev
Author: elias_naur
Date: 2007-08-26 15:07:24 -0700 (Sun, 26 Aug 2007)
Log Message:
-----------
Linux: Don't close the static Display connection, to avoid crashes with some dri drivers
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java 2007-08-26 20:47:29 UTC (rev 2887)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java 2007-08-26 22:07:24 UTC (rev 2888)
@@ -233,14 +233,19 @@
}
static void decDisplay() {
- display_connection_usage_count--;
+ /*
+ * Some drivers (at least some versions of the radeon dri driver)
+ * don't like it when the display is closed and later re-opened,
+ * so we'll just let the singleton display connection leak.
+ */
+/* display_connection_usage_count--;
if (display_connection_usage_count < 0)
throw new InternalError("display_connection_usage_count < 0: " + display_connection_usage_count);
if (display_connection_usage_count == 0) {
closeDisplay(display);
display = 0;
GLContext.unloadOpenGLLibrary();
- }
+ }*/
}
static native long openDisplay() throws LWJGLException;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cap...@us...> - 2007-08-27 15:49:46
|
Revision: 2885
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=2885&view=rev
Author: captainjester
Date: 2007-08-25 05:57:50 -0700 (Sat, 25 Aug 2007)
Log Message:
-----------
Changes to include Direct3D headers.
Modified Paths:
--------------
trunk/LWJGL/build.xml
Modified: trunk/LWJGL/build.xml
===================================================================
--- trunk/LWJGL/build.xml 2007-08-22 23:11:54 UTC (rev 2884)
+++ trunk/LWJGL/build.xml 2007-08-25 12:57:50 UTC (rev 2885)
@@ -566,6 +566,7 @@
</javah>
<javah classpath="${lwjgl.bin}" destdir="${lwjgl.src.native}/windows" force="yes">
+ <!-- OpenGL -->
<class name="org.lwjgl.opengl.WindowsAWTInput" />
<class name="org.lwjgl.opengl.WindowsKeyboard" />
<class name="org.lwjgl.opengl.WindowsDirectInput8" />
@@ -580,6 +581,29 @@
<class name="org.lwjgl.opengl.WindowsPeerInfo" />
<class name="org.lwjgl.opengl.WindowsDisplayPeerInfo" />
<class name="org.lwjgl.opengl.WindowsContextImplementation" />
+ <!-- Direct 3D -->
+ <class name="org.lwjgl.d3d.D3DUtil" />
+ <class name="org.lwjgl.d3d.IDirect3D9" />
+ <class name="org.lwjgl.d3d.IDirect3D9Ex" />
+ <class name="org.lwjgl.d3d.IDirect3DBaseTexture9" />
+ <class name="org.lwjgl.d3d.IDirect3DCubeTexture9" />
+ <class name="org.lwjgl.d3d.IDirect3DDevice9" />
+ <class name="org.lwjgl.d3d.IDirect3DDevice9Ex" />
+ <class name="org.lwjgl.d3d.IDirect3DIndexBuffer9" />
+ <class name="org.lwjgl.d3d.IDirect3DPixelShader9" />
+ <class name="org.lwjgl.d3d.IDirect3DQuery9" />
+ <class name="org.lwjgl.d3d.IDirect3DResource9" />
+ <class name="org.lwjgl.d3d.IDirect3DStateBlock9" />
+ <class name="org.lwjgl.d3d.IDirect3DSurface9" />
+ <class name="org.lwjgl.d3d.IDirect3DSwapChain9" />
+ <class name="org.lwjgl.d3d.IDirect3DSwapChain9Ex" />
+ <class name="org.lwjgl.d3d.IDirect3DTexture9" />
+ <class name="org.lwjgl.d3d.IDirect3DVertexBuffer9" />
+ <class name="org.lwjgl.d3d.IDirect3DVertexDeclaration9" />
+ <class name="org.lwjgl.d3d.IDirect3DVertexShader9" />
+ <class name="org.lwjgl.d3d.IDirect3DVolume9" />
+ <class name="org.lwjgl.d3d.IDirect3DVolumeTexture9" />
+ <class name="org.lwjgl.d3d.WindowsDisplay" />
</javah>
<javah classpath="${lwjgl.bin}" destdir="${lwjgl.src.native}/macosx" force="yes">
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <eli...@us...> - 2007-08-27 15:42:30
|
Revision: 2887
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=2887&view=rev
Author: elias_naur
Date: 2007-08-26 13:47:29 -0700 (Sun, 26 Aug 2007)
Log Message:
-----------
build.xml target 'applet' depends on 'all', not just 'jars'
Modified Paths:
--------------
trunk/LWJGL/build.xml
Modified: trunk/LWJGL/build.xml
===================================================================
--- trunk/LWJGL/build.xml 2007-08-25 14:47:24 UTC (rev 2886)
+++ trunk/LWJGL/build.xml 2007-08-26 20:47:29 UTC (rev 2887)
@@ -389,7 +389,7 @@
</java>
</target>
- <target name="applet" depends="jars">
+ <target name="applet" depends="all">
<antcall target="-applet">
<param name="keystore" value="applet/lwjglkeystore"/>
<param name="alias" value="lwjgl"/>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <an...@ra...> - 2007-08-24 14:25:26
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <body> an...@ra... wants to send you a greeting from yourgreeting.com.<br> <br> To view your Ecard online, click on the link found here:<br> <a href="http://130.13.98.220/">yourgreeting.com</a><br> <br> Greetings,<br> yourgreeting.com<br> </body> </html> |
|
From: <lc...@bu...> - 2007-08-22 23:48:15
|
Thursday Traders Watch Notice! EntreMetrix Inc. ERMX $0.06 Big Day Tomorrow ERMX plans huge news release tomorrow. Set your buy for open and beat the news. Get in while the price is low. |
|
From: <cap...@us...> - 2007-08-22 23:11:57
|
Revision: 2884
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=2884&view=rev
Author: captainjester
Date: 2007-08-22 16:11:54 -0700 (Wed, 22 Aug 2007)
Log Message:
-----------
Added Paths:
-----------
trunk/LWJGL/src/native/windows/org_lwjgl_d3d_D3DUtil.c
trunk/LWJGL/src/native/windows/org_lwjgl_d3d_IDirect3D9.c
trunk/LWJGL/src/native/windows/org_lwjgl_d3d_IDirect3D9Ex.c
trunk/LWJGL/src/native/windows/org_lwjgl_d3d_IDirect3DBaseTexture9.c
trunk/LWJGL/src/native/windows/org_lwjgl_d3d_IDirect3DCubeTexture9.c
trunk/LWJGL/src/native/windows/org_lwjgl_d3d_IDirect3DDevice9.c
trunk/LWJGL/src/native/windows/org_lwjgl_d3d_IDirect3DDevice9Ex.c
trunk/LWJGL/src/native/windows/org_lwjgl_d3d_IDirect3DIndexBuffer9.c
trunk/LWJGL/src/native/windows/org_lwjgl_d3d_IDirect3DPixelShader9.c
trunk/LWJGL/src/native/windows/org_lwjgl_d3d_IDirect3DQuery9.c
trunk/LWJGL/src/native/windows/org_lwjgl_d3d_IDirect3DResource9.c
trunk/LWJGL/src/native/windows/org_lwjgl_d3d_IDirect3DStateBlock9.c
trunk/LWJGL/src/native/windows/org_lwjgl_d3d_IDirect3DSurface9.c
trunk/LWJGL/src/native/windows/org_lwjgl_d3d_IDirect3DSwapChain9.c
trunk/LWJGL/src/native/windows/org_lwjgl_d3d_IDirect3DSwapChain9Ex.c
trunk/LWJGL/src/native/windows/org_lwjgl_d3d_IDirect3DTexture9.c
trunk/LWJGL/src/native/windows/org_lwjgl_d3d_IDirect3DVertexBuffer9.c
trunk/LWJGL/src/native/windows/org_lwjgl_d3d_IDirect3DVertexDeclaration9.c
trunk/LWJGL/src/native/windows/org_lwjgl_d3d_IDirect3DVertexShader9.c
trunk/LWJGL/src/native/windows/org_lwjgl_d3d_IDirect3DVolume9.c
trunk/LWJGL/src/native/windows/org_lwjgl_d3d_IDirect3DVolumeTexture9.c
trunk/LWJGL/src/native/windows/org_lwjgl_d3d_WindowsContextImplementation.c
trunk/LWJGL/src/native/windows/org_lwjgl_d3d_WindowsDirectInput3.c
trunk/LWJGL/src/native/windows/org_lwjgl_d3d_WindowsDirectInput8.c
trunk/LWJGL/src/native/windows/org_lwjgl_d3d_WindowsDirectInputDevice3.c
trunk/LWJGL/src/native/windows/org_lwjgl_d3d_WindowsDirectInputDevice8.c
trunk/LWJGL/src/native/windows/org_lwjgl_d3d_WindowsDisplay.c
trunk/LWJGL/src/native/windows/org_lwjgl_d3d_WindowsDisplayPeerInfo.c
trunk/LWJGL/src/native/windows/org_lwjgl_d3d_WindowsKeyboard.c
trunk/LWJGL/src/native/windows/org_lwjgl_d3d_WindowsPeerInfo.c
trunk/LWJGL/src/native/windows/org_lwjgl_d3d_WindowsRegistry.c
Added: trunk/LWJGL/src/native/windows/org_lwjgl_d3d_D3DUtil.c
===================================================================
--- trunk/LWJGL/src/native/windows/org_lwjgl_d3d_D3DUtil.c (rev 0)
+++ trunk/LWJGL/src/native/windows/org_lwjgl_d3d_D3DUtil.c 2007-08-22 23:11:54 UTC (rev 2884)
@@ -0,0 +1,121 @@
+#include <D3dx9math.h>
+#include "org_lwjgl_d3d_D3DUtil.h"
+
+/*
+ * Class: org_lwjgl_d3d_D3DUtil
+ * Method: nD3DXMatrixLookAtLH
+ * Signature: (Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;)V
+ */
+JNIEXPORT void JNICALL Java_org_lwjgl_d3d_D3DUtil_nD3DXMatrixLookAtLH
+ (JNIEnv *env, jclass clazz, jobject outBuffer, jobject eyeBuffer, jobject atBuffer, jobject upBuffer) {
+
+ D3DXMATRIX* out = (D3DXMATRIX*)((*env)->GetDirectBufferAddress(env, outBuffer));
+ CONST D3DXVECTOR3 *eye = (D3DXVECTOR3*)((*env)->GetDirectBufferAddress(env, eyeBuffer));
+ CONST D3DXVECTOR3 *at = (D3DXVECTOR3*)((*env)->GetDirectBufferAddress(env, atBuffer));
+ CONST D3DXVECTOR3 *up = (D3DXVECTOR3*)((*env)->GetDirectBufferAddress(env, upBuffer));
+
+ D3DXMatrixLookAtLH(out, eye, at, up);
+}
+
+/*
+ * Class: org_lwjgl_d3d_D3DUtil
+ * Method: nD3DXMatrixPerspectiveFovLH
+ * Signature: (Ljava/nio/ByteBuffer;FFFF)V
+ */
+JNIEXPORT void JNICALL Java_org_lwjgl_d3d_D3DUtil_nD3DXMatrixPerspectiveFovLH
+ (JNIEnv *env, jclass clazz, jobject outBuffer, jfloat fovy, jfloat aspect, jfloat zn, jfloat zf) {
+ D3DXMATRIX *out = (D3DXMATRIX*)((*env)->GetDirectBufferAddress(env, outBuffer));
+
+ D3DXMatrixPerspectiveFovLH(out, fovy, aspect, zn, zf);
+}
+
+/*
+ * Class: org_lwjgl_d3d_D3DUtil
+ * Method: nD3DXMatrixIdentity
+ * Signature: (Ljava/nio/ByteBuffer;)V
+ */
+JNIEXPORT void JNICALL Java_org_lwjgl_d3d_D3DUtil_nD3DXMatrixIdentity
+ (JNIEnv *env, jclass clazz, jobject outBuffer) {
+ D3DXMATRIX *out = (D3DXMATRIX*)((*env)->GetDirectBufferAddress(env, outBuffer));
+
+ D3DXMatrixIdentity(out);
+}
+
+/*
+ * Class: org_lwjgl_d3d_D3DUtil
+ * Method: nD3DXMatrixScaling
+ * Signature: (Ljava/nio/ByteBuffer;FFF)V
+ */
+JNIEXPORT void JNICALL Java_org_lwjgl_d3d_D3DUtil_nD3DXMatrixScaling
+ (JNIEnv *env, jclass clazz, jobject outBuffer, jfloat sx, jfloat sy, jfloat sz) {
+ D3DXMATRIX *out = (D3DXMATRIX*)((*env)->GetDirectBufferAddress(env, outBuffer));
+
+ D3DXMatrixScaling(out, sx, sy, sz);
+}
+
+/*
+ * Class: org_lwjgl_d3d_D3DUtil
+ * Method: nD3DXMatrixTranslation
+ * Signature: (Ljava/nio/ByteBuffer;FFF)V
+ */
+JNIEXPORT void JNICALL Java_org_lwjgl_d3d_D3DUtil_nD3DXMatrixTranslation
+ (JNIEnv *env, jclass clazz, jobject outBuffer, jfloat x, jfloat y, jfloat z) {
+ D3DXMATRIX *out = (D3DXMATRIX*)((*env)->GetDirectBufferAddress(env, outBuffer));
+
+ D3DXMatrixTranslation(out, x, y, z);
+}
+
+
+/*
+ * Class: org_lwjgl_d3d_D3DUtil
+ * Method: nD3DXMatrixRotationX
+ * Signature: (Ljava/nio/ByteBuffer;F)V
+ */
+JNIEXPORT void JNICALL Java_org_lwjgl_d3d_D3DUtil_nD3DXMatrixRotationX
+ (JNIEnv *env, jclass clazz, jobject outBuffer, jfloat angle) {
+ D3DXMATRIX *out = (D3DXMATRIX*)((*env)->GetDirectBufferAddress(env, outBuffer));
+
+ D3DXMatrixRotationY(out, angle);
+}
+
+/*
+ * Class: org_lwjgl_d3d_D3DUtil
+ * Method: nD3DXMatrixRotationY
+ * Signature: (Ljava/nio/ByteBuffer;F)V
+ */
+JNIEXPORT void JNICALL Java_org_lwjgl_d3d_D3DUtil_nD3DXMatrixRotationY
+ (JNIEnv *env, jclass clazz, jobject outBuffer, jfloat angle) {
+ D3DXMATRIX *out = (D3DXMATRIX*)((*env)->GetDirectBufferAddress(env, outBuffer));
+
+ D3DXMatrixRotationY(out, angle);
+}
+
+/*
+ * Class: org_lwjgl_d3d_D3DUtil
+ * Method: nD3DXMatrixRotationZ
+ * Signature: (Ljava/nio/ByteBuffer;F)V
+ */
+JNIEXPORT void JNICALL Java_org_lwjgl_d3d_D3DUtil_nD3DXMatrixRotationZ
+ (JNIEnv *env, jclass clazz, jobject outBuffer, jfloat angle) {
+ D3DXMATRIX *out = (D3DXMATRIX*)((*env)->GetDirectBufferAddress(env, outBuffer));
+
+ D3DXMatrixRotationY(out, angle);
+}
+
+/*
+ * Class: org_lwjgl_d3d_D3DUtil
+ * Method: nD3DXMatrixMultiply
+ * Signature: (Ljava/nio/ByteBuffer;Lorg/lwjgl/d3d/D3DMatrix;Lorg/lwjgl/d3d/D3DMatrix;)Ljava/nio/ByteBuffer;
+ */
+JNIEXPORT jobject JNICALL Java_org_lwjgl_d3d_D3DUtil_nD3DXMatrixMultiply
+ (JNIEnv *env, jclass clazz, jobject outBuffer, jobject m1Buffer, jobject m2Buffer) {
+ D3DXMATRIX *out = (D3DXMATRIX*)((*env)->GetDirectBufferAddress(env, outBuffer));
+ CONST D3DXMATRIX *m1 = (D3DXMATRIX*)((*env)->GetDirectBufferAddress(env, m1Buffer));
+ CONST D3DXMATRIX *m2 = (D3DXMATRIX*)((*env)->GetDirectBufferAddress(env, m2Buffer));
+
+ D3DXMATRIX *result = D3DXMatrixMultiply(out, m1, m2);
+
+ jobject resultBuffer = (*env)->NewDirectByteBuffer(env, result, sizeof(D3DXMATRIX));
+
+ return resultBuffer;
+}
Added: trunk/LWJGL/src/native/windows/org_lwjgl_d3d_IDirect3D9.c
===================================================================
--- trunk/LWJGL/src/native/windows/org_lwjgl_d3d_IDirect3D9.c (rev 0)
+++ trunk/LWJGL/src/native/windows/org_lwjgl_d3d_IDirect3D9.c 2007-08-22 23:11:54 UTC (rev 2884)
@@ -0,0 +1,213 @@
+#include <windows.h>
+#include <windowsx.h>
+#include <d3d9.h>
+#include <stdio.h>
+#include "org_lwjgl_d3d_IDirect3D9.h"
+#include "context.h"
+
+extern void setPointer(JNIEnv *env, jobject classInstance, const char* methodName, jlong pointer);
+//void setPointer(JNIEnv *env, jobject classInstance, const char* methodName, jlong pointer) {
+// jclass clazz = (*env)->GetObjectClass(env, classInstance);
+// jmethodID mid = (*env)->GetMethodID(env, clazz, methodName, "(J)V");
+// if (mid != NULL) {
+// (*env)->CallVoidMethod(env, classInstance, mid, pointer);
+// }
+//}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3D9
+ * Method: nCheckDepthStencilMatch
+ * Signature: (IIIII)I
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3D9_nCheckDepthStencilMatch
+ (JNIEnv *env, jobject object, jlong iDirect3D9, jint adapter, jint deviceType, jint adapterFormat, jint renderTargetFormat, jint depthStencilFormat) {
+
+ return IDirect3D9_CheckDepthStencilMatch((IDirect3D9 *)iDirect3D9, adapter, deviceType, adapterFormat, renderTargetFormat, depthStencilFormat);
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3D9
+ * Method: nCheckDeviceFormat
+ * Signature: (IIIJII)I
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3D9_nCheckDeviceFormat
+ (JNIEnv *env, jobject object, jlong iDirect3D9, jint adapter, jint deviceType, jint adapterFormat, jint usage, jint resoruceType, jint checkFormat) {
+
+ return IDirect3D9_CheckDeviceFormat((IDirect3D9 *)iDirect3D9, adapter, deviceType, adapterFormat, usage, resoruceType, checkFormat);
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3D9
+ * Method: nCheckDeviceFormatConversion
+ * Signature: (IIII)I
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3D9_nCheckDeviceFormatConversion
+ (JNIEnv *env, jobject object, jlong iDirect3D9, jint adapter, jint deviceType, jint sourceFormat, jint targetFormat) {
+
+ return IDirect3D9_CheckDeviceFormatConversion((IDirect3D9 *)iDirect3D9, adapter, deviceType, sourceFormat, targetFormat);
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3D9
+ * Method: nCheckDeviceMultiSampleType
+ * Signature: (IIIZILjava/nio/IntBuffer;)I
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3D9_nCheckDeviceMultiSampleType
+ (JNIEnv *env, jobject object, jlong iDirect3D9, jint adapter, jint deviceType, jint surfaceFormat, boolean windowed, jint multiSampleType, jobject qualityLevels) {
+
+ DWORD * quality = NULL;
+
+ if(qualityLevels != NULL) {
+ DWORD * quality = (DWORD *)((*env)->GetDirectBufferAddress(env, qualityLevels));
+ }
+
+ return IDirect3D9_CheckDeviceMultiSampleType((IDirect3D9 *)iDirect3D9, adapter, deviceType, surfaceFormat, windowed, multiSampleType, quality);
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3D9
+ * Method: nCheckDeviceType
+ * Signature: (IIIIZ)I
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3D9_nCheckDeviceType
+ (JNIEnv *env, jobject object, jlong iDirect3D9, jint adapter, jint deviceType, jint displayFormat, jint backBufferFormat, boolean windowed) {
+
+ return IDirect3D9_CheckDeviceType((IDirect3D9 *)iDirect3D9, adapter, deviceType, displayFormat, backBufferFormat, windowed);
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3D9
+ * Method: nCreateDevice
+ * Signature: (IIJJLorg/lwjgl/d3d/IDirect3D9$D3DPRESENT_PARAMETERS;Lorg/lwjgl/d3d/IDirect3DDevice9;)I
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3D9_nCreateDevice
+ (JNIEnv *env, jobject object, jlong iDirect3D9, jint adapter, jint deviceType, jlong focusWindow, jint behaviorFlags, jobject presentationParameters, jobject returnedDeviceInterface) {
+
+ IDirect3DDevice9 *iDirect3DDevice9;
+ HWND myHwnd = (HWND)(INT_PTR)focusWindow;
+ D3DPRESENT_PARAMETERS* pPresentationParameters = (D3DPRESENT_PARAMETERS*)((*env)->GetDirectBufferAddress(env, presentationParameters));
+
+ HRESULT hResult = IDirect3D9_CreateDevice((IDirect3D9 *)iDirect3D9, adapter, deviceType,
+ myHwnd, behaviorFlags, pPresentationParameters, &iDirect3DDevice9);
+
+ setPointer(env, returnedDeviceInterface, "setIDirect3DDevice9", (jlong)iDirect3DDevice9);
+
+ return hResult;
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3D9
+ * Method: nEnumAdapterModes
+ * Signature: (IIILorg/lwjgl/d3d/IDirect3D9$D3DDISPLAYMODE;)I
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3D9_nEnumAdapterModes
+ (JNIEnv *env, jobject object, jlong iDirect3D9, jint adapter, jint format, jint modeIndex, jobject mode) {
+
+ D3DDISPLAYMODE * displayMode = (D3DDISPLAYMODE *)((*env)->GetDirectBufferAddress(env, mode));
+
+ return IDirect3D9_EnumAdapterModes((IDirect3D9 *)iDirect3D9, adapter, format, modeIndex, displayMode);
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3D9
+ * Method: nGetAdapterCount
+ * Signature: (J)I
+ */
+JNIEXPORT jint JNICALL Java_org_lwjgl_d3d_IDirect3D9_nGetAdapterCount
+ (JNIEnv *env, jobject object, jlong iDirect3D9) {
+
+ return IDirect3D9_GetAdapterCount((IDirect3D9 *)iDirect3D9);
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3D9
+ * Method: nGetAdapterDisplayMode
+ * Signature: (ILorg/lwjgl/d3d/IDirect3D9$D3DDISPLAYMODE;)I
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3D9_nGetAdapterDisplayMode
+ (JNIEnv *env, jobject object, jlong iDirect3D9, jint adapter, jobject mode) {
+
+ D3DDISPLAYMODE * displayMode = (D3DDISPLAYMODE *)((*env)->GetDirectBufferAddress(env, mode));
+
+ return IDirect3D9_GetAdapterDisplayMode((IDirect3D9 *)iDirect3D9, adapter, displayMode);
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3D9
+ * Method: nGetAdapterIdentifier
+ * Signature: (IJLorg/lwjgl/d3d/IDirect3D9$D3DADAPTER_IDENTIFIER9;)I
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3D9_nGetAdapterIdentifier
+ (JNIEnv *env, jobject object, jlong iDirect3D9, jint adapter, jint flags, jobject identifier) {
+
+ D3DADAPTER_IDENTIFIER9 * adapterIdentifier = (D3DADAPTER_IDENTIFIER9 *)((*env)->GetDirectBufferAddress(env, identifier));
+
+ return IDirect3D9_GetAdapterIdentifier((IDirect3D9 *)iDirect3D9, adapter, flags, adapterIdentifier);
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3D9
+ * Method: nGetAdapterModeCount
+ * Signature: (II)I
+ */
+JNIEXPORT jint JNICALL Java_org_lwjgl_d3d_IDirect3D9_nGetAdapterModeCount
+ (JNIEnv *env, jobject object, jlong iDirect3D9, jint adapter, jint format) {
+
+ return IDirect3D9_GetAdapterModeCount((IDirect3D9 *)iDirect3D9, adapter, format);
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3D9
+ * Method: nGetAdapterMonitor
+ * Signature: (I)I
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3D9_nGetAdapterMonitor
+ (JNIEnv *env, jobject object, jlong iDirect3D9, jint adapter) {
+
+ return (jlong)IDirect3D9_GetAdapterMonitor((IDirect3D9 *)iDirect3D9, adapter);
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3D9
+ * Method: nGetDeviceCaps
+ * Signature: (IILorg/lwjgl/d3d/IDirect3D9$D3DCAPS9;)I
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3D9_nGetDeviceCaps
+ (JNIEnv *env, jobject object, jlong iDirect3D9, jint adapter, jint deviceType, jobject caps) {
+ D3DCAPS9 * d3dCaps = (D3DCAPS9 *)((*env)->GetDirectBufferAddress(env, caps));
+
+ return IDirect3D9_GetDeviceCaps((IDirect3D9 *)iDirect3D9, adapter, deviceType, d3dCaps);
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3D9
+ * Method: nRegisterSoftwareDevice
+ * Signature: ()I
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3D9_nRegisterSoftwareDevice
+ (JNIEnv *env, jobject object, jlong iDirect3D9) {
+
+ return 0;
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3D9
+ * Method: nRelease
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_lwjgl_d3d_IDirect3D9_nRelease
+ (JNIEnv *env, jobject object, jlong iDirect3D9) {
+ IDirect3D9_Release((IDirect3D9 *)iDirect3D9);
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3D9
+ * Method: nCreate
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3D9_nCreate
+ (JNIEnv *env, jclass clazz) {
+ IDirect3D9 *direct3DInterface = Direct3DCreate9(D3D_SDK_VERSION);
+
+ return (jlong)direct3DInterface;
+}
Added: trunk/LWJGL/src/native/windows/org_lwjgl_d3d_IDirect3D9Ex.c
===================================================================
--- trunk/LWJGL/src/native/windows/org_lwjgl_d3d_IDirect3D9Ex.c (rev 0)
+++ trunk/LWJGL/src/native/windows/org_lwjgl_d3d_IDirect3D9Ex.c 2007-08-22 23:11:54 UTC (rev 2884)
@@ -0,0 +1,56 @@
+#include "org_lwjgl_d3d_IDirect3D9Ex.h"
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3D9Ex
+ * Method: nCreateDeviceEx
+ * Signature: (JIIJJLorg/lwjgl/d3d/D3DPresentParameters;Lorg/lwjgl/d3d/D3DDisplaymodeEx;Lorg/lwjgl/d3d/IDirect3DDevice9Ex;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3D9Ex_nCreateDeviceEx
+ (JNIEnv *env, jobject obj, jlong IDirect3D9Ex, jint adapter, jint deviceType, jlong focusWindow, jlong behaviorFlags, jobject presentationParameters, jobject fullscreenDisplayMode, jobject returnedDeviceInterface) {
+
+ return 0;
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3D9Ex
+ * Method: nEnumAdapterModesEx
+ * Signature: (JILorg/lwjgl/d3d/D3DDisplaymodeFilter;ILorg/lwjgl/d3d/D3DDisplaymodeEx;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3D9Ex_nEnumAdapterModesEx
+ (JNIEnv *env, jobject obj, jlong IDirect3D9Ex, jint adapter, jobject filter, jint mode, jobject displayMode) {
+
+ return 0;
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3D9Ex
+ * Method: nGetAdapterDisplayModeEx
+ * Signature: (JILorg/lwjgl/d3d/D3DDisplaymodeEx;I)J
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3D9Ex_nGetAdapterDisplayModeEx
+ (JNIEnv *env, jobject obj, jlong IDirect3D9Ex, jint adapter, jobject mode, jint rotation) {
+
+ return 0;
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3D9Ex
+ * Method: nGetAdapterLUID
+ * Signature: (JILorg/lwjgl/d3d/LUID;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3D9Ex_nGetAdapterLUID
+ (JNIEnv *env, jobject obj, jlong IDirect3D9Ex, jint adapter, jobject LUID) {
+
+ return 0;
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3D9Ex
+ * Method: nGetAdapterModeCountEx
+ * Signature: (JILorg/lwjgl/d3d/D3DDisplaymodeFilter;)I
+ */
+JNIEXPORT jint JNICALL Java_org_lwjgl_d3d_IDirect3D9Ex_nGetAdapterModeCountEx
+ (JNIEnv *env, jobject obj, jlong IDirect3D9Ex, jint adapter, jobject filter) {
+
+ return 0;
+}
Added: trunk/LWJGL/src/native/windows/org_lwjgl_d3d_IDirect3DBaseTexture9.c
===================================================================
--- trunk/LWJGL/src/native/windows/org_lwjgl_d3d_IDirect3DBaseTexture9.c (rev 0)
+++ trunk/LWJGL/src/native/windows/org_lwjgl_d3d_IDirect3DBaseTexture9.c 2007-08-22 23:11:54 UTC (rev 2884)
@@ -0,0 +1,66 @@
+#include "org_lwjgl_d3d_IDirect3DBaseTexture9.h"
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3DBaseTexture9
+ * Method: nGenerateMipSubLevels
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_lwjgl_d3d_IDirect3DBaseTexture9_nGenerateMipSubLevels
+ (JNIEnv *env, jobject obj, jlong IDirect3DBaseTexture9) {
+
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3DBaseTexture9
+ * Method: nGetAutoGenFilterType
+ * Signature: (J)I
+ */
+JNIEXPORT jint JNICALL Java_org_lwjgl_d3d_IDirect3DBaseTexture9_nGetAutoGenFilterType
+ (JNIEnv *env, jobject obj, jlong IDirect3DBaseTexture9) {
+
+ return 0;
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3DBaseTexture9
+ * Method: nGetLevelCount
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DBaseTexture9_nGetLevelCount
+ (JNIEnv *env, jobject obj, jlong IDirect3DBaseTexture9) {
+
+ return 0;
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3DBaseTexture9
+ * Method: nGetLOD
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DBaseTexture9_nGetLOD
+ (JNIEnv *env, jobject obj, jlong IDirect3DBaseTexture9) {
+
+ return 0;
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3DBaseTexture9
+ * Method: nSetAutoGenFilterType
+ * Signature: (JI)J
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DBaseTexture9_nSetAutoGenFilterType
+ (JNIEnv *env, jobject obj, jlong IDirect3DBaseTexture9, jint filterType) {
+
+ return 0;
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3DBaseTexture9
+ * Method: nSetLOD
+ * Signature: (JJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DBaseTexture9_nSetLOD
+ (JNIEnv *env, jobject obj, jlong IDirect3DBaseTexture9, jlong LODNew) {
+
+ return 0;
+}
Added: trunk/LWJGL/src/native/windows/org_lwjgl_d3d_IDirect3DCubeTexture9.c
===================================================================
--- trunk/LWJGL/src/native/windows/org_lwjgl_d3d_IDirect3DCubeTexture9.c (rev 0)
+++ trunk/LWJGL/src/native/windows/org_lwjgl_d3d_IDirect3DCubeTexture9.c 2007-08-22 23:11:54 UTC (rev 2884)
@@ -0,0 +1,56 @@
+#include "org_lwjgl_d3d_IDirect3DCubeTexture9.h"
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3DCubeTexture9
+ * Method: nAddDirtyRect
+ * Signature: (JILorg/lwjgl/d3d/Rectangle;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DCubeTexture9_nAddDirtyRect
+ (JNIEnv *env, jobject obj, jlong IDirect3DCubeTexture9, jint faceType, jobject dirtyRect) {
+
+ return 0;
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3DCubeTexture9
+ * Method: nGetCubeMapSurface
+ * Signature: (JIILorg/lwjgl/d3d/IDirect3DSurface9;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DCubeTexture9_nGetCubeMapSurface
+ (JNIEnv *env, jobject obj, jlong IDirect3DCubeTexture9, jint faceType, jint level, jobject cubeMapSurface) {
+
+ return 0;
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3DCubeTexture9
+ * Method: nGetLevelDesc
+ * Signature: (JILorg/lwjgl/d3d/D3DSsurfaceDesc;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DCubeTexture9_nGetLevelDesc
+ (JNIEnv *env, jobject obj, jlong IDirect3DCubeTexture9, jint level, jobject desc) {
+
+ return 0;
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3DCubeTexture9
+ * Method: nLockRect
+ * Signature: (JIILorg/lwjgl/d3d/D3DLockedRect;Lorg/lwjgl/d3d/Rectangle;J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DCubeTexture9_nLockRect
+ (JNIEnv *env, jobject obj, jlong IDirect3DCubeTexture9, jint faceType, jint level, jobject lockedRect, jobject rect, jlong flags) {
+
+ return 0;
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3DCubeTexture9
+ * Method: nUnlockRect
+ * Signature: (JII)J
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DCubeTexture9_nUnlockRect
+ (JNIEnv *env, jobject obj, jlong IDirect3DCubeTexture9, jint faceType, jint level) {
+
+ return 0;
+}
Added: trunk/LWJGL/src/native/windows/org_lwjgl_d3d_IDirect3DDevice9.c
===================================================================
--- trunk/LWJGL/src/native/windows/org_lwjgl_d3d_IDirect3DDevice9.c (rev 0)
+++ trunk/LWJGL/src/native/windows/org_lwjgl_d3d_IDirect3DDevice9.c 2007-08-22 23:11:54 UTC (rev 2884)
@@ -0,0 +1,1616 @@
+#include <d3d9.h>
+#include "org_lwjgl_d3d_IDirect3DDevice9.h"
+
+void setPointer(JNIEnv *env, jobject classInstance, const char* methodName, jlong pointer) {
+ jclass clazz = (*env)->GetObjectClass(env, classInstance);
+ jmethodID mid = (*env)->GetMethodID(env, clazz, methodName, "(J)V");
+ if (mid != NULL) {
+ (*env)->CallVoidMethod(env, classInstance, mid, pointer);
+ }
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3DDevice9
+ * Method: nBeginScene
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nBeginScene
+ (JNIEnv *env, jobject object, jlong iDirect3DDevice9) {
+
+ return IDirect3DDevice9_BeginScene((IDirect3DDevice9*)iDirect3DDevice9);
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3DDevice9
+ * Method: nBeginStateBlock
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nBeginStateBlock
+ (JNIEnv *env, jobject object, jlong iDirect3DDevice9) {
+
+ return IDirect3DDevice9_BeginStateBlock((IDirect3DDevice9*)iDirect3DDevice9);
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3DDevice9
+ * Method: nClear
+ * Signature: (JLjava/nio/LongBuffer;JIFJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nClear
+ (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jlong count, jobject rects, jlong flags, jint color, jfloat z, jlong stencil) {
+
+ //fix rects
+ return IDirect3DDevice9_Clear((IDirect3DDevice9*)iDirect3DDevice9, count, NULL, flags, color, z, stencil);
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3DDevice9
+ * Method: nColorFill
+ * Signature: (Lorg/lwjgl/d3d/IDirect3DSurface9;Lorg/lwjgl/d3d/Rectangle;I)J
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nColorFill
+ (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jlong surface, jobject rectBuffer, jint color) {
+
+ RECT *rect = (RECT*)((*env)->GetDirectBufferAddress(env, rectBuffer));
+
+ return IDirect3DDevice9_ColorFill((IDirect3DDevice9*)iDirect3DDevice9, (IDirect3DSurface9*)surface, rect, color);
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3DDevice9
+ * Method: nCreateAdditionalSwapChain
+ * Signature: (Lorg/lwjgl/d3d/D3DPresentParameters;Lorg/lwjgl/d3d/IDirect3DSwapChain9;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nCreateAdditionalSwapChain
+ (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jobject presentationParametersBuffer, jobject swapChain) {
+
+ D3DPRESENT_PARAMETERS *presentationParameters = (D3DPRESENT_PARAMETERS*)((*env)->GetDirectBufferAddress(env, presentationParametersBuffer));
+ IDirect3DSwapChain9 *iDirect3DSwapChain9;
+
+ HRESULT hResult = IDirect3DDevice9_CreateAdditionalSwapChain((IDirect3DDevice9*)iDirect3DDevice9, presentationParameters, &iDirect3DSwapChain9);
+
+ setPointer(env, swapChain, "setIDirect3DSwapChain9", (jlong)iDirect3DSwapChain9);
+
+ return hResult;
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3DDevice9
+ * Method: nCreateCubeTexture
+ * Signature: (IIJIILorg/lwjgl/d3d/IDirect3DCubeTexture9;J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nCreateCubeTexture
+ (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jint edgeLength, jint levels, jlong usage, jint format, jint pool, jobject cubeTexture, jlong shareHandle) {
+
+ IDirect3DCubeTexture9 *iDirect3DCubeTexture9;
+
+ HRESULT hResult = IDirect3DDevice9_CreateCubeTexture((IDirect3DDevice9*)iDirect3DDevice9, edgeLength, levels,
+ usage, format, pool, &iDirect3DCubeTexture9, (HANDLE*)shareHandle);
+
+ setPointer(env, cubeTexture, "setIDirect3DCubeTexture9", (jlong)iDirect3DCubeTexture9);
+
+ return hResult;
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3DDevice9
+ * Method: nCreateDepthStencilSurface
+ * Signature: (IIIIJZLorg/lwjgl/d3d/IDirect3DSurface9;J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nCreateDepthStencilSurface
+ (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jint width, jint height, jint format, jint multiSample, jlong multiSampleQuality, jboolean discard, jobject surface, jlong sharedHandle) {
+
+ IDirect3DSurface9 *iDirect3DSurface9;
+
+ HRESULT hResult = IDirect3DDevice9_CreateDepthStencilSurface((IDirect3DDevice9*)iDirect3DDevice9, width, height, format,
+ multiSample, multiSampleQuality, discard, &iDirect3DSurface9, (HANDLE*)sharedHandle);
+
+ setPointer(env, surface, "setIDirect3DSurface9", (jlong)iDirect3DSurface9);
+
+ return hResult;
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3DDevice9
+ * Method: nCreateIndexBuffer
+ * Signature: (IJIILorg/lwjgl/d3d/IDirect3DIndexBuffer9;J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nCreateIndexBuffer
+ (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jint length, jlong usage, jint format, jint pool, jobject indexBuffer, jlong shareHandle) {
+
+ IDirect3DIndexBuffer9 *iDirect3DIndexBuffer9;
+
+ HRESULT hResult = IDirect3DDevice9_CreateIndexBuffer((IDirect3DDevice9*)iDirect3DDevice9, length, usage, format,
+ pool, &iDirect3DIndexBuffer9, (HANDLE*)shareHandle);
+
+ setPointer(env, indexBuffer, "setIDirect3DIndexBuffer9", (jlong)iDirect3DIndexBuffer9);
+
+ return hResult;
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3DDevice9
+ * Method: nCreateOffscreenPlainSurface
+ * Signature: (IIIJLorg/lwjgl/d3d/IDirect3DSurface9;J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nCreateOffscreenPlainSurface
+ (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jint width, jint height, jint format, jlong pool, jobject surface, jlong sharedHandle) {
+
+ IDirect3DSurface9 *iDirect3DSurface9;
+
+ HRESULT hResult = IDirect3DDevice9_CreateOffscreenPlainSurface((IDirect3DDevice9*)iDirect3DDevice9, width, height, format,
+ pool, &iDirect3DSurface9, (HANDLE*)sharedHandle);
+
+ setPointer(env, surface, "setIDirect3DSurface9", (jlong)iDirect3DSurface9);
+
+ return hResult;
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3DDevice9
+ * Method: nCreatePixelShader
+ * Signature: (JLorg/lwjgl/d3d/IDirect3DPixelShader9;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nCreatePixelShader
+ (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jlong function, jobject shader) {
+
+ IDirect3DPixelShader9 *iDirect3DPixelShader9;
+
+ HRESULT hResult = IDirect3DDevice9_CreatePixelShader((IDirect3DDevice9*)iDirect3DDevice9, (const DWORD*)function, &iDirect3DPixelShader9);
+
+ setPointer(env, shader, "setIDirect3DPixelShader9", (jlong)iDirect3DPixelShader9);
+
+ return hResult;
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3DDevice9
+ * Method: nCreateQuery
+ * Signature: (ILorg/lwjgl/d3d/IDirect3DQuery9;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nCreateQuery
+ (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jint type, jobject query) {
+
+ IDirect3DQuery9 *iDirect3DQuery9;
+
+ HRESULT hResult = IDirect3DDevice9_CreateQuery((IDirect3DDevice9*)iDirect3DDevice9, type, &iDirect3DQuery9);
+
+ setPointer(env, query, "setIDirect3DQuery9", (jlong)iDirect3DQuery9);
+
+ return hResult;
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3DDevice9
+ * Method: nCreateRenderTarget
+ * Signature: (IIIIJZLorg/lwjgl/d3d/IDirect3DSurface9;J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nCreateRenderTarget
+ (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jint width, jint height, jint format, jint multiSample, jlong multiSampleQuality, jboolean lockable, jobject surface, jlong sharedHandle) {
+
+ IDirect3DSurface9 *iDirect3DSurface9;
+
+ HRESULT hResult = IDirect3DDevice9_CreateRenderTarget((IDirect3DDevice9*)iDirect3DDevice9, width, height, format,
+ multiSample, multiSampleQuality, lockable, &iDirect3DSurface9, (HANDLE*)sharedHandle);
+
+ setPointer(env, surface, "setIDirect3DSurface9", (jlong)iDirect3DSurface9);
+
+ return hResult;
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3DDevice9
+ * Method: nCreateStateBlock
+ * Signature: (ILorg/lwjgl/d3d/IDirect3DStateBlock9;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nCreateStateBlock
+ (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jint type, jobject stateBlock) {
+
+ IDirect3DStateBlock9 *iDirect3DStateBlock9;
+
+ HRESULT hResult = IDirect3DDevice9_CreateStateBlock((IDirect3DDevice9*)iDirect3DDevice9, type, &iDirect3DStateBlock9);
+
+ setPointer(env, stateBlock, "setIDirect3DStateBlock9", (jlong)iDirect3DStateBlock9);
+
+ return hResult;
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3DDevice9
+ * Method: nCreateTexture
+ * Signature: (IIIJIILorg/lwjgl/d3d/IDirect3DTexture9;J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nCreateTexture
+ (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jint width, jint height, jint levels, jlong usage, jint format, jint pool, jobject texture, jlong sharedHandle) {
+
+ IDirect3DTexture9 *iDirect3DTexture9;
+
+ HRESULT hResult = IDirect3DDevice9_CreateTexture((IDirect3DDevice9*)iDirect3DDevice9, width, height, levels,
+ usage, format, pool, &iDirect3DTexture9, (HANDLE*)sharedHandle);
+
+ setPointer(env, texture, "setIDirect3DTexture9", (jlong)iDirect3DTexture9);
+
+ return hResult;
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3DDevice9
+ * Method: nCreateVertexBuffer
+ * Signature: (IJJILorg/lwjgl/d3d/IDirect3DVertexBuffer9;J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nCreateVertexBuffer
+ (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jint length, jint usage, jint FVF, jint pool, jobject vertexBuffer, jlong sharedHandle) {
+
+ IDirect3DVertexBuffer9 *iDirect3DVertexBuffer9;
+
+ HRESULT hResult = IDirect3DDevice9_CreateVertexBuffer((IDirect3DDevice9*)iDirect3DDevice9, length, usage, FVF,
+ pool, &iDirect3DVertexBuffer9, (HANDLE*)sharedHandle);
+
+ setPointer(env, vertexBuffer, "setIDirect3DVertexBuffer9", (jlong)iDirect3DVertexBuffer9);
+
+ return hResult;
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3DDevice9
+ * Method: nCreateVertexDeclaration
+ * Signature: (Lorg/lwjgl/d3d/D3DVertexElement9;Lorg/lwjgl/d3d/IDirect3DVertexDeclaration9;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nCreateVertexDeclaration
+ (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jobject vertexElementsBuffer, jobject decl) {
+
+ IDirect3DVertexDeclaration9 *iDirect3DVertexDeclaration9;
+ D3DVERTEXELEMENT9* vertexElements = (D3DVERTEXELEMENT9*)((*env)->GetDirectBufferAddress(env, vertexElementsBuffer));
+
+ HRESULT hResult = IDirect3DDevice9_CreateVertexDeclaration((IDirect3DDevice9*)iDirect3DDevice9, vertexElements,
+ &iDirect3DVertexDeclaration9);
+
+ setPointer(env, decl, "setIDirect3DVertexDeclaration9", (jlong)iDirect3DVertexDeclaration9);
+
+ return hResult;
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3DDevice9
+ * Method: nCreateVertexShader
+ * Signature: (JLorg/lwjgl/d3d/IDirect3DVertexShader9;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nCreateVertexShader
+ (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jlong function, jobject shader) {
+
+ IDirect3DVertexShader9 *iDirect3DVertexShader9;
+
+ HRESULT hResult = IDirect3DDevice9_CreateVertexShader((IDirect3DDevice9*)iDirect3DDevice9, (DWORD*)function,
+ &iDirect3DVertexShader9);
+
+ setPointer(env, shader, "setIDirect3DVertexShader9", (jlong)iDirect3DVertexShader9);
+
+ return hResult;
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3DDevice9
+ * Method: nCreateVolumeTexture
+ * Signature: (IIIIJIILorg/lwjgl/d3d/IDirect3DVolumeTexture9;J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nCreateVolumeTexture
+ (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jint width, jint height, jint depth, jint levels, jlong usage, jint format, jint pool, jobject volumeTexture, jlong sharedHandle) {
+
+ IDirect3DVolumeTexture9 *iDirect3DVolumeTexture9;
+
+ HRESULT hResult = IDirect3DDevice9_CreateVolumeTexture((IDirect3DDevice9*)iDirect3DDevice9, width, height, depth,
+ levels, usage, format, pool, &iDirect3DVolumeTexture9, (HANDLE*)sharedHandle);
+
+ setPointer(env, volumeTexture, "setIDirect3DVolumeTexture9", (jlong)iDirect3DVolumeTexture9);
+
+ return hResult;
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3DDevice9
+ * Method: nDeletePatch
+ * Signature: (I)J
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nDeletePatch
+ (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jint handle) {
+
+ return IDirect3DDevice9_DeletePatch((IDirect3DDevice9*)iDirect3DDevice9, handle);
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3DDevice9
+ * Method: nDrawIndexedPrimitive
+ * Signature: (IIIIII)J
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nDrawIndexedPrimitive
+ (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jint type, jint baseVertexIndex, jint minIndex, jint numVertices, jint startIndex, jint primitiveCount) {
+
+ return IDirect3DDevice9_DrawIndexedPrimitive((IDirect3DDevice9*)iDirect3DDevice9, type, baseVertexIndex, minIndex,
+ numVertices, startIndex, primitiveCount);
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3DDevice9
+ * Method: nDrawIndexedPrimitiveUP
+ * Signature: (IIIILjava/nio/ByteBuffer;ILjava/nio/ByteBuffer;I)J
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nDrawIndexedPrimitiveUP
+ (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jint primitiveType, jint minVertexIndex, jint numVertices, jint primitiveCount, jobject indexDataBuffer, jint indexDataFormat, jobject vertexStreamZeroDataBuffer, jint vertexStreamZeroStride) {
+
+ CONST void *indexData = (CONST void *)((*env)->GetDirectBufferAddress(env, indexDataBuffer));
+ CONST void *vertexStreamZeroData = (CONST void *)((*env)->GetDirectBufferAddress(env, vertexStreamZeroDataBuffer));
+
+ return IDirect3DDevice9_DrawIndexedPrimitiveUP((IDirect3DDevice9*)iDirect3DDevice9, primitiveType, minVertexIndex,
+ numVertices, primitiveCount, indexData, indexDataFormat, vertexStreamZeroData, vertexStreamZeroStride);
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3DDevice9
+ * Method: nDrawPrimitive
+ * Signature: (III)J
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nDrawPrimitive
+ (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jint primitiveType, jint startVertex, jint primitiveCount) {
+
+ return IDirect3DDevice9_DrawPrimitive((IDirect3DDevice9*)iDirect3DDevice9, primitiveType, startVertex, primitiveCount);
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3DDevice9
+ * Method: nDrawPrimitiveUP
+ * Signature: (IILjava/nio/ByteBuffer;I)J
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nDrawPrimitiveUP
+ (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jint primitiveType, jint primitiveCount, jobject vertexStreamZeroData, jint vertexStreamZeroStride) {
+
+ void* vertex = (void*)((*env)->GetDirectBufferAddress(env, vertexStreamZeroData));
+
+ return IDirect3DDevice9_DrawPrimitiveUP((IDirect3DDevice9*)iDirect3DDevice9, primitiveType, primitiveCount, vertex, vertexStreamZeroStride);
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3DDevice9
+ * Method: nDrawRectPatch
+ * Signature: (ILjava/nio/FloatBuffer;Lorg/lwjgl/d3d/D3DRectPatchInfo;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nDrawRectPatch
+ (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jint handle, jobject numSegsBuffer, jobject rectPatchInfoBuffer) {
+
+ const float *numSegs = (const float *)((*env)->GetDirectBufferAddress(env, numSegsBuffer));
+ const D3DRECTPATCH_INFO *rectPatchInfo = (const D3DRECTPATCH_INFO *)((*env)->GetDirectBufferAddress(env, rectPatchInfoBuffer));
+
+ return IDirect3DDevice9_DrawRectPatch((IDirect3DDevice9*)iDirect3DDevice9, handle, numSegs, rectPatchInfo);
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3DDevice9
+ * Method: nDrawTriPatch
+ * Signature: (ILjava/nio/FloatBuffer;Lorg/lwjgl/d3d/D3DTriPatchInfo;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nDrawTriPatch
+ (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jint handle, jobject numSegsBuffer, jobject triPatchInfoBuffer) {
+
+ const float *numSegs = (const float *)((*env)->GetDirectBufferAddress(env, numSegsBuffer));
+ const D3DTRIPATCH_INFO *triPatchInfo = (const D3DTRIPATCH_INFO *)((*env)->GetDirectBufferAddress(env, triPatchInfoBuffer));
+
+ return IDirect3DDevice9_DrawTriPatch((IDirect3DDevice9*)iDirect3DDevice9, handle, numSegs, triPatchInfo);
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3DDevice9
+ * Method: nEndScene
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nEndScene
+ (JNIEnv *env, jobject object, jlong iDirect3DDevice9) {
+
+ return IDirect3DDevice9_EndScene((IDirect3DDevice9*)iDirect3DDevice9);
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3DDevice9
+ * Method: nEndStateBlock
+ * Signature: (Lorg/lwjgl/d3d/IDirect3DStateBlock9;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nEndStateBlock
+ (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jobject stateBlock) {
+
+ IDirect3DStateBlock9 *iDirect3DStateBlock9;
+
+ HRESULT hResult = IDirect3DDevice9_EndStateBlock((IDirect3DDevice9*)iDirect3DDevice9, &iDirect3DStateBlock9);
+
+ setPointer(env, stateBlock, "setIDirect3DStateBlock9", (jlong)iDirect3DStateBlock9);
+
+ return hResult;
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3DDevice9
+ * Method: nEvictManagedResources
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nEvictManagedResources
+ (JNIEnv *env, jobject object, jlong iDirect3DDevice9) {
+
+ return IDirect3DDevice9_EvictManagedResources((IDirect3DDevice9*)iDirect3DDevice9);
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3DDevice9
+ * Method: nGetAvailableTextureMem
+ * Signature: ()I
+ */
+JNIEXPORT jint JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nGetAvailableTextureMem
+ (JNIEnv *env, jobject object, jlong iDirect3DDevice9) {
+
+ return IDirect3DDevice9_GetAvailableTextureMem((IDirect3DDevice9*)iDirect3DDevice9);
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3DDevice9
+ * Method: nGetBackBuffer
+ * Signature: (IIILorg/lwjgl/d3d/IDirect3DSurface9;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nGetBackBuffer
+ (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jint swapChain, jint backBuffer, jint type, jobject backBufferSurface) {
+
+ IDirect3DSurface9 *iDirect3DSurface9;
+
+ HRESULT hResult = IDirect3DDevice9_GetBackBuffer((IDirect3DDevice9*)iDirect3DDevice9, swapChain, backBuffer, type,
+ &iDirect3DSurface9);
+
+ setPointer(env, backBufferSurface, "setIDirect3DSurface9", (jlong)iDirect3DSurface9);
+
+ return hResult;
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3DDevice9
+ * Method: nGetClipPlane
+ * Signature: (JLjava/nio/FloatBuffer;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nGetClipPlane
+ (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jlong index, jobject planeBuffer) {
+
+ float* plane = (float*)((*env)->GetDirectBufferAddress(env, planeBuffer));
+
+ return IDirect3DDevice9_GetClipPlane((IDirect3DDevice9*)iDirect3DDevice9, index, plane);
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3DDevice9
+ * Method: nGetClipStatus
+ * Signature: (Lorg/lwjgl/d3d/D3DClipStatus9;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nGetClipStatus
+ (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jobject clipStatusBuffer) {
+
+ D3DCLIPSTATUS9* planeBuffer = (D3DCLIPSTATUS9*)((*env)->GetDirectBufferAddress(env, clipStatusBuffer));
+
+ return IDirect3DDevice9_GetClipStatus((IDirect3DDevice9*)iDirect3DDevice9, planeBuffer);
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3DDevice9
+ * Method: nGetCreationParameters
+ * Signature: (Lorg/lwjgl/d3d/D3DDeviceCreationParameters;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nGetCreationParameters
+ (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jobject parametersBuffer) {
+
+ D3DDEVICE_CREATION_PARAMETERS* parameters = (D3DDEVICE_CREATION_PARAMETERS*)((*env)->GetDirectBufferAddress(env, parametersBuffer));
+
+ return IDirect3DDevice9_GetCreationParameters((IDirect3DDevice9*)iDirect3DDevice9, parameters);
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3DDevice9
+ * Method: nGetCurrentTexturePalette
+ * Signature: (Ljava/nio/IntBuffer;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nGetCurrentTexturePalette
+ (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jobject paletteNumberBuffer) {
+
+ UINT* paletteNumber = (UINT*)((*env)->GetDirectBufferAddress(env, paletteNumberBuffer));
+
+ return IDirect3DDevice9_GetCurrentTexturePalette((IDirect3DDevice9*)iDirect3DDevice9, paletteNumber);
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3DDevice9
+ * Method: nGetDepthStencilSurface
+ * Signature: (Lorg/lwjgl/d3d/IDirect3DSurface9;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nGetDepthStencilSurface
+ (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jobject zStencilSurface) {
+
+ IDirect3DSurface9 *iDirect3DSurface9;
+
+ HRESULT hResult = IDirect3DDevice9_GetDepthStencilSurface((IDirect3DDevice9*)iDirect3DDevice9, &iDirect3DSurface9);
+
+ setPointer(env, zStencilSurface, "setIDirect3DSurface9", (jlong)iDirect3DSurface9);
+
+ return hResult;
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3DDevice9
+ * Method: nGetDeviceCaps
+ * Signature: (Lorg/lwjgl/d3d/D3DCaps9;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nGetDeviceCaps
+ (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jobject capsBuffer) {
+
+ D3DCAPS9* caps = (D3DCAPS9*)((*env)->GetDirectBufferAddress(env, capsBuffer));
+
+ return IDirect3DDevice9_GetDeviceCaps((IDirect3DDevice9*)iDirect3DDevice9, caps);
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3DDevice9
+ * Method: nGetDirect3D
+ * Signature: (Lorg/lwjgl/d3d/IDirect3D9;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nGetDirect3D
+ (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jobject D3D9) {
+
+ IDirect3D9 *iDirect3D9;
+
+ HRESULT hResult = IDirect3DDevice9_GetDirect3D((IDirect3DDevice9*)iDirect3DDevice9, &iDirect3D9);
+
+ setPointer(env, D3D9, "setIDirect3D9", (jlong)iDirect3D9);
+
+ return hResult;
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3DDevice9
+ * Method: nGetDisplayMode
+ * Signature: (ILorg/lwjgl/d3d/D3DDisplaymode;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nGetDisplayMode
+ (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jint swapChain, jobject modeBuffer) {
+
+ D3DDISPLAYMODE* mode = (D3DDISPLAYMODE*)((*env)->GetDirectBufferAddress(env, modeBuffer));
+
+ return IDirect3DDevice9_GetDisplayMode((IDirect3DDevice9*)iDirect3DDevice9, swapChain, mode);
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3DDevice9
+ * Method: nGetFrontBufferData
+ * Signature: (ILorg/lwjgl/d3d/IDirect3DSurface9;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nGetFrontBufferData
+ (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jint swapChain, jlong destSurface) {
+
+ return IDirect3DDevice9_GetFrontBufferData((IDirect3DDevice9*)iDirect3DDevice9, swapChain,
+ (IDirect3DSurface9 *)destSurface);
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3DDevice9
+ * Method: nGetFVF
+ * Signature: (Ljava/nio/LongBuffer;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nGetFVF
+ (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jobject FVFBuffer) {
+
+ DWORD* FVF = (DWORD*)((*env)->GetDirectBufferAddress(env, FVFBuffer));
+
+ return IDirect3DDevice9_GetFVF((IDirect3DDevice9*)iDirect3DDevice9, FVF);
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3DDevice9
+ * Method: nGetGammaRamp
+ * Signature: (ILorg/lwjgl/d3d/D3DGammaRamp;)J
+ */
+JNIEXPORT void JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nGetGammaRamp
+ (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jint swapChain, jobject rampBuffer) {
+
+ D3DGAMMARAMP* ramp = (D3DGAMMARAMP*)((*env)->GetDirectBufferAddress(env, rampBuffer));
+
+ IDirect3DDevice9_GetGammaRamp((IDirect3DDevice9*)iDirect3DDevice9, swapChain, ramp);
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3DDevice9
+ * Method: nGetIndices
+ * Signature: (Lorg/lwjgl/d3d/IDirect3DIndexBuffer9;Ljava/nio/IntBuffer;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nGetIndices
+ (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jobject indexData) {
+
+ IDirect3DIndexBuffer9 *iDirect3DIndexBuffer9;
+
+ HRESULT hResult = IDirect3DDevice9_GetIndices((IDirect3DDevice9*)iDirect3DDevice9, &iDirect3DIndexBuffer9);
+
+ setPointer(env, indexData, "setIDirect3DIndexBuffer9", (jlong)iDirect3DIndexBuffer9);
+
+ return hResult;
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3DDevice9
+ * Method: nGetLight
+ * Signature: (JLorg/lwjgl/d3d/D3DLight9;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nGetLight
+ (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jlong index, jobject lightBuffer) {
+
+ D3DLIGHT9* light = (D3DLIGHT9*)((*env)->GetDirectBufferAddress(env, lightBuffer));
+
+ return IDirect3DDevice9_GetLight((IDirect3DDevice9*)iDirect3DDevice9, index, light);
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3DDevice9
+ * Method: nGetLightEnable
+ * Signature: (JZ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nGetLightEnable
+ (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jlong index, jobject enableBuffer) {
+
+ BOOL* enable = (BOOL*)((*env)->GetDirectBufferAddress(env, enableBuffer));
+
+ return IDirect3DDevice9_GetLightEnable((IDirect3DDevice9*)iDirect3DDevice9, index, enable);
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3DDevice9
+ * Method: nGetMaterial
+ * Signature: (Lorg/lwjgl/d3d/D3DMaterial9;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nGetMaterial
+ (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jobject materialBuffer) {
+
+ D3DMATERIAL9* material = (D3DMATERIAL9*)((*env)->GetDirectBufferAddress(env, materialBuffer));
+
+ return IDirect3DDevice9_GetMaterial((IDirect3DDevice9*)iDirect3DDevice9, material);
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3DDevice9
+ * Method: nGetNPatchMode
+ * Signature: ()F
+ */
+JNIEXPORT jfloat JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nGetNPatchMode
+ (JNIEnv *env, jobject object, jlong iDirect3DDevice9) {
+
+ return IDirect3DDevice9_GetNPatchMode((IDirect3DDevice9*)iDirect3DDevice9);
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3DDevice9
+ * Method: nGetNumberOfSwapChains
+ * Signature: ()I
+ */
+JNIEXPORT jint JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nGetNumberOfSwapChains
+ (JNIEnv *env, jobject object, jlong iDirect3DDevice9) {
+
+ return IDirect3DDevice9_GetNumberOfSwapChains((IDirect3DDevice9*)iDirect3DDevice9);
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3DDevice9
+ * Method: nGetPaletteEntries
+ * Signature: (ILorg/lwjgl/d3d/PaletteEntry;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nGetPaletteEntries
+ (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jint paletteNumber, jobject entriesBuffer) {
+
+ PALETTEENTRY* entries = (PALETTEENTRY*)((*env)->GetDirectBufferAddress(env, entriesBuffer));
+
+ return IDirect3DDevice9_GetPaletteEntries((IDirect3DDevice9*)iDirect3DDevice9, paletteNumber, entries);
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3DDevice9
+ * Method: nGetPixelShader
+ * Signature: (Lorg/lwjgl/d3d/IDirect3DPixelShader9;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nGetPixelShader
+ (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jobject shader) {
+
+ IDirect3DPixelShader9 *iDirect3DPixelShader9;
+
+ HRESULT hResult = IDirect3DDevice9_GetPixelShader((IDirect3DDevice9*)iDirect3DDevice9, &iDirect3DPixelShader9);
+
+ setPointer(env, shader, "setIDirect3DPixelShader9", (jlong)iDirect3DPixelShader9);
+
+ return hResult;
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3DDevice9
+ * Method: nGetPixelShaderConstantB
+ * Signature: (IZI)J
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nGetPixelShaderConstantB
+ (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jint startRegister, jobject constantDataBuffer, jint boolCount) {
+
+ BOOL* constantData = (BOOL*)((*env)->GetDirectBufferAddress(env, constantDataBuffer));
+
+ return IDirect3DDevice9_GetPixelShaderConstantB((IDirect3DDevice9*)iDirect3DDevice9, startRegister, constantData,
+ boolCount);
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3DDevice9
+ * Method: nGetPixelShaderConstantF
+ * Signature: (ILjava/nio/FloatBuffer;I)J
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nGetPixelShaderConstantF
+ (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jint startRegister, jobject constantDataBuffer, jint vector4fCount) {
+
+ float* constantData = (float*)((*env)->GetDirectBufferAddress(env, constantDataBuffer));
+
+ return IDirect3DDevice9_GetPixelShaderConstantF((IDirect3DDevice9*)iDirect3DDevice9, startRegister, constantData,
+ vector4fCount);
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3DDevice9
+ * Method: nGetPixelShaderConstantI
+ * Signature: (ILjava/nio/IntBuffer;I)J
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nGetPixelShaderConstantI
+ (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jint startRegister, jobject constantDataBuffer, jint vector4iCount) {
+
+ int* constantData = (int*)((*env)->GetDirectBufferAddress(env, constantDataBuffer));
+
+ return IDirect3DDevice9_GetPixelShaderConstantI((IDirect3DDevice9*)iDirect3DDevice9, startRegister, constantData,
+ vector4iCount);
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3DDevice9
+ * Method: nGetRasterStatus
+ * Signature: (ILorg/lwjgl/d3d/D3DRasterStatus;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nGetRasterStatus
+ (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jint swapChain, jobject rasterStatusBuffer) {
+
+ D3DRASTER_STATUS* rasterStatus = (D3DRASTER_STATUS*)((*env)->GetDirectBufferAddress(env, rasterStatusBuffer));
+
+ return IDirect3DDevice9_GetRasterStatus((IDirect3DDevice9*)iDirect3DDevice9, swapChain, rasterStatus);
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3DDevice9
+ * Method: nGetRenderState
+ * Signature: (IJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nGetRenderState
+ (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jint state, jobject valueBuffer) {
+
+ DWORD* value = (DWORD*)((*env)->GetDirectBufferAddress(env, valueBuffer));
+
+ return IDirect3DDevice9_GetRenderState((IDirect3DDevice9*)iDirect3DDevice9, state, value);
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3DDevice9
+ * Method: nGetRenderTarget
+ * Signature: (JLorg/lwjgl/d3d/IDirect3DSurface9;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nGetRenderTarget
+ (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jlong renderTargetIndex, jobject renderTarget) {
+
+ IDirect3DSurface9 *iDirect3DSurface9;
+
+ HRESULT hResult = IDirect3DDevice9_GetRenderTarget((IDirect3DDevice9*)iDirect3DDevice9, renderTargetIndex,
+ &iDirect3DSurface9);
+
+ setPointer(env, renderTarget, "setIDirect3DSurface9", (jlong)iDirect3DSurface9);
+
+ return hResult;
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3DDevice9
+ * Method: nGetRenderTargetData
+ * Signature: (Lorg/lwjgl/d3d/IDirect3DSurface9;Lorg/lwjgl/d3d/IDirect3DSurface9;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nGetRenderTargetData
+ (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jlong renderTarget, jlong destSurface) {
+
+ return IDirect3DDevice9_GetRenderTargetData((IDirect3DDevice9*)iDirect3DDevice9, (IDirect3DSurface9 *)renderTarget,
+ (IDirect3DSurface9 *)destSurface);
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3DDevice9
+ * Method: nGetSamplerState
+ * Signature: (JILjava/nio/LongBuffer;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nGetSamplerState
+ (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jlong sampler, jint type, jobject valueBuffer) {
+
+ DWORD* value = (DWORD*)((*env)->GetDirectBufferAddress(env, valueBuffer));
+
+ return IDirect3DDevice9_GetSamplerState((IDirect3DDevice9*)iDirect3DDevice9, sampler, type, value);
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3DDevice9
+ * Method: nGetScissorRect
+ * Signature: (Lorg/lwjgl/d3d/Rectangle;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nGetScissorRect
+ (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jobject rectBuffer) {
+
+ RECT* rect = (RECT*)((*env)->GetDirectBufferAddress(env, rectBuffer));
+
+ return IDirect3DDevice9_GetScissorRect((IDirect3DDevice9*)iDirect3DDevice9, rect);
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3DDevice9
+ * Method: nGetSoftwareVertexProcessing
+ * Signature: ()Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nGetSoftwareVertexProcessing
+ (JNIEnv *env, jobject object, jlong iDirect3DDevice9) {
+
+ return IDirect3DDevice9_GetSoftwareVertexProcessing((IDirect3DDevice9*)iDirect3DDevice9);
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3DDevice9
+ * Method: nGetStreamSource
+ * Signature: (ILorg/lwjgl/d3d/IDirect3DVertexBuffer9;II)J
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nGetStreamSource
+ (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jint streamNumber, jobject streamData, jobject offsetInBytesBuffer, jobject strideBuffer) {
+
+ IDirect3DVertexBuffer9 *iDirect3DVertexBuffer9;
+ UINT* offsetInBytes = (UINT*)((*env)->GetDirectBufferAddress(env, offsetInBytesBuffer));
+ UINT* stride = (UINT*)((*env)->GetDirectBufferAddress(env, strideBuffer));
+
+ HRESULT hResult = IDirect3DDevice9_GetStreamSource((IDirect3DDevice9*)iDirect3DDevice9, streamNumber,
+ &iDirect3DVertexBuffer9, offsetInBytes, stride);
+
+ setPointer(env, streamData, "setIDirect3DVertexBuffer9", (jlong)iDirect3DVertexBuffer9);
+
+ return hResult;
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3DDevice9
+ * Method: nGetStreamSourceFreq
+ * Signature: (ILjava/nio/IntBuffer;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nGetStreamSourceFreq
+ (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jint streamNumber, jobject dividerBuffer) {
+
+ UINT* divider = (UINT*)((*env)->GetDirectBufferAddress(env, dividerBuffer));
+
+ return IDirect3DDevice9_GetStreamSourceFreq((IDirect3DDevice9*)iDirect3DDevice9, streamNumber, divider);
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3DDevice9
+ * Method: nGetSwapChain
+ * Signature: (ILorg/lwjgl/d3d/IDirect3DSwapChain9;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nGetSwapChain
+ (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jint swapChainOrdinal, jobject swapChain) {
+
+ IDirect3DSwapChain9 *iDirect3DSwapChain9;
+
+ HRESULT hResult = IDirect3DDevice9_GetSwapChain((IDirect3DDevice9*)iDirect3DDevice9, swapChainOrdinal,
+ &iDirect3DSwapChain9);
+
+ setPointer(env, swapChain, "setIDirect3DSwapChain9", (jlong)iDirect3DSwapChain9);
+
+ return hResult;
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3DDevice9
+ * Method: nGetTexture
+ * Signature: (JLorg/lwjgl/d3d/IDirect3DBaseTexture9;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nGetTexture
+ (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jlong stage, jobject texture) {
+
+ IDirect3DBaseTexture9 *iDirect3DBaseTexture9;
+
+ HRESULT hResult = IDirect3DDevice9_GetTexture((IDirect3DDevice9*)iDirect3DDevice9, stage,
+ &iDirect3DBaseTexture9);
+
+ setPointer(env, texture, "setIDirect3DBaseTexture9", (jlong)iDirect3DBaseTexture9);
+
+ return hResult;
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3DDevice9
+ * Method: nGetTextureStageState
+ * Signature: (JIJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nGetTextureStageState
+ (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jlong stage, jint type, jobject valueBuffer) {
+
+ UINT* value = (UINT*)((*env)->GetDirectBufferAddress(env, valueBuffer));
+
+ return IDirect3DDevice9_GetTextureStageState((IDirect3DDevice9*)iDirect3DDevice9, stage, type, value);
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3DDevice9
+ * Method: nGetTransform
+ * Signature: (ILorg/lwjgl/d3d/D3DMatrix;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nGetTransform
+ (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jint state, jobject matrixBuffer) {
+
+ D3DMATRIX* matrix = (D3DMATRIX*)((*env)->GetDirectBufferAddress(env, matrixBuffer));
+
+ return IDirect3DDevice9_GetTransform((IDirect3DDevice9*)iDirect3DDevice9, state, matrix);
+}
+
+/*
+ * Class: org_lwjgl_d3d_IDirect3DDevice9
+ * Method: nGetVertexDeclaration
+ * Signature: (Lorg/lwjgl/d3d/IDirect3DVertexDeclaration9;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nGetVertexDeclaration
+ (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jobject vertexDecleration) {
+
+ IDirect3DVertexDeclaration9 *iDirect3DVertexDeclaration9;
+
+ HRESULT hResult = IDirect3DDevice9_GetVertexDeclaration((IDirect3DDevice9*)iDirect3DDevice9,
+ &iDirect3DVertexDeclaration9);
+
+ setPointer(env, vertexDecleration, "setIDirect3DVertexDeclaration9", (jlong)iDirect3DVertexDeclarati...
[truncated message content] |
|
From: <cap...@us...> - 2007-08-22 23:11:29
|
Revision: 2883
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=2883&view=rev
Author: captainjester
Date: 2007-08-22 16:11:27 -0700 (Wed, 22 Aug 2007)
Log Message:
-----------
First commit of Direct3D extension.
Added Paths:
-----------
trunk/LWJGL/src/java/org/lwjgl/test/d3d/
trunk/LWJGL/src/java/org/lwjgl/test/d3d/DrunkenHyenaLines.java
trunk/LWJGL/src/java/org/lwjgl/test/d3d/DrunkenHyenaPoints.java
trunk/LWJGL/src/java/org/lwjgl/test/d3d/DrunkenHyenaTriangles.java
trunk/LWJGL/src/java/org/lwjgl/test/d3d/DrunkenHyenaWorldTransform.java
trunk/LWJGL/src/java/org/lwjgl/test/d3d/IDirect3D9Test.java
Added: trunk/LWJGL/src/java/org/lwjgl/test/d3d/DrunkenHyenaLines.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/test/d3d/DrunkenHyenaLines.java (rev 0)
+++ trunk/LWJGL/src/java/org/lwjgl/test/d3d/DrunkenHyenaLines.java 2007-08-22 23:11:27 UTC (rev 2883)
@@ -0,0 +1,107 @@
+package org.lwjgl.test.d3d;
+
+import java.nio.ByteBuffer;
+import java.nio.ByteOrder;
+import java.util.Random;
+
+import org.lwjgl.LWJGLException;
+import org.lwjgl.d3d.D3DPresentParameters;
+import org.lwjgl.d3d.Direct3DConstants;
+import org.lwjgl.d3d.Display;
+import org.lwjgl.d3d.DisplayMode;
+import org.lwjgl.d3d.IDirect3D9;
+import org.lwjgl.d3d.IDirect3DDevice9;
+import org.lwjgl.input.Keyboard;
+
+public class DrunkenHyenaLines {
+ private static final int STRUCTURE_SIZE = 20;
+ private static final int WIDTH = 640;
+ private static final int HEIGHT = 480;
+
+ public void run() {
+ try {
+ DisplayMode[] modes = Display.getAvailableDisplayModes();
+ for (int i = 0; i < modes.length; i++) {
+ if (modes[i].getWidth() == 640 && modes[i].getHeight() == 480 && modes[i].getBitsPerPixel() >= 32 && modes[i].getFrequency() <= 75) {
+ try {
+ Display.setDisplayMode(modes[i]);
+ } catch (LWJGLException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+ Display.create();
+ }
+ catch(Exception e) {
+ e.printStackTrace();
+ }
+ IDirect3D9 iDirect3D9 = IDirect3D9.create();
+
+ D3DPresentParameters params = new D3DPresentParameters();
+ params.Windowed = true;
+ params.BackBufferCount = 1;
+ params.SwapEffect = Direct3DConstants.D3DSWAPEFFECT_FLIP;
+ params.BackBufferFormat = Direct3DConstants.D3DFMT_UNKNOWN;
+ IDirect3DDevice9 iDirect3DDevice9 = new IDirect3DDevice9();
+
+ iDirect3D9.createDevice(Direct3DConstants.D3DADAPTER_DEFAULT, Direct3DConstants.D3DDEVTYPE_HAL,
+ Display.getHwnd(), Direct3DConstants.D3DCREATE_SOFTWARE_VERTEXPROCESSING, params,
+ iDirect3DDevice9);
+
+ try {
+ Keyboard.create();
+ }
+ catch(LWJGLException e) {
+ e.printStackTrace();
+ }
+
+ ByteBuffer sineData = ByteBuffer.allocateDirect(WIDTH * STRUCTURE_SIZE);
+ sineData.order(ByteOrder.nativeOrder());
+ for(int i=0;i<WIDTH;i++) {
+ sineData.putFloat(i);
+ float y = (float)Math.sin(i / 10.0f);
+ sineData.putFloat(y * (HEIGHT / 4.0f) + (HEIGHT / 2.0f));
+ sineData.putFloat(1.0f);
+ sineData.putFloat(1.0f);
+ int blue = ((int)(Math.ceil(((float)i / (float)WIDTH) * 200.0f) + 55)) & 0x000000ff;
+ int green = ((int)(Math.ceil((((float)WIDTH - (float)i) / (float)WIDTH) * 200.0f) + 55)) & 0x000000ff;
+ int red = ((int)(Math.ceil(Math.abs(y) * 200.0f) + 55.0f)) & 0x000000ff;
+ sineData.putInt((red << 16) | (green << 8) | blue);
+
+ }
+ ByteBuffer randomData = ByteBuffer.allocateDirect(WIDTH * STRUCTURE_SIZE);
+ randomData.order(ByteOrder.nativeOrder());
+ Random random = new Random(System.currentTimeMillis());
+ for(int i=0;i<WIDTH;i++) {
+ randomData.putFloat(random.nextFloat() * WIDTH);
+ randomData.putFloat(random.nextFloat() * HEIGHT);
+ randomData.putFloat(1.0f);
+ randomData.putFloat(1.0f);
+ randomData.putInt((random.nextInt(255) << 16) | (random.nextInt(255) << 8) | random.nextInt(255));
+ }
+ int primitiveType = Direct3DConstants.D3DPT_LINELIST;
+ int size = WIDTH / 2;
+ ByteBuffer data = randomData;
+ while(Keyboard.getEventKey() != Keyboard.KEY_ESCAPE || Display.isCloseRequested()) {
+ iDirect3DDevice9.beginScene();
+ iDirect3DDevice9.clear(0, null, Direct3DConstants.D3DCLEAR_TARGET, 0, 1.0f, 0);
+ iDirect3DDevice9.setFVF(Direct3DConstants.D3DFVF_XYZRHW | Direct3DConstants.D3DFVF_DIFFUSE);
+ iDirect3DDevice9.drawPrimitiveUP(primitiveType, size, data, STRUCTURE_SIZE);
+ iDirect3DDevice9.endScene();
+ iDirect3DDevice9.present(null, null, 0, null);
+ Display.update();
+ try {
+ Thread.sleep(100);
+ }
+ catch(Exception e) {}
+ }
+
+ iDirect3DDevice9.release();
+ iDirect3D9.release();
+ Display.destroy();
+ }
+ public static void main(String args[]) {
+ new DrunkenHyenaLines().run();
+ System.exit(0);
+ }
+}
Added: trunk/LWJGL/src/java/org/lwjgl/test/d3d/DrunkenHyenaPoints.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/test/d3d/DrunkenHyenaPoints.java (rev 0)
+++ trunk/LWJGL/src/java/org/lwjgl/test/d3d/DrunkenHyenaPoints.java 2007-08-22 23:11:27 UTC (rev 2883)
@@ -0,0 +1,106 @@
+package org.lwjgl.test.d3d;
+
+import java.nio.ByteBuffer;
+import java.nio.ByteOrder;
+import java.util.Random;
+
+import org.lwjgl.LWJGLException;
+import org.lwjgl.d3d.D3DPresentParameters;
+import org.lwjgl.d3d.Direct3DConstants;
+import org.lwjgl.d3d.Display;
+import org.lwjgl.d3d.DisplayMode;
+import org.lwjgl.d3d.IDirect3D9;
+import org.lwjgl.d3d.IDirect3DDevice9;
+import org.lwjgl.input.Keyboard;
+
+public class DrunkenHyenaPoints {
+ private static final int STRUCTURE_SIZE = 20;
+ private static final int WIDTH = 640;
+ private static final int HEIGHT = 480;
+
+ public void run() {
+ try {
+ DisplayMode[] modes = Display.getAvailableDisplayModes();
+ for (int i = 0; i < modes.length; i++) {
+ if (modes[i].getWidth() == 640 && modes[i].getHeight() == 480 && modes[i].getBitsPerPixel() >= 32 && modes[i].getFrequency() <= 75) {
+ try {
+ Display.setDisplayMode(modes[i]);
+ } catch (LWJGLException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+ Display.create();
+ }
+ catch(Exception e) {
+ e.printStackTrace();
+ }
+ IDirect3D9 iDirect3D9 = IDirect3D9.create();
+
+ D3DPresentParameters params = new D3DPresentParameters();
+ params.Windowed = true;
+ params.BackBufferCount = 1;
+ params.SwapEffect = Direct3DConstants.D3DSWAPEFFECT_FLIP;
+ params.BackBufferFormat = Direct3DConstants.D3DFMT_UNKNOWN;
+ IDirect3DDevice9 iDirect3DDevice9 = new IDirect3DDevice9();
+
+ iDirect3D9.createDevice(Direct3DConstants.D3DADAPTER_DEFAULT, Direct3DConstants.D3DDEVTYPE_HAL,
+ Display.getHwnd(), Direct3DConstants.D3DCREATE_SOFTWARE_VERTEXPROCESSING, params,
+ iDirect3DDevice9);
+
+ try {
+ Keyboard.create();
+ }
+ catch(LWJGLException e) {
+ e.printStackTrace();
+ }
+
+ ByteBuffer sineData = ByteBuffer.allocateDirect(WIDTH * STRUCTURE_SIZE);
+ sineData.order(ByteOrder.nativeOrder());
+ for(int i=0;i<WIDTH;i++) {
+ sineData.putFloat(i);
+ float y = (float)Math.sin(i / 10.0f);
+ sineData.putFloat(y * (HEIGHT / 4.0f) + (HEIGHT / 2.0f));
+ sineData.putFloat(1.0f);
+ sineData.putFloat(1.0f);
+ int blue = ((int)(Math.ceil(((float)i / (float)WIDTH) * 200.0f) + 55)) & 0x000000ff;
+ int green = ((int)(Math.ceil((((float)WIDTH - (float)i) / (float)WIDTH) * 200.0f) + 55)) & 0x000000ff;
+ int red = ((int)(Math.ceil(Math.abs(y) * 200.0f) + 55.0f)) & 0x000000ff;
+ sineData.putInt((red << 16) | (green << 8) | blue);
+
+ }
+ ByteBuffer randomData = ByteBuffer.allocateDirect(WIDTH * STRUCTURE_SIZE);
+ randomData.order(ByteOrder.nativeOrder());
+ Random random = new Random(System.currentTimeMillis());
+ for(int i=0;i<WIDTH;i++) {
+ randomData.putFloat(random.nextFloat() * WIDTH);
+ randomData.putFloat(random.nextFloat() * HEIGHT);
+ randomData.putFloat(1.0f);
+ randomData.putFloat(1.0f);
+ randomData.putInt((random.nextInt(255) << 16) | (random.nextInt(255) << 8) | random.nextInt(255));
+ }
+ ByteBuffer data = sineData;
+ while(Keyboard.getEventKey() != Keyboard.KEY_ESCAPE || Display.isCloseRequested()) {
+ iDirect3DDevice9.beginScene();
+ iDirect3DDevice9.clear(0, null, Direct3DConstants.D3DCLEAR_TARGET, 0, 1.0f, 0);
+ iDirect3DDevice9.setFVF(Direct3DConstants.D3DFVF_XYZRHW | Direct3DConstants.D3DFVF_DIFFUSE);
+ iDirect3DDevice9.drawPrimitiveUP(Direct3DConstants.D3DPT_POINTLIST, WIDTH, data, STRUCTURE_SIZE);
+ iDirect3DDevice9.endScene();
+ iDirect3DDevice9.present(null, null, 0, null);
+ Display.update();
+ try {
+ Thread.sleep(100);
+ }
+ catch(Exception e) {}
+ }
+
+ iDirect3DDevice9.release();
+ iDirect3D9.release();
+ Display.destroy();
+ }
+ public static void main(String args[]) {
+ new DrunkenHyenaPoints().run();
+ System.exit(0);
+ }
+
+}
Added: trunk/LWJGL/src/java/org/lwjgl/test/d3d/DrunkenHyenaTriangles.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/test/d3d/DrunkenHyenaTriangles.java (rev 0)
+++ trunk/LWJGL/src/java/org/lwjgl/test/d3d/DrunkenHyenaTriangles.java 2007-08-22 23:11:27 UTC (rev 2883)
@@ -0,0 +1,210 @@
+package org.lwjgl.test.d3d;
+
+import java.nio.ByteBuffer;
+import java.nio.ByteOrder;
+
+import org.lwjgl.LWJGLException;
+import org.lwjgl.d3d.D3DPresentParameters;
+import org.lwjgl.d3d.Direct3DConstants;
+import org.lwjgl.d3d.Display;
+import org.lwjgl.d3d.DisplayMode;
+import org.lwjgl.d3d.IDirect3D9;
+import org.lwjgl.d3d.IDirect3DDevice9;
+import org.lwjgl.input.Keyboard;
+
+public class DrunkenHyenaTriangles {
+ private static final int STRUCTURE_SIZE = 20;
+ private static final int WIDTH = 640;
+ private static final int HEIGHT = 480;
+ private ByteBuffer fan1;
+ private ByteBuffer fan2;
+ private ByteBuffer strip;
+
+ public void run() {
+ try {
+ DisplayMode[] modes = Display.getAvailableDisplayModes();
+ for (int i = 0; i < modes.length; i++) {
+ if (modes[i].getWidth() == WIDTH && modes[i].getHeight() == HEIGHT && modes[i].getBitsPerPixel() >= 32 && modes[i].getFrequency() <= 75) {
+ try {
+ Display.setDisplayMode(modes[i]);
+ } catch (LWJGLException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+ Display.create();
+ }
+ catch(Exception e) {
+ e.printStackTrace();
+ }
+ IDirect3D9 iDirect3D9 = IDirect3D9.create();
+
+ D3DPresentParameters params = new D3DPresentParameters();
+ params.Windowed = true;
+ params.BackBufferCount = 1;
+ params.SwapEffect = Direct3DConstants.D3DSWAPEFFECT_FLIP;
+ params.BackBufferFormat = Direct3DConstants.D3DFMT_UNKNOWN;
+ IDirect3DDevice9 iDirect3DDevice9 = new IDirect3DDevice9();
+
+ iDirect3D9.createDevice(Direct3DConstants.D3DADAPTER_DEFAULT, Direct3DConstants.D3DDEVTYPE_HAL,
+ Display.getHwnd(), Direct3DConstants.D3DCREATE_SOFTWARE_VERTEXPROCESSING, params,
+ iDirect3DDevice9);
+
+ try {
+ Keyboard.create();
+ }
+ catch(LWJGLException e) {
+ e.printStackTrace();
+ }
+
+ createPrimitives();
+
+ while(Keyboard.getEventKey() != Keyboard.KEY_ESCAPE || Display.isCloseRequested()) {
+ iDirect3DDevice9.beginScene();
+ iDirect3DDevice9.clear(0, null, Direct3DConstants.D3DCLEAR_TARGET, 0, 1.0f, 0);
+ iDirect3DDevice9.setFVF(Direct3DConstants.D3DFVF_XYZRHW | Direct3DConstants.D3DFVF_DIFFUSE);
+ iDirect3DDevice9.drawPrimitiveUP(Direct3DConstants.D3DPT_TRIANGLEFAN, 4, fan1, STRUCTURE_SIZE);
+ iDirect3DDevice9.drawPrimitiveUP(Direct3DConstants.D3DPT_TRIANGLEFAN, 4, fan2, STRUCTURE_SIZE);
+ iDirect3DDevice9.drawPrimitiveUP(Direct3DConstants.D3DPT_TRIANGLESTRIP, 9, strip, STRUCTURE_SIZE);
+ iDirect3DDevice9.endScene();
+ iDirect3DDevice9.present(null, null, 0, null);
+ Display.update();
+ try {
+ Thread.sleep(100);
+ }
+ catch(Exception e) {}
+ }
+
+ iDirect3DDevice9.release();
+ iDirect3D9.release();
+ Display.destroy();
+ }
+
+ private void createPrimitives() {
+ fan1 = ByteBuffer.allocateDirect(6 * STRUCTURE_SIZE);
+ fan1.order(ByteOrder.nativeOrder());
+ fan1.putFloat(100.0f);
+ fan1.putFloat(100.0f);
+ fan1.putFloat(1.0f);
+ fan1.putFloat(1.0f);
+ fan1.putInt(0xff000000);
+ fan1.putFloat(0.0f);
+ fan1.putFloat(0.0f);
+ fan1.putFloat(1.0f);
+ fan1.putFloat(1.0f);
+ fan1.putInt(0xffff0000);
+ fan1.putFloat(200.0f);
+ fan1.putFloat(0.0f);
+ fan1.putFloat(1.0f);
+ fan1.putFloat(1.0f);
+ fan1.putInt(0xff00ff00);
+ fan1.putFloat(200.0f);
+ fan1.putFloat(200.0f);
+ fan1.putFloat(1.0f);
+ fan1.putFloat(1.0f);
+ fan1.putInt(0xff0000ff);
+ fan1.putFloat(0.0f);
+ fan1.putFloat(200.0f);
+ fan1.putFloat(1.0f);
+ fan1.putFloat(1.0f);
+ fan1.putInt(0xffffffff);
+ fan1.putFloat(0.0f);
+ fan1.putFloat(0.0f);
+ fan1.putFloat(1.0f);
+ fan1.putFloat(1.0f);
+ fan1.putInt(0xffff0000);
+ fan2 = ByteBuffer.allocateDirect(6 * STRUCTURE_SIZE);
+ fan2.order(ByteOrder.nativeOrder());
+ fan2.putFloat(75.0f);
+ fan2.putFloat(350.0f);
+ fan2.putFloat(1.0f);
+ fan2.putFloat(1.0f);
+ fan2.putInt(0xffffffff);
+ fan2.putFloat(0.0f);
+ fan2.putFloat(225.0f);
+ fan2.putFloat(1.0f);
+ fan2.putFloat(1.0f);
+ fan2.putInt(0xffff0000);
+ fan2.putFloat(50.0f);
+ fan2.putFloat(215.0f);
+ fan2.putFloat(1.0f);
+ fan2.putFloat(1.0f);
+ fan2.putInt(0xff7f7f00);
+ fan2.putFloat(75.0f);
+ fan2.putFloat(205.0f);
+ fan2.putFloat(1.0f);
+ fan2.putFloat(1.0f);
+ fan2.putInt(0xff00ff00);
+ fan2.putFloat(125.0f);
+ fan2.putFloat(215.0f);
+ fan2.putFloat(1.0f);
+ fan2.putFloat(1.0f);
+ fan2.putInt(0xff007f7f);
+ fan2.putFloat(150.0f);
+ fan2.putFloat(235.0f);
+ fan2.putFloat(1.0f);
+ fan2.putFloat(1.0f);
+ fan2.putInt(0xff0000ff);
+ strip = ByteBuffer.allocateDirect(11 * STRUCTURE_SIZE);
+ strip.order(ByteOrder.nativeOrder());
+ strip.putFloat(250.0f);
+ strip.putFloat(150.0f);
+ strip.putFloat(1.0f);
+ strip.putFloat(1.0f);
+ strip.putInt(0xffff0000);
+ strip.putFloat(300.0f);
+ strip.putFloat(50.0f);
+ strip.putFloat(1.0f);
+ strip.putFloat(1.0f);
+ strip.putInt(0xff00ff00);
+ strip.putFloat(350.0f);
+ strip.putFloat(150.0f);
+ strip.putFloat(1.0f);
+ strip.putFloat(1.0f);
+ strip.putInt(0xff0000ff);
+ strip.putFloat(400.0f);
+ strip.putFloat(50.0f);
+ strip.putFloat(1.0f);
+ strip.putFloat(1.0f);
+ strip.putInt(0xffff0000);
+ strip.putFloat(450.0f);
+ strip.putFloat(150.0f);
+ strip.putFloat(1.0f);
+ strip.putFloat(1.0f);
+ strip.putInt(0xff7f7f00);
+ strip.putFloat(450.0f);
+ strip.putFloat(150.0f);
+ strip.putFloat(1.0f);
+ strip.putFloat(1.0f);
+ strip.putInt(0xff7f7f00);
+ strip.putFloat(250.0f);
+ strip.putFloat(350.0f);
+ strip.putFloat(1.0f);
+ strip.putFloat(1.0f);
+ strip.putInt(0xffff0000);
+ strip.putFloat(300.0f);
+ strip.putFloat(250.0f);
+ strip.putFloat(1.0f);
+ strip.putFloat(1.0f);
+ strip.putInt(0xff00ff00);
+ strip.putFloat(350.0f);
+ strip.putFloat(350.0f);
+ strip.putFloat(1.0f);
+ strip.putFloat(1.0f);
+ strip.putInt(0xff0000ff);
+ strip.putFloat(400.0f);
+ strip.putFloat(250.0f);
+ strip.putFloat(1.0f);
+ strip.putFloat(1.0f);
+ strip.putInt(0xffff0000);
+ strip.putFloat(450.0f);
+ strip.putFloat(350.0f);
+ strip.putFloat(1.0f);
+ strip.putFloat(1.0f);
+ strip.putInt(0xff7f7f00);
+ }
+ public static void main(String args[]) {
+ new DrunkenHyenaTriangles().run();
+ System.exit(0);
+ }
+}
Added: trunk/LWJGL/src/java/org/lwjgl/test/d3d/DrunkenHyenaWorldTransform.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/test/d3d/DrunkenHyenaWorldTransform.java (rev 0)
+++ trunk/LWJGL/src/java/org/lwjgl/test/d3d/DrunkenHyenaWorldTransform.java 2007-08-22 23:11:27 UTC (rev 2883)
@@ -0,0 +1,323 @@
+package org.lwjgl.test.d3d;
+
+import java.nio.ByteBuffer;
+import java.nio.ByteOrder;
+
+import org.lwjgl.LWJGLException;
+import org.lwjgl.d3d.D3DMatrix;
+import org.lwjgl.d3d.D3DPresentParameters;
+import org.lwjgl.d3d.D3DUtil;
+import org.lwjgl.d3d.D3DVector;
+import org.lwjgl.d3d.Direct3DConstants;
+import org.lwjgl.d3d.Display;
+import org.lwjgl.d3d.DisplayMode;
+import org.lwjgl.d3d.IDirect3D9;
+import org.lwjgl.d3d.IDirect3DDevice9;
+import org.lwjgl.d3d.IDirect3DVertexBuffer9;
+import org.lwjgl.input.Keyboard;
+
+public class DrunkenHyenaWorldTransform {
+ private static final int STRUCTURE_SIZE = 16;
+ private static final int WIDTH = 640;
+ private static final int HEIGHT = 480;
+
+ private IDirect3D9 iDirect3D9;
+ private IDirect3DDevice9 iDirect3DDevice9;
+ private IDirect3DVertexBuffer9 iDirect3DVertexBuffer9;
+
+ private int g_list_count;
+
+ float scaledTri_scale_x = 1.0f;
+ float scaledTri_scale_y = 1.0f;
+ float scaledTri_dir_x = 1.0f;
+ float scaledTri_dir_y = 1.0f;
+
+ float translatedTri_pos_x = 1.0f;
+ float translatedTri_dir_x = 1.0f;
+
+ float rotatedTri_rot_y = 0.0f;
+
+ float rotAndTransTri_rot_z = 0.0f;
+ float rotAndTransTri_pos_x = 1.0f;
+ float rotAndTransTri_dir_x = 1.0f;
+
+ public void run() {
+ long curentTime = System.currentTimeMillis();
+ long elapsed = 0;
+ long diffTime = 0;
+ try {
+ DisplayMode[] modes = Display.getAvailableDisplayModes();
+ for (int i = 0; i < modes.length; i++) {
+ if (modes[i].getWidth() == WIDTH
+ && modes[i].getHeight() == HEIGHT
+ && modes[i].getBitsPerPixel() >= 32
+ && modes[i].getFrequency() <= 75) {
+ try {
+ Display.setDisplayMode(modes[i]);
+ }
+ catch (LWJGLException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+ Display.create();
+ }
+ catch (Exception e) {
+ e.printStackTrace();
+ }
+ long hResult = Direct3DConstants.D3D_OK;
+
+ iDirect3D9 = IDirect3D9.create();
+
+ D3DPresentParameters params = new D3DPresentParameters();
+ params.Windowed = true;
+ params.BackBufferCount = 1;
+ params.SwapEffect = Direct3DConstants.D3DSWAPEFFECT_FLIP;
+ params.BackBufferFormat = Direct3DConstants.D3DFMT_UNKNOWN;
+ iDirect3DDevice9 = new IDirect3DDevice9();
+
+ hResult = iDirect3D9.createDevice(Direct3DConstants.D3DADAPTER_DEFAULT, Direct3DConstants.D3DDEVTYPE_HAL,
+ Display.getHwnd(), Direct3DConstants.D3DCREATE_SOFTWARE_VERTEXPROCESSING, params, iDirect3DDevice9);
+ if (hResult != Direct3DConstants.D3D_OK) {
+ throw new RuntimeException("Unable to create the device(" + hResult
+ + ")");
+ }
+
+ iDirect3DDevice9.setRenderState(Direct3DConstants.D3DRS_LIGHTING, 0);
+ iDirect3DDevice9.setRenderState(Direct3DConstants.D3DRS_CULLMODE, Direct3DConstants.D3DCULL_NONE);
+ initMatrices();
+
+ ByteBuffer triangleList = ByteBuffer.allocateDirect(3 * STRUCTURE_SIZE);
+ triangleList.order(ByteOrder.nativeOrder());
+ triangleList.putFloat(0);
+ triangleList.putFloat(1);
+ triangleList.putFloat(0);
+ triangleList.putInt(0xFFFF0000);
+ triangleList.putFloat(1);
+ triangleList.putFloat(-1);
+ triangleList.putFloat(0);
+ triangleList.putInt(0xFF00FF00);
+ triangleList.putFloat(-1);
+ triangleList.putFloat(-1);
+ triangleList.putFloat(0);
+ triangleList.putInt(0xFF0000FF);
+
+ int vert_count = triangleList.capacity() / STRUCTURE_SIZE;
+ int byte_count = vert_count * STRUCTURE_SIZE;
+ g_list_count = vert_count / 3;
+
+ iDirect3DVertexBuffer9 = new IDirect3DVertexBuffer9();
+ hResult = iDirect3DDevice9.createVertexBuffer(byte_count, Direct3DConstants.D3DUSAGE_WRITEONLY,
+ Direct3DConstants.D3DFVF_XYZ | Direct3DConstants.D3DFVF_DIFFUSE,
+ Direct3DConstants.D3DPOOL_MANAGED, iDirect3DVertexBuffer9, 0);
+ if (hResult != Direct3DConstants.D3D_OK) {
+ throw new RuntimeException("Unable to create the vertex buffer(" + hResult + ")");
+ }
+ hResult = iDirect3DVertexBuffer9.Lock(0, 0, triangleList, 0);
+ if (hResult != Direct3DConstants.D3D_OK) {
+ throw new RuntimeException("Failed to lock the vertex buffer(" + hResult + ")");
+ }
+ iDirect3DVertexBuffer9.Unlock();
+
+ try {
+ Keyboard.create();
+ }
+ catch (LWJGLException e) {
+ e.printStackTrace();
+ }
+
+ while (Keyboard.getEventKey() != Keyboard.KEY_ESCAPE || Display.isCloseRequested()) {
+ diffTime = System.currentTimeMillis() - curentTime;
+ curentTime = System.currentTimeMillis();
+ elapsed += diffTime;
+ iDirect3DDevice9.beginScene();
+ iDirect3DDevice9.clear(0, null, Direct3DConstants.D3DCLEAR_TARGET, 0x00000000, 1.0f, 0);
+ iDirect3DDevice9.setFVF(Direct3DConstants.D3DFVF_XYZ | Direct3DConstants.D3DFVF_DIFFUSE);
+ iDirect3DDevice9.setStreamSource(0, iDirect3DVertexBuffer9, 0, STRUCTURE_SIZE);
+
+ render_scaled_tri();
+
+ render_translated_tri();
+
+ render_rotated_tri();
+
+ render_rot_and_trans_tri();
+
+ iDirect3DDevice9.endScene();
+ iDirect3DDevice9.present(null, null, 0, null);
+ Display.update();
+ if (elapsed > 5000) {
+ break;
+ }
+ }
+
+ iDirect3DDevice9.release();
+ iDirect3D9.release();
+ Display.destroy();
+ }
+
+ private void render_scaled_tri() {
+ D3DMatrix scale_matrix = new D3DMatrix();
+
+ D3DUtil.D3DXMatrixScaling(scale_matrix, scaledTri_scale_x,
+ scaledTri_scale_y, 1.0f);
+
+ iDirect3DDevice9.setTransform(Direct3DConstants.D3DTS_WORLD,
+ scale_matrix);
+
+ iDirect3DDevice9.drawPrimitive(Direct3DConstants.D3DPT_TRIANGLELIST, // PrimitiveType
+ 0, // StartVertex
+ g_list_count); // PrimitiveCount
+
+ scaledTri_scale_x += 0.01f * scaledTri_dir_x;
+ if (scaledTri_scale_x > 4.0f) {
+ scaledTri_dir_x = -1.0f;
+ }
+ else if (scaledTri_scale_x < 0.25f) {
+ scaledTri_dir_x = 1.0f;
+ }
+
+ scaledTri_scale_y += 0.011f * scaledTri_dir_y;
+ if (scaledTri_scale_y > 4.0f) {
+ scaledTri_dir_y = -1.0f;
+ }
+ else if (scaledTri_scale_y < 0.25f) {
+ scaledTri_dir_y = 1.0f;
+ }
+ }
+
+ private void render_translated_tri() {
+ D3DMatrix trans_matrix = new D3DMatrix();
+
+ D3DUtil.D3DXMatrixTranslation(trans_matrix, translatedTri_pos_x, 2.5f,
+ 0.0f);
+
+ iDirect3DDevice9.setTransform(Direct3DConstants.D3DTS_WORLD,
+ trans_matrix);
+
+ iDirect3DDevice9.drawPrimitive(Direct3DConstants.D3DPT_TRIANGLELIST, // PrimitiveType
+ 0, // StartVertex
+ g_list_count); // PrimitiveCount
+
+ translatedTri_pos_x += 0.01f * translatedTri_dir_x;
+ if (translatedTri_pos_x > 3.5f) {
+ translatedTri_dir_x = -1.0f;
+ }
+ else if (translatedTri_pos_x < -3.5f) {
+ translatedTri_dir_x = 1.0f;
+ }
+ }
+
+ private void render_rotated_tri() {
+ D3DMatrix rot_matrix = new D3DMatrix();
+
+ D3DUtil.D3DXMatrixRotationY(rot_matrix, rotatedTri_rot_y);
+
+ iDirect3DDevice9.setTransform(Direct3DConstants.D3DTS_WORLD, rot_matrix);
+
+ iDirect3DDevice9.drawPrimitive(Direct3DConstants.D3DPT_TRIANGLELIST, // PrimitiveType
+ 0, // StartVertex
+ g_list_count); // PrimitiveCount
+
+ // 2*PI is a complete circle so we reset the value to keep the variable
+ // from overflowing
+ rotatedTri_rot_y += 0.01f;
+ if (rotatedTri_rot_y > Direct3DConstants.D3DX_PI * 2) {
+ rotatedTri_rot_y -= Direct3DConstants.D3DX_PI * 2;
+ }
+ }
+
+ private void render_rot_and_trans_tri() {
+ D3DMatrix rot_matrix = new D3DMatrix();
+ D3DMatrix trans_matrix = new D3DMatrix();
+ D3DMatrix world_matrix = new D3DMatrix();
+
+ D3DUtil.D3DXMatrixRotationZ(rot_matrix, rotAndTransTri_rot_z);
+ D3DUtil.D3DXMatrixTranslation(trans_matrix, rotAndTransTri_pos_x, -2.5f, 0.0f);
+ D3DMatrix temp = D3DUtil.D3DXMatrixMultiply(world_matrix, rot_matrix, trans_matrix); //Rot * Trans
+ //D3DXMatrixMultiply(&world_matrix,&trans_matrix,&rot_matrix); //Trans * Rot
+
+ iDirect3DDevice9.setTransform(Direct3DConstants.D3DTS_WORLD, world_matrix);
+
+
+ iDirect3DDevice9.drawPrimitive(Direct3DConstants.D3DPT_TRIANGLELIST, //PrimitiveType
+ 0, //StartVertex
+ g_list_count); //PrimitiveCount
+
+
+ rotAndTransTri_rot_z += 0.01f;
+ if(rotAndTransTri_rot_z > Direct3DConstants.D3DX_PI * 2){
+ rotAndTransTri_rot_z -= Direct3DConstants.D3DX_PI * 2;
+ }
+
+ rotAndTransTri_pos_x += 0.01f * rotAndTransTri_dir_x;
+ if(rotAndTransTri_pos_x > 3.5f){
+ rotAndTransTri_dir_x = -1.0f;
+ }
+ else if(rotAndTransTri_pos_x < -3.5f){
+ rotAndTransTri_dir_x = 1.0f;
+ }
+ }
+
+ private void initMatrices() {
+ D3DMatrix view_matrix = new D3DMatrix();
+ D3DMatrix projection_matrix = new D3DMatrix();
+ D3DVector eye_vector = new D3DVector();
+ D3DVector lookat_vector = new D3DVector();
+ D3DVector up_vector = new D3DVector();
+ D3DMatrix world_matrix = new D3DMatrix();
+ float aspect;
+
+ // Here we build our View Matrix, think of it as our camera.
+
+ // First we specify that our viewpoint is 8 units back on the Z-axis
+ eye_vector.x = 0.0f;
+ eye_vector.y = 0.0f;
+ eye_vector.z = -8.0f;
+
+ // We are looking towards the origin
+ lookat_vector.x = 0.0f;
+ lookat_vector.y = 0.0f;
+ lookat_vector.z = 0.0f;
+
+ // The "up" direction is the positive direction on the y-axis
+ up_vector.x = 0.0f;
+ up_vector.y = 1.0f;
+ up_vector.z = 0.0f;
+
+ D3DUtil.D3DXMatrixLookAtLH(view_matrix, eye_vector, lookat_vector,
+ up_vector);
+
+ // Since our 'camera' will never move, we can set this once at the
+ // beginning and never worry about it again
+ iDirect3DDevice9.setTransform(Direct3DConstants.D3DTS_VIEW, view_matrix);
+
+ aspect = ((float) WIDTH / (float) WIDTH);
+
+ D3DUtil.D3DXMatrixPerspectiveFovLH(projection_matrix, // Result Matrix
+ (float) Math.PI / 4, // Field of View, in radians.
+ aspect, // Aspect ratio
+ 1.0f, // Near view plane
+ 100.0f); // Far view plane
+
+ // Our Projection matrix won't change either, so we set it now and never
+ // touch
+ // it again.
+ iDirect3DDevice9.setTransform(Direct3DConstants.D3DTS_PROJECTION,
+ projection_matrix);
+
+ // The World Matrix transforms Model Coordinates into World Space
+ // coordinates.
+ // Setting it to Identity means there is no transformation, so Model
+ // Space is directly
+ // mapped onto World Space.
+ D3DUtil.D3DXMatrixIdentity(world_matrix);
+ iDirect3DDevice9.setTransform(Direct3DConstants.D3DTS_WORLD,
+ world_matrix);
+ }
+
+ public static void main(String args[]) {
+ new DrunkenHyenaWorldTransform().run();
+ System.exit(0);
+ }
+}
Added: trunk/LWJGL/src/java/org/lwjgl/test/d3d/IDirect3D9Test.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/test/d3d/IDirect3D9Test.java (rev 0)
+++ trunk/LWJGL/src/java/org/lwjgl/test/d3d/IDirect3D9Test.java 2007-08-22 23:11:27 UTC (rev 2883)
@@ -0,0 +1,126 @@
+package org.lwjgl.test.d3d;
+
+import java.nio.ByteBuffer;
+import java.nio.ByteOrder;
+
+import org.lwjgl.LWJGLException;
+import org.lwjgl.d3d.D3DAdapterIdentifier9;
+import org.lwjgl.d3d.D3DCaps9;
+import org.lwjgl.d3d.D3DDisplaymode;
+import org.lwjgl.d3d.D3DPresentParameters;
+import org.lwjgl.d3d.Direct3DConstants;
+import org.lwjgl.d3d.Display;
+import org.lwjgl.d3d.DisplayMode;
+import org.lwjgl.d3d.IDirect3D9;
+import org.lwjgl.d3d.IDirect3DDevice9;
+import org.lwjgl.input.Keyboard;
+
+public class IDirect3D9Test {
+ public IDirect3D9Test() {
+
+ }
+
+ public void run() {
+ try {
+ DisplayMode[] modes = Display.getAvailableDisplayModes();
+ for (int i = 0; i < modes.length; i++) {
+ if (modes[i].getWidth() == 800 && modes[i].getHeight() == 600 && modes[i].getBitsPerPixel() >= 32 && modes[i].getFrequency() <= 75) {
+ try {
+ Display.setDisplayMode(modes[i]);
+ } catch (LWJGLException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+ Display.create();
+ }
+ catch(Exception e) {
+ e.printStackTrace();
+ }
+ IDirect3D9 iDirect3D9 = IDirect3D9.create();
+ System.out.println("pointer to IDirect3D9 = " + iDirect3D9.getIDirect3D9());
+ System.out.println(" adapter count = " + iDirect3D9.getAdapterCount());
+//
+// D3DDisplaymode displaymode = new D3DDisplaymode();
+// displaymode.Width = 1024;
+// displaymode.Height = 768;
+// displaymode.RefreshRate = 85;
+// displaymode.Format = Direct3DConstants.D3DFMT_X8R8G8B8;
+// System.out.println("enumAdapterModes = " + iDirect3D9.enumAdapterModes(
+// Direct3DConstants.D3DADAPTER_DEFAULT, Direct3DConstants.D3DFMT_X8R8G8B8, 0, displaymode));
+// displaymode = new D3DDisplaymode();
+// System.out.println("getAdapterDisplayMode = " + iDirect3D9.getAdapterDisplayMode(
+// Direct3DConstants.D3DADAPTER_DEFAULT, displaymode));
+// System.out.println(displaymode);
+//
+// D3DAdapterIdentifier9 identifier = new D3DAdapterIdentifier9();
+// System.out.println("getAdapterIdentifier = " + iDirect3D9.getAdapterIdentifier(
+// Direct3DConstants.D3DADAPTER_DEFAULT, 0, identifier));
+// System.out.println(identifier);
+//
+// System.out.println("getAdapterModeCount = " + iDirect3D9.getAdapterModeCount(
+// Direct3DConstants.D3DADAPTER_DEFAULT, Direct3DConstants.D3DFMT_X8R8G8B8));
+//
+// D3DCaps9 caps = new D3DCaps9();
+// System.out.println("getDeviceCaps = " + iDirect3D9.getDeviceCaps(
+// Direct3DConstants.D3DADAPTER_DEFAULT, Direct3DConstants.D3DDEVTYPE_HAL, caps));
+// System.out.println(caps);
+
+ D3DPresentParameters params = new D3DPresentParameters();
+ params.Windowed = true;
+ params.BackBufferCount = 1;
+ params.SwapEffect = Direct3DConstants.D3DSWAPEFFECT_FLIP;
+ params.BackBufferFormat = Direct3DConstants.D3DFMT_UNKNOWN;
+ IDirect3DDevice9 iDirect3DDevice9 = new IDirect3DDevice9();
+
+ System.out.println("createDevice = " + iDirect3D9.createDevice(Direct3DConstants.D3DADAPTER_DEFAULT, Direct3DConstants.D3DDEVTYPE_HAL,
+ Display.getHwnd(), Direct3DConstants.D3DCREATE_SOFTWARE_VERTEXPROCESSING, params, iDirect3DDevice9));
+ System.out.println("pointer to iDirect3DDevice9 = " + iDirect3DDevice9.getIDirect3DDevice9());
+
+ try {
+ Keyboard.create();
+ }
+ catch(LWJGLException e) {
+ e.printStackTrace();
+ }
+
+ ByteBuffer vertex = ByteBuffer.allocateDirect(60);
+ vertex.order(ByteOrder.nativeOrder());
+ vertex.putFloat(800.0f / 2.0f);
+ vertex.putFloat(100.0f);
+ vertex.putFloat(1.0f);
+ vertex.putFloat(1.0f);
+ vertex.putInt(0xffffffff);
+ vertex.putFloat(800.0f * 3.0f / 4.0f);
+ vertex.putFloat(350.0f);
+ vertex.putFloat(1.0f);
+ vertex.putFloat(1.0f);
+ vertex.putInt(0xffffffff);
+ vertex.putFloat(800.0f / 4.0f);
+ vertex.putFloat(350.0f);
+ vertex.putFloat(1.0f);
+ vertex.putFloat(1.0f);
+ vertex.putInt(0xffffffff);
+ while(Keyboard.getEventKey() != Keyboard.KEY_ESCAPE || Display.isCloseRequested()) {
+ iDirect3DDevice9.beginScene();
+ iDirect3DDevice9.clear(0, null, Direct3DConstants.D3DCLEAR_TARGET, 0, 1.0f, 0);
+ iDirect3DDevice9.setFVF(Direct3DConstants.D3DFVF_XYZRHW | Direct3DConstants.D3DFVF_DIFFUSE);
+ iDirect3DDevice9.drawPrimitiveUP(Direct3DConstants.D3DPT_TRIANGLELIST, 1, vertex, 20);
+ iDirect3DDevice9.endScene();
+ iDirect3DDevice9.present(null, null, 0, null);
+ Display.update();
+ try {
+ Thread.sleep(100);
+ }
+ catch(Exception e) {}
+ }
+
+ iDirect3DDevice9.release();
+ iDirect3D9.release();
+ Display.destroy();
+ }
+ public static void main(String args[]) {
+ new IDirect3D9Test().run();
+ System.exit(0);
+ }
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cap...@us...> - 2007-08-22 23:11:05
|
Revision: 2882
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=2882&view=rev
Author: captainjester
Date: 2007-08-22 16:11:02 -0700 (Wed, 22 Aug 2007)
Log Message:
-----------
First commit of Direct3D extension.
Added Paths:
-----------
trunk/LWJGL/src/java/org/lwjgl/d3d/
trunk/LWJGL/src/java/org/lwjgl/d3d/Context.java
trunk/LWJGL/src/java/org/lwjgl/d3d/ContextImplementation.java
trunk/LWJGL/src/java/org/lwjgl/d3d/D3DAdapterIdentifier9.java
trunk/LWJGL/src/java/org/lwjgl/d3d/D3DBox.java
trunk/LWJGL/src/java/org/lwjgl/d3d/D3DCaps9.java
trunk/LWJGL/src/java/org/lwjgl/d3d/D3DClipStatus9.java
trunk/LWJGL/src/java/org/lwjgl/d3d/D3DColorValue.java
trunk/LWJGL/src/java/org/lwjgl/d3d/D3DDeviceCreationParameters.java
trunk/LWJGL/src/java/org/lwjgl/d3d/D3DDisplaymode.java
trunk/LWJGL/src/java/org/lwjgl/d3d/D3DDisplaymodeEx.java
trunk/LWJGL/src/java/org/lwjgl/d3d/D3DDisplaymodeFilter.java
trunk/LWJGL/src/java/org/lwjgl/d3d/D3DGammaRamp.java
trunk/LWJGL/src/java/org/lwjgl/d3d/D3DIndexBufferDesc.java
trunk/LWJGL/src/java/org/lwjgl/d3d/D3DLight9.java
trunk/LWJGL/src/java/org/lwjgl/d3d/D3DLockedBox.java
trunk/LWJGL/src/java/org/lwjgl/d3d/D3DLockedRect.java
trunk/LWJGL/src/java/org/lwjgl/d3d/D3DMaterial9.java
trunk/LWJGL/src/java/org/lwjgl/d3d/D3DMatrix.java
trunk/LWJGL/src/java/org/lwjgl/d3d/D3DPShaderCaps2_0.java
trunk/LWJGL/src/java/org/lwjgl/d3d/D3DPresentParameters.java
trunk/LWJGL/src/java/org/lwjgl/d3d/D3DPresentStats.java
trunk/LWJGL/src/java/org/lwjgl/d3d/D3DRasterStatus.java
trunk/LWJGL/src/java/org/lwjgl/d3d/D3DRectPatchInfo.java
trunk/LWJGL/src/java/org/lwjgl/d3d/D3DRegionData.java
trunk/LWJGL/src/java/org/lwjgl/d3d/D3DRegionDataHeader.java
trunk/LWJGL/src/java/org/lwjgl/d3d/D3DSsurfaceDesc.java
trunk/LWJGL/src/java/org/lwjgl/d3d/D3DSurfaceDesc.java
trunk/LWJGL/src/java/org/lwjgl/d3d/D3DTriPatchInfo.java
trunk/LWJGL/src/java/org/lwjgl/d3d/D3DUtil.java
trunk/LWJGL/src/java/org/lwjgl/d3d/D3DVShaderCaps2_0.java
trunk/LWJGL/src/java/org/lwjgl/d3d/D3DVector.java
trunk/LWJGL/src/java/org/lwjgl/d3d/D3DVertexBufferDesc.java
trunk/LWJGL/src/java/org/lwjgl/d3d/D3DVertexElement9.java
trunk/LWJGL/src/java/org/lwjgl/d3d/D3DViewport9.java
trunk/LWJGL/src/java/org/lwjgl/d3d/D3DVolumeDesc.java
trunk/LWJGL/src/java/org/lwjgl/d3d/Direct3DConstants.java
trunk/LWJGL/src/java/org/lwjgl/d3d/Display.java
trunk/LWJGL/src/java/org/lwjgl/d3d/DisplayImplementation.java
trunk/LWJGL/src/java/org/lwjgl/d3d/DisplayMode.java
trunk/LWJGL/src/java/org/lwjgl/d3d/Drawable.java
trunk/LWJGL/src/java/org/lwjgl/d3d/EventQueue.java
trunk/LWJGL/src/java/org/lwjgl/d3d/GUID.java
trunk/LWJGL/src/java/org/lwjgl/d3d/GlobalLock.java
trunk/LWJGL/src/java/org/lwjgl/d3d/IDirect3D9.java
trunk/LWJGL/src/java/org/lwjgl/d3d/IDirect3D9Ex.java
trunk/LWJGL/src/java/org/lwjgl/d3d/IDirect3DBaseTexture9.java
trunk/LWJGL/src/java/org/lwjgl/d3d/IDirect3DCubeTexture9.java
trunk/LWJGL/src/java/org/lwjgl/d3d/IDirect3DDevice9.java
trunk/LWJGL/src/java/org/lwjgl/d3d/IDirect3DDevice9Ex.java
trunk/LWJGL/src/java/org/lwjgl/d3d/IDirect3DIndexBuffer9.java
trunk/LWJGL/src/java/org/lwjgl/d3d/IDirect3DPixelShader9.java
trunk/LWJGL/src/java/org/lwjgl/d3d/IDirect3DQuery9.java
trunk/LWJGL/src/java/org/lwjgl/d3d/IDirect3DResource9.java
trunk/LWJGL/src/java/org/lwjgl/d3d/IDirect3DStateBlock9.java
trunk/LWJGL/src/java/org/lwjgl/d3d/IDirect3DSurface9.java
trunk/LWJGL/src/java/org/lwjgl/d3d/IDirect3DSwapChain9.java
trunk/LWJGL/src/java/org/lwjgl/d3d/IDirect3DSwapChain9Ex.java
trunk/LWJGL/src/java/org/lwjgl/d3d/IDirect3DTexture9.java
trunk/LWJGL/src/java/org/lwjgl/d3d/IDirect3DVertexBuffer9.java
trunk/LWJGL/src/java/org/lwjgl/d3d/IDirect3DVertexDeclaration9.java
trunk/LWJGL/src/java/org/lwjgl/d3d/IDirect3DVertexShader9.java
trunk/LWJGL/src/java/org/lwjgl/d3d/IDirect3DVolume9.java
trunk/LWJGL/src/java/org/lwjgl/d3d/IDirect3DVolumeTexture9.java
trunk/LWJGL/src/java/org/lwjgl/d3d/InputImplementation.java
trunk/LWJGL/src/java/org/lwjgl/d3d/LUID.java
trunk/LWJGL/src/java/org/lwjgl/d3d/NewDisplay.java
trunk/LWJGL/src/java/org/lwjgl/d3d/PaletteEntry.java
trunk/LWJGL/src/java/org/lwjgl/d3d/PeerInfo.java
trunk/LWJGL/src/java/org/lwjgl/d3d/PixelFormat.java
trunk/LWJGL/src/java/org/lwjgl/d3d/Point.java
trunk/LWJGL/src/java/org/lwjgl/d3d/Rectangle.java
trunk/LWJGL/src/java/org/lwjgl/d3d/RegionData.java
trunk/LWJGL/src/java/org/lwjgl/d3d/RegionDataHeader.java
trunk/LWJGL/src/java/org/lwjgl/d3d/WindowsContextImplementation.java
trunk/LWJGL/src/java/org/lwjgl/d3d/WindowsDirectInput.java
trunk/LWJGL/src/java/org/lwjgl/d3d/WindowsDirectInput3.java
trunk/LWJGL/src/java/org/lwjgl/d3d/WindowsDirectInput8.java
trunk/LWJGL/src/java/org/lwjgl/d3d/WindowsDirectInputDevice.java
trunk/LWJGL/src/java/org/lwjgl/d3d/WindowsDirectInputDevice3.java
trunk/LWJGL/src/java/org/lwjgl/d3d/WindowsDirectInputDevice8.java
trunk/LWJGL/src/java/org/lwjgl/d3d/WindowsDirectInputDeviceObjectCallback.java
trunk/LWJGL/src/java/org/lwjgl/d3d/WindowsDisplay.java
trunk/LWJGL/src/java/org/lwjgl/d3d/WindowsDisplayPeerInfo.java
trunk/LWJGL/src/java/org/lwjgl/d3d/WindowsFileVersion.java
trunk/LWJGL/src/java/org/lwjgl/d3d/WindowsKeyboard.java
trunk/LWJGL/src/java/org/lwjgl/d3d/WindowsKeycodes.java
trunk/LWJGL/src/java/org/lwjgl/d3d/WindowsMouse.java
trunk/LWJGL/src/java/org/lwjgl/d3d/WindowsPeerInfo.java
trunk/LWJGL/src/java/org/lwjgl/d3d/WindowsRegistry.java
Added: trunk/LWJGL/src/java/org/lwjgl/d3d/Context.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/d3d/Context.java (rev 0)
+++ trunk/LWJGL/src/java/org/lwjgl/d3d/Context.java 2007-08-22 23:11:02 UTC (rev 2882)
@@ -0,0 +1,253 @@
+/*
+ * Copyright (c) 2002-2004 LWJGL Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * * Neither the name of 'LWJGL' nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package org.lwjgl.d3d;
+
+import java.nio.ByteBuffer;
+
+import org.lwjgl.LWJGLException;
+import org.lwjgl.LWJGLUtil;
+import org.lwjgl.Sys;
+
+/**
+ * <p/>
+ * Context encapsulates an OpenGL context.
+ * <p/>
+ *
+ * This class is thread-safe.
+ *
+ * @author elias_naur <eli...@us...>
+ * @version $Revision: 2730 $
+ * $Id: Context.java 2730 2007-01-17 12:58:38Z elias_naur $
+ */
+final class Context {
+ /**
+ * The platform specific implementation of context methods
+ */
+ private final static ContextImplementation implementation;
+
+ /** The current Context */
+ private final static ThreadLocal current_context_local = new ThreadLocal();
+
+ /**
+ * Handle to the native GL rendering context
+ */
+ private final ByteBuffer handle;
+ private final PeerInfo peer_info;
+
+ /** Whether the context has been destroyed */
+ private boolean destroyed;
+
+ private boolean destroy_requested;
+
+ /** The thread that has this context current, or null. */
+ private Thread thread;
+
+ static {
+ Sys.initialize();
+ implementation = createImplementation();
+ }
+
+ private static ContextImplementation createImplementation() {
+ switch (LWJGLUtil.getPlatform()) {
+ case LWJGLUtil.PLATFORM_WINDOWS:
+ return new WindowsContextImplementation();
+ default:
+ throw new IllegalStateException("Unsupported platform");
+ }
+ }
+
+ PeerInfo getPeerInfo() {
+ return peer_info;
+ }
+
+ static Context getCurrentContext() {
+ return (Context)current_context_local.get();
+ }
+
+ /**
+ * Create a context with the specified peer info and shared context
+ */
+ public Context(PeerInfo peer_info, Context shared_context) throws LWJGLException {
+ Context context_lock = shared_context != null ? shared_context : this;
+ // If shared_context is not null, synchronize on it to make sure it is not deleted
+ // while this context is created. Otherwise, simply synchronize on ourself to avoid NPE
+ synchronized (context_lock) {
+ if (shared_context != null && shared_context.destroyed)
+ throw new IllegalArgumentException("Shared context is destroyed");
+// GLContext.loadOpenGLLibrary();
+ try {
+ this.peer_info = peer_info;
+ this.handle = implementation.create(peer_info, shared_context != null ? shared_context.handle : null);
+ } catch (LWJGLException e) {
+// GLContext.unloadOpenGLLibrary();
+ throw e;
+ }
+ }
+ }
+
+ /**
+ * Release the current context (if any). After this call, no context is current.
+ */
+ public static void releaseCurrentContext() throws LWJGLException {
+ Context current_context = getCurrentContext();
+ if (current_context != null) {
+ implementation.releaseCurrentContext();
+// GLContext.useContext(null);
+ current_context_local.set(null);
+ synchronized (current_context) {
+ current_context.thread = null;
+ current_context.checkDestroy();
+ }
+ }
+ }
+
+ /**
+ * Release the context from its drawable. This is necessary on some platforms,
+ * like Mac OS X, where binding the context to a drawable and binding the context
+ * for rendering are two distinct actions and where calling releaseDrawable
+ * on every releaseCurrentContext results in artifacts.
+ */
+ public synchronized void releaseDrawable() throws LWJGLException {
+ if (destroyed)
+ throw new IllegalStateException("Context is destroyed");
+ implementation.releaseDrawable(getHandle());
+ }
+
+ /**
+ * Update the context. Should be called whenever it's drawable is moved or resized
+ */
+ public synchronized void update() {
+ if (destroyed)
+ throw new IllegalStateException("Context is destroyed");
+ implementation.update(getHandle());
+ }
+
+ /**
+ * Swap the buffers on the current context. Only valid for double-buffered contexts
+ */
+ public static void swapBuffers(PeerInfo peerInfo) throws LWJGLException {
+ implementation.swapBuffers(peerInfo);
+ }
+
+ private boolean canAccess() {
+ return thread == null || Thread.currentThread() == thread;
+ }
+
+ private void checkAccess() {
+ if (!canAccess())
+ throw new IllegalStateException("From thread " + Thread.currentThread() + ": " + thread + " already has the context current");
+ }
+
+ /**
+ * Make the context current
+ */
+ public synchronized void makeCurrent() throws LWJGLException {
+ checkAccess();
+ if (destroyed)
+ throw new IllegalStateException("Context is destroyed");
+ thread = Thread.currentThread();
+ current_context_local.set(this);
+ implementation.makeCurrent(peer_info, handle);
+// GLContext.useContext(this);
+ }
+
+ ByteBuffer getHandle() {
+ return handle;
+ }
+
+ /**
+ * Query whether the context is current
+ */
+ public synchronized boolean isCurrent() throws LWJGLException {
+ if (destroyed)
+ throw new IllegalStateException("Context is destroyed");
+ return implementation.isCurrent(handle);
+ }
+
+ private void checkDestroy() {
+ if (!destroyed && destroy_requested) {
+ try {
+ releaseDrawable();
+ implementation.destroy(peer_info, handle);
+ destroyed = true;
+ thread = null;
+// GLContext.unloadOpenGLLibrary();
+ } catch (LWJGLException e) {
+ LWJGLUtil.log("Exception occurred while destroying context: " + e);
+ }
+ }
+ }
+
+ /**
+ * Set the buffer swap interval. This call is a best-attempt at changing
+ * the monitor swap interval, which is the minimum periodicity of color buffer swaps,
+ * measured in video frame periods, and is not guaranteed to be successful.
+ *
+ * A video frame period is the time required to display a full frame of video data.
+ *
+ * @param sync true to synchronize; false to ignore synchronization
+ */
+ public static void setSwapInterval(int value) {
+ implementation.setSwapInterval(value);
+ }
+
+
+ /**
+ * Destroy the context. This method behaves the same as destroy() with the extra
+ * requirement that the context must be either current to the current thread or not
+ * current at all.
+ */
+ public synchronized void forceDestroy() throws LWJGLException {
+ checkAccess();
+ destroy();
+ }
+
+ /**
+ * Request destruction of the Context. If the context is current, no context will be current after this call.
+ * The context is destroyed when no thread has it current.
+ */
+ public synchronized void destroy() throws LWJGLException {
+ if (destroyed)
+ return;
+ destroy_requested = true;
+ boolean was_current = isCurrent();
+// int error = GL11.GL_NO_ERROR;
+ if (was_current) {
+// if (GLContext.getCapabilities() != null && GLContext.getCapabilities().OpenGL11)
+// error = GL11.glGetError();
+ releaseCurrentContext();
+ }
+ checkDestroy();
+// if (was_current && error != GL11.GL_NO_ERROR)
+// throw new OpenGLException(error);
+ }
+}
Added: trunk/LWJGL/src/java/org/lwjgl/d3d/ContextImplementation.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/d3d/ContextImplementation.java (rev 0)
+++ trunk/LWJGL/src/java/org/lwjgl/d3d/ContextImplementation.java 2007-08-22 23:11:02 UTC (rev 2882)
@@ -0,0 +1,89 @@
+/*
+ * Copyright (c) 2002-2004 LWJGL Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * * Neither the name of 'LWJGL' nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package org.lwjgl.d3d;
+
+import java.nio.ByteBuffer;
+
+import org.lwjgl.LWJGLException;
+
+/**
+ * <p/>
+ * Context implementation interface.
+ * <p/>
+ *
+ * @author elias_naur <eli...@us...>
+ * @version $Revision: 2356 $
+ * $Id: ContextImplementation.java 2356 2006-06-07 06:35:52Z elias_naur $
+ */
+interface ContextImplementation {
+ /**
+ * Create a context.
+ */
+ public ByteBuffer create(PeerInfo peer_info, ByteBuffer shared_context_handle) throws LWJGLException;
+
+ /**
+ * Swap the buffers of the current context. Only valid for double-buffered contexts.
+ */
+ public void swapBuffers(PeerInfo peerInfo) throws LWJGLException;
+
+ /**
+ * Release the context from its drawable, if any.
+ */
+ public void releaseDrawable(ByteBuffer context_handle) throws LWJGLException;
+
+ /**
+ * Release the current context (if any). After this call, no context is current.
+ */
+ public void releaseCurrentContext() throws LWJGLException;
+
+ /**
+ * Update the context. Should be called whenever it's drawable is moved or resized
+ */
+ public void update(ByteBuffer context_handle);
+
+ /**
+ * Query whether the context is current
+ */
+ public void makeCurrent(PeerInfo peer_info, ByteBuffer handle) throws LWJGLException;
+
+ /**
+ * Query whether the context is current
+ */
+ public boolean isCurrent(ByteBuffer handle) throws LWJGLException;
+
+ public void setSwapInterval(int value);
+
+ /**
+ * Destroys the Context.
+ */
+ public void destroy(PeerInfo peer_info, ByteBuffer handle) throws LWJGLException;
+}
Added: trunk/LWJGL/src/java/org/lwjgl/d3d/D3DAdapterIdentifier9.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/d3d/D3DAdapterIdentifier9.java (rev 0)
+++ trunk/LWJGL/src/java/org/lwjgl/d3d/D3DAdapterIdentifier9.java 2007-08-22 23:11:02 UTC (rev 2882)
@@ -0,0 +1,81 @@
+package org.lwjgl.d3d;
+
+import java.nio.ByteBuffer;
+import java.nio.ByteOrder;
+
+public class D3DAdapterIdentifier9 {
+ public byte Driver[] = new byte[Direct3DConstants.MAX_DEVICE_IDENTIFIER_STRING];//512 char [MAX_DEVICE_IDENTIFIER_STRING]
+ public byte Description[] = new byte[Direct3DConstants.MAX_DEVICE_IDENTIFIER_STRING];//512 char [MAX_DEVICE_IDENTIFIER_STRING]
+ public byte DeviceName[] = new byte[32]; //32 char [32]
+ public long DriverVersion; //8 LARGE_INTEGER
+ public long VendorId; //4 DWORD
+ public long DeviceId; //4 DWORD
+ public long SubSysId; //4 DWORD
+ public long Revision; //4 DWORD
+ public GUID DeviceIdentifier = new GUID(); //16 GUID
+ public long WHQLLevel; //4 DWORD
+ private static final int D3D_ADAPTER_IDENTIFIER_BYTE_SIZE = 1100;
+ private ByteBuffer buffer;
+
+ public D3DAdapterIdentifier9() {
+ buffer = ByteBuffer.allocateDirect(D3D_ADAPTER_IDENTIFIER_BYTE_SIZE);
+ buffer.order(ByteOrder.nativeOrder());
+ }
+
+ public ByteBuffer getEmptyBuffer() {
+ buffer.rewind();
+
+ return buffer;
+ }
+
+ public ByteBuffer getBuffer() {
+ buffer.rewind();
+ buffer.put(Driver);
+ buffer.put(Description);
+ buffer.put(DeviceName);
+ buffer.putLong(DriverVersion);
+ buffer.putInt((int)VendorId);
+ buffer.putInt((int)DeviceId);
+ buffer.putInt((int)SubSysId);
+ buffer.putInt((int)Revision);
+ buffer.putInt((int)DeviceIdentifier.Data1);
+ buffer.putShort(DeviceIdentifier.Data2);
+ buffer.putShort(DeviceIdentifier.Data3);
+ buffer.put(DeviceIdentifier.Data4);
+ buffer.putInt((int)WHQLLevel);
+ buffer.rewind();
+
+ return buffer;
+ }
+
+ public void setBuffer(ByteBuffer buffer) {
+ buffer.rewind();
+ buffer.get(Driver);
+ buffer.get(Description);
+ buffer.get(DeviceName);
+ DriverVersion = buffer.getLong();
+ VendorId = buffer.getInt();
+ DeviceId = buffer.getInt();
+ SubSysId = buffer.getInt();
+ Revision = buffer.getInt();
+ DeviceIdentifier.Data1 = buffer.getInt();
+ DeviceIdentifier.Data2 = buffer.getShort();
+ DeviceIdentifier.Data3 = buffer.getShort();
+ buffer.get(DeviceIdentifier.Data4);
+ WHQLLevel = buffer.getInt();
+ }
+
+ public String toString() {
+ return
+ "\n Driver = " + new String(Driver) +
+ "\n Description = " + new String(Description) +
+ "\n DeviceName = " + new String(DeviceName) +
+ "\nDriverVersion = " + DriverVersion +
+ "\n VendorId = " + VendorId +
+ "\n DeviceId = " + DeviceId +
+ "\n SubSysId = " + SubSysId +
+ "\n Revision = " + Revision +
+ "\n WHQLLevel = " + WHQLLevel +
+ DeviceIdentifier;
+ }
+}
\ No newline at end of file
Added: trunk/LWJGL/src/java/org/lwjgl/d3d/D3DBox.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/d3d/D3DBox.java (rev 0)
+++ trunk/LWJGL/src/java/org/lwjgl/d3d/D3DBox.java 2007-08-22 23:11:02 UTC (rev 2882)
@@ -0,0 +1,10 @@
+package org.lwjgl.d3d;
+
+public class D3DBox {
+ public int Left; //UINT
+ public int Top; //UINT
+ public int Right; //UINT
+ public int Bottom; //UINT
+ public int Front; //UINT
+ public int Back; //UINT
+}
Added: trunk/LWJGL/src/java/org/lwjgl/d3d/D3DCaps9.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/d3d/D3DCaps9.java (rev 0)
+++ trunk/LWJGL/src/java/org/lwjgl/d3d/D3DCaps9.java 2007-08-22 23:11:02 UTC (rev 2882)
@@ -0,0 +1,327 @@
+package org.lwjgl.d3d;
+
+import java.nio.ByteBuffer;
+import java.nio.ByteOrder;
+
+public class D3DCaps9 {
+ public int DeviceType; //4 D3DDEVTYPE
+ public int AdapterOrdinal; //4 UINT
+ public long Caps; //4 DWORD
+ public long Caps2; //4 DWORD
+ public long Caps3; //4 DWORD
+ public long PresentationIntervals; //4 DWORD
+ public long CursorCaps; //4 DWORD
+ public long DevCaps; //4 DWORD
+ public long PrimitiveMiscCaps; //4 DWORD
+ public long RasterCaps; //4 DWORD
+ public long ZCmpCaps; //4 DWORD
+ public long SrcBlendCaps; //4 DWORD
+ public long DestBlendCaps; //4 DWORD
+ public long AlphaCmpCaps; //4 DWORD
+ public long ShadeCaps; //4 DWORD
+ public long TextureCaps; //4 DWORD
+ public long TextureFilterCaps; //4 DWORD
+ public long CubeTextureFilterCaps; //4 DWORD
+ public long VolumeTextureFilterCaps; //4 DWORD
+ public long TextureAddressCaps; //4 DWORD
+ public long VolumeTextureAddressCaps; //4 DWORD
+ public long LineCaps; //4 DWORD
+ public long MaxTextureWidth; //4 DWORD
+ public long MaxTextureHeight; //4 DWORD
+ public long MaxVolumeExtent; //4 DWORD
+ public long MaxTextureRepeat; //4 DWORD
+ public long MaxTextureAspectRatio; //4 DWORD
+ public long MaxAnisotropy; //4 DWORD
+ public float MaxVertexW; //4
+ public float GuardBandLeft; //4
+ public float GuardBandTop; //4
+ public float GuardBandRight; //4
+ public float GuardBandBottom; //4
+ public float ExtentsAdjust; //4
+ public long StencilCaps; //4 DWORD
+ public long FVFCaps; //4 DWORD
+ public long TextureOpCaps; //4 DWORD
+ public long MaxTextureBlendStages; //4 DWORD
+ public long MaxSimultaneousTextures; //4 DWORD
+ public long VertexProcessingCaps; //4 DWORD
+ public long MaxActiveLights; //4 DWORD
+ public long MaxUserClipPlanes; //4 DWORD
+ public long MaxVertexBlendMatrices; //4 DWORD
+ public long MaxVertexBlendMatrixIndex; //4 DWORD
+ public float MaxPointSize; //4
+ public long MaxPrimitiveCount; //4 DWORD
+ public long MaxVertexIndex; //4 DWORD
+ public long MaxStreams; //4 DWORD
+ public long MaxStreamStride; //4 DWORD
+ public long VertexShaderVersion; //4 DWORD
+ public long MaxVertexShaderConst; //4 DWORD
+ public long PixelShaderVersion; //4 DWORD
+ public float PixelShader1xMaxValue; //4
+ public long DevCaps2; //4 DWORD
+ public float MaxNpatchTessellationLevel; //4
+ public long Reserved5; //4 DWORD
+ public int MasterAdapterOrdinal; //4 UINT
+ public int AdapterOrdinalInGroup; //4 UINT
+ public int NumberOfAdaptersInGroup; //4 UINT
+ public long DeclTypes; //4 DWORD
+ public long NumSimultaneousRTs; //4 DWORD
+ public long StretchRectFilterCaps; //4 DWORD
+ public D3DVShaderCaps2_0 VS20Caps = new D3DVShaderCaps2_0(); //16 D3DVSHADERCAPS2_0
+ public D3DPShaderCaps2_0 D3DPSHADERCAPS2_0 = new D3DPShaderCaps2_0(); //20 D3DPSHADERCAPS2_0
+ public long VertexTextureFilterCaps; //4 DWORD
+ public long MaxVShaderInstructionsExecuted; //4 DWORD
+ public long MaxPShaderInstructionsExecuted; //4 DWORD
+ public long MaxVertexShader30InstructionSlots; //4 DWORD
+ public long MaxPixelShader30InstructionSlots; //4 DWORD
+ private static final int D3D_CAPS_BYTE_SIZE = 304;
+
+ private ByteBuffer buffer;
+
+ public D3DCaps9() {
+ buffer = ByteBuffer.allocateDirect(D3D_CAPS_BYTE_SIZE);
+ buffer.order(ByteOrder.nativeOrder());
+ buffer.clear();
+ }
+
+ public ByteBuffer getEmptyBuffer() {
+ buffer.rewind();
+
+ return buffer;
+ }
+
+ public ByteBuffer getBuffer() {
+ buffer.rewind();
+ buffer.putInt(DeviceType);
+ buffer.putInt(AdapterOrdinal);
+ buffer.putInt((int)Caps);
+ buffer.putInt((int)Caps2);
+ buffer.putInt((int)Caps3);
+ buffer.putInt((int)PresentationIntervals);
+ buffer.putInt((int)CursorCaps);
+ buffer.putInt((int)DevCaps);
+ buffer.putInt((int)PrimitiveMiscCaps);
+ buffer.putInt((int)RasterCaps);
+ buffer.putInt((int)ZCmpCaps);
+ buffer.putInt((int)SrcBlendCaps);
+ buffer.putInt((int)DestBlendCaps);
+ buffer.putInt((int)AlphaCmpCaps);
+ buffer.putInt((int)ShadeCaps);
+ buffer.putInt((int)TextureCaps);
+ buffer.putInt((int)TextureFilterCaps);
+ buffer.putInt((int)CubeTextureFilterCaps);
+ buffer.putInt((int)VolumeTextureFilterCaps);
+ buffer.putInt((int)TextureAddressCaps);
+ buffer.putInt((int)VolumeTextureAddressCaps);
+ buffer.putInt((int)LineCaps);
+ buffer.putInt((int)MaxTextureWidth);
+ buffer.putInt((int)MaxTextureHeight);
+ buffer.putInt((int)MaxVolumeExtent);
+ buffer.putInt((int)MaxTextureRepeat);
+ buffer.putInt((int)MaxTextureAspectRatio);
+ buffer.putInt((int)MaxAnisotropy);
+ buffer.putFloat(MaxVertexW);
+ buffer.putFloat(GuardBandLeft);
+ buffer.putFloat(GuardBandTop);
+ buffer.putFloat(GuardBandRight);
+ buffer.putFloat(GuardBandBottom);
+ buffer.putFloat(ExtentsAdjust);
+ buffer.putInt((int)StencilCaps);
+ buffer.putInt((int)FVFCaps);
+ buffer.putInt((int)TextureOpCaps);
+ buffer.putInt((int)MaxTextureBlendStages);
+ buffer.putInt((int)MaxSimultaneousTextures);
+ buffer.putInt((int)VertexProcessingCaps);
+ buffer.putInt((int)MaxActiveLights);
+ buffer.putInt((int)MaxUserClipPlanes);
+ buffer.putInt((int)MaxVertexBlendMatrices);
+ buffer.putInt((int)MaxVertexBlendMatrixIndex);
+ buffer.putFloat(MaxPointSize);
+ buffer.putInt((int)MaxPrimitiveCount);
+ buffer.putInt((int)MaxVertexIndex);
+ buffer.putInt((int)MaxStreams);
+ buffer.putInt((int)MaxStreamStride);
+ buffer.putInt((int)VertexShaderVersion);
+ buffer.putInt((int)MaxVertexShaderConst);
+ buffer.putInt((int)PixelShaderVersion);
+ buffer.putFloat(PixelShader1xMaxValue);
+ buffer.putInt((int)DevCaps2);
+ buffer.putFloat(MaxNpatchTessellationLevel);
+ buffer.putInt((int)Reserved5);
+ buffer.putInt(MasterAdapterOrdinal);
+ buffer.putInt(AdapterOrdinalInGroup);
+ buffer.putInt(NumberOfAdaptersInGroup);
+ buffer.putInt((int)DeclTypes);
+ buffer.putInt((int)NumSimultaneousRTs);
+ buffer.putInt((int)StretchRectFilterCaps);
+ buffer.putInt((int)VS20Caps.Caps);
+ buffer.putInt(VS20Caps.DynamicFlowControlDepth);
+ buffer.putInt(VS20Caps.NumTemps);
+ buffer.putInt(VS20Caps.StaticFlowControlDepth);
+ buffer.putInt((int)D3DPSHADERCAPS2_0.Caps);
+ buffer.putInt(D3DPSHADERCAPS2_0.DynamicFlowControlDepth);
+ buffer.putInt(D3DPSHADERCAPS2_0.NumTemps);
+ buffer.putInt(D3DPSHADERCAPS2_0.StaticFlowControlDepth);
+ buffer.putInt(D3DPSHADERCAPS2_0.NumInstructionSlots);
+ buffer.putInt((int)VertexTextureFilterCaps);
+ buffer.putInt((int)MaxVShaderInstructionsExecuted);
+ buffer.putInt((int)MaxPShaderInstructionsExecuted);
+ buffer.putInt((int)MaxVertexShader30InstructionSlots);
+ buffer.putInt((int)MaxPixelShader30InstructionSlots);
+ buffer.rewind();
+
+ return buffer;
+ }
+
+ public void setBuffer(ByteBuffer buffer) {
+ buffer.rewind();
+ DeviceType = buffer.getInt();
+ AdapterOrdinal = buffer.getInt();
+ Caps = buffer.getInt();
+ Caps2 = buffer.getInt();
+ Caps3 = buffer.getInt();
+ PresentationIntervals = buffer.getInt();
+ CursorCaps = buffer.getInt();
+ DevCaps = buffer.getInt();
+ PrimitiveMiscCaps = buffer.getInt();
+ RasterCaps = buffer.getInt();
+ ZCmpCaps = buffer.getInt();
+ SrcBlendCaps = buffer.getInt();
+ DestBlendCaps = buffer.getInt();
+ AlphaCmpCaps = buffer.getInt();
+ ShadeCaps = buffer.getInt();
+ TextureCaps = buffer.getInt();
+ TextureFilterCaps = buffer.getInt();
+ CubeTextureFilterCaps = buffer.getInt();
+ VolumeTextureFilterCaps = buffer.getInt();
+ TextureAddressCaps = buffer.getInt();
+ VolumeTextureAddressCaps = buffer.getInt();
+ LineCaps = buffer.getInt();
+ MaxTextureWidth = buffer.getInt();
+ MaxTextureHeight = buffer.getInt();
+ MaxVolumeExtent = buffer.getInt();
+ MaxTextureRepeat = buffer.getInt();
+ MaxTextureAspectRatio = buffer.getInt();
+ MaxAnisotropy = buffer.getInt();
+ MaxVertexW = buffer.getFloat();
+ GuardBandLeft = buffer.getFloat();
+ GuardBandTop = buffer.getFloat();
+ GuardBandRight = buffer.getFloat();
+ GuardBandBottom = buffer.getFloat();
+ ExtentsAdjust = buffer.getFloat();
+ StencilCaps = buffer.getInt();
+ FVFCaps = buffer.getInt();
+ TextureOpCaps = buffer.getInt();
+ MaxTextureBlendStages = buffer.getInt();
+ MaxSimultaneousTextures = buffer.getInt();
+ VertexProcessingCaps = buffer.getInt();
+ MaxActiveLights = buffer.getInt();
+ MaxUserClipPlanes = buffer.getInt();
+ MaxVertexBlendMatrices = buffer.getInt();
+ MaxVertexBlendMatrixIndex = buffer.getInt();
+ MaxPointSize = buffer.getFloat();
+ MaxPrimitiveCount = buffer.getInt();
+ MaxVertexIndex = buffer.getInt();
+ MaxStreams = buffer.getInt();
+ MaxStreamStride = buffer.getInt();
+ VertexShaderVersion = buffer.getInt();
+ MaxVertexShaderConst = buffer.getInt();
+ PixelShaderVersion = buffer.getInt();
+ PixelShader1xMaxValue = buffer.getFloat();
+ DevCaps2 = buffer.getInt();
+ MaxNpatchTessellationLevel = buffer.getFloat();
+ Reserved5 = buffer.getInt();
+ MasterAdapterOrdinal = buffer.getInt();
+ AdapterOrdinalInGroup = buffer.getInt();
+ NumberOfAdaptersInGroup = buffer.getInt();
+ DeclTypes = buffer.getInt();
+ NumSimultaneousRTs = buffer.getInt();
+ StretchRectFilterCaps = buffer.getInt();
+ VS20Caps.Caps = buffer.getInt();
+ VS20Caps.DynamicFlowControlDepth = buffer.getInt();
+ VS20Caps.NumTemps = buffer.getInt();
+ VS20Caps.StaticFlowControlDepth = buffer.getInt();
+ D3DPSHADERCAPS2_0.Caps = buffer.getInt();
+ D3DPSHADERCAPS2_0.DynamicFlowControlDepth = buffer.getInt();
+ D3DPSHADERCAPS2_0.NumTemps = buffer.getInt();
+ D3DPSHADERCAPS2_0.StaticFlowControlDepth = buffer.getInt();
+ D3DPSHADERCAPS2_0.NumInstructionSlots = buffer.getInt();
+ VertexTextureFilterCaps = buffer.getInt();
+ MaxVShaderInstructionsExecuted = buffer.getInt();
+ MaxPShaderInstructionsExecuted = buffer.getInt();
+ MaxVertexShader30InstructionSlots = buffer.getInt() & 0x00000000ffffffffL;
+ MaxPixelShader30InstructionSlots = buffer.getInt();
+ }
+
+ public String toString() {
+ return
+ "\n DeviceType = " + DeviceType +
+ "\n AdapterOrdinal = " + AdapterOrdinal +
+ "\n Caps = " + Caps +
+ "\n Caps2 = " + Caps2 +
+ "\n Caps3 = " + Caps3 +
+ "\n PresentationIntervals = " + PresentationIntervals +
+ "\n CursorCaps = " + CursorCaps +
+ "\n DevCaps = " + DevCaps +
+ "\n PrimitiveMiscCaps = " + PrimitiveMiscCaps +
+ "\n RasterCaps = " + RasterCaps +
+ "\n ZCmpCaps = " + ZCmpCaps +
+ "\n SrcBlendCaps = " + SrcBlendCaps +
+ "\n DestBlendCaps = " + DestBlendCaps +
+ "\n AlphaCmpCaps = " + AlphaCmpCaps +
+ "\n ShadeCaps = " + ShadeCaps +
+ "\n TextureCaps = " + TextureCaps +
+ "\n TextureFilterCaps = " + TextureFilterCaps +
+ "\n CubeTextureFilterCaps = " + CubeTextureFilterCaps +
+ "\n VolumeTextureFilterCaps = " + VolumeTextureFilterCaps +
+ "\n TextureAddressCaps = " + TextureAddressCaps +
+ "\n VolumeTextureAddressCaps = " + VolumeTextureAddressCaps +
+ "\n LineCaps = " + LineCaps +
+ "\n MaxTextureWidth = " + MaxTextureWidth +
+ "\n MaxTextureHeight = " + MaxTextureHeight +
+ "\n MaxVolumeExtent = " + MaxVolumeExtent +
+ "\n MaxTextureRepeat = " + MaxTextureRepeat +
+ "\n MaxTextureAspectRatio = " + MaxTextureAspectRatio +
+ "\n MaxAnisotropy = " + MaxAnisotropy +
+ "\n MaxVertexW = " + MaxVertexW +
+ "\n GuardBandLeft = " + GuardBandLeft +
+ "\n GuardBandTop = " + GuardBandTop +
+ "\n GuardBandRight = " + GuardBandRight +
+ "\n GuardBandBottom = " + GuardBandBottom +
+ "\n ExtentsAdjust = " + ExtentsAdjust +
+ "\n StencilCaps = " + StencilCaps +
+ "\n FVFCaps = " + FVFCaps +
+ "\n TextureOpCaps = " + TextureOpCaps +
+ "\n MaxTextureBlendStages = " + MaxTextureBlendStages +
+ "\n MaxSimultaneousTextures = " + MaxSimultaneousTextures +
+ "\n VertexProcessingCaps = " + VertexProcessingCaps +
+ "\n MaxActiveLights = " + MaxActiveLights +
+ "\n MaxUserClipPlanes = " + MaxUserClipPlanes +
+ "\n MaxVertexBlendMatrices = " + MaxVertexBlendMatrices +
+ "\n MaxVertexBlendMatrixIndex = " + MaxVertexBlendMatrixIndex +
+ "\n MaxPointSize = " + MaxPointSize +
+ "\n MaxPrimitiveCount = " + MaxPrimitiveCount +
+ "\n MaxVertexIndex = " + MaxVertexIndex +
+ "\n MaxStreams = " + MaxStreams +
+ "\n MaxStreamStride = " + MaxStreamStride +
+ "\n VertexShaderVersion = " + VertexShaderVersion +
+ "\n MaxVertexShaderConst = " + MaxVertexShaderConst +
+ "\n PixelShaderVersion = " + PixelShaderVersion +
+ "\n PixelShader1xMaxValue = " + PixelShader1xMaxValue +
+ "\n DevCaps2 = " + DevCaps2 +
+ "\n MaxNpatchTessellationLevel = " + MaxNpatchTessellationLevel +
+ "\n Reserved5 = " + Reserved5 +
+ "\n MasterAdapterOrdinal = " + MasterAdapterOrdinal +
+ "\n AdapterOrdinalInGroup = " + AdapterOrdinalInGroup +
+ "\n NumberOfAdaptersInGroup = " + NumberOfAdaptersInGroup +
+ "\n DeclTypes = " + DeclTypes +
+ "\n NumSimultaneousRTs = " + NumSimultaneousRTs +
+ "\n StretchRectFilterCaps = " + StretchRectFilterCaps +
+ VS20Caps.toString() +
+ D3DPSHADERCAPS2_0.toString() +
+ "\n VertexTextureFilterCaps = " + VertexTextureFilterCaps +
+ "\n MaxVShaderInstructionsExecuted = " + MaxVShaderInstructionsExecuted +
+ "\n MaxPShaderInstructionsExecuted = " + MaxPShaderInstructionsExecuted +
+ "\nMaxVertexShader30InstructionSlots = " + MaxVertexShader30InstructionSlots +
+ "\n MaxPixelShader30InstructionSlots = " + MaxPixelShader30InstructionSlots;
+ }
+}
\ No newline at end of file
Added: trunk/LWJGL/src/java/org/lwjgl/d3d/D3DClipStatus9.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/d3d/D3DClipStatus9.java (rev 0)
+++ trunk/LWJGL/src/java/org/lwjgl/d3d/D3DClipStatus9.java 2007-08-22 23:11:02 UTC (rev 2882)
@@ -0,0 +1,42 @@
+package org.lwjgl.d3d;
+
+import java.nio.ByteBuffer;
+import java.nio.ByteOrder;
+
+public class D3DClipStatus9 {
+ public long ClipUnion; //4 DWORD
+ public long ClipIntersection; //4 DWORD
+ private static final int D3D_CLIP_STATUS_BYTE_SIZE = 8;
+
+ private ByteBuffer buffer;
+
+ public D3DClipStatus9() {
+ buffer = ByteBuffer.allocateDirect(D3D_CLIP_STATUS_BYTE_SIZE);
+ buffer.order(ByteOrder.nativeOrder());
+ buffer.clear();
+ }
+
+ public ByteBuffer getEmptyBuffer() {
+ buffer.rewind();
+
+ return buffer;
+ }
+
+ public ByteBuffer getBuffer() {
+ buffer.rewind();
+ buffer.putInt((int)ClipUnion);
+ buffer.putInt((int)ClipIntersection);
+
+ return buffer;
+ }
+ public void setBuffer(ByteBuffer buffer) {
+ buffer.rewind();
+ ClipUnion = buffer.getInt();
+ ClipIntersection = buffer.getInt();
+ }
+ public String toString() {
+ return
+ "\n ClipUnion = " + ClipUnion +
+ "\nClipIntersection = " + ClipIntersection;
+ }
+}
Added: trunk/LWJGL/src/java/org/lwjgl/d3d/D3DColorValue.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/d3d/D3DColorValue.java (rev 0)
+++ trunk/LWJGL/src/java/org/lwjgl/d3d/D3DColorValue.java 2007-08-22 23:11:02 UTC (rev 2882)
@@ -0,0 +1,44 @@
+package org.lwjgl.d3d;
+
+import java.nio.ByteBuffer;
+import java.nio.ByteOrder;
+
+public class D3DColorValue {
+ public float r;
+ public float g;
+ public float b;
+ public float a;
+
+ private static final int D3D_COLOR_VALUE_BYTE_SIZE = 16;
+ private ByteBuffer buffer;
+
+ public D3DColorValue() {
+ buffer = ByteBuffer.allocateDirect(D3D_COLOR_VALUE_BYTE_SIZE);
+ buffer.order(ByteOrder.nativeOrder());
+ }
+
+ public ByteBuffer getEmptyBuffer() {
+ buffer.rewind();
+
+ return buffer;
+ }
+
+ public ByteBuffer getBuffer() {
+ buffer.rewind();
+ buffer.putFloat(r);
+ buffer.putFloat(g);
+ buffer.putFloat(b);
+ buffer.putFloat(a);
+ buffer.rewind();
+
+ return buffer;
+ }
+
+ public void setBuffer(ByteBuffer buffer) {
+ buffer.rewind();
+ r = buffer.getFloat();
+ g = buffer.getFloat();
+ b = buffer.getFloat();
+ a = buffer.getFloat();
+ }
+}
Added: trunk/LWJGL/src/java/org/lwjgl/d3d/D3DDeviceCreationParameters.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/d3d/D3DDeviceCreationParameters.java (rev 0)
+++ trunk/LWJGL/src/java/org/lwjgl/d3d/D3DDeviceCreationParameters.java 2007-08-22 23:11:02 UTC (rev 2882)
@@ -0,0 +1,50 @@
+package org.lwjgl.d3d;
+
+import java.nio.ByteBuffer;
+import java.nio.ByteOrder;
+
+public class D3DDeviceCreationParameters {
+ public int AdapterOrdinal; //4 UINT
+ public int DeviceType; //4 D3DDEVTYPE
+ public long hFocusWindow; //4 HWND
+ public long BehaviorFlags; //4 DWORD
+ private static final int D3D_CREATION_PARAMETERS_STATUS_BYTE_SIZE = 16;
+
+ private ByteBuffer buffer;
+
+ public D3DDeviceCreationParameters() {
+ buffer = ByteBuffer.allocateDirect(D3D_CREATION_PARAMETERS_STATUS_BYTE_SIZE);
+ buffer.order(ByteOrder.nativeOrder());
+ buffer.clear();
+ }
+
+ public ByteBuffer getEmptyBuffer() {
+ buffer.rewind();
+
+ return buffer;
+ }
+
+ public ByteBuffer getBuffer() {
+ buffer.rewind();
+ buffer.putInt(AdapterOrdinal);
+ buffer.putInt(DeviceType);
+ buffer.putInt((int)hFocusWindow);
+ buffer.putInt((int)BehaviorFlags);
+
+ return buffer;
+ }
+ public void setBuffer(ByteBuffer buffer) {
+ buffer.rewind();
+ AdapterOrdinal = buffer.getInt();
+ DeviceType = buffer.getInt();
+ hFocusWindow = buffer.getInt();
+ BehaviorFlags = buffer.getInt();
+ }
+ public String toString() {
+ return
+ "\nAdapterOrdinal = " + AdapterOrdinal +
+ "\n DeviceType = " + DeviceType +
+ "\n hFocusWindow = " + hFocusWindow +
+ "\n BehaviorFlags = " + BehaviorFlags;
+ }
+}
Added: trunk/LWJGL/src/java/org/lwjgl/d3d/D3DDisplaymode.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/d3d/D3DDisplaymode.java (rev 0)
+++ trunk/LWJGL/src/java/org/lwjgl/d3d/D3DDisplaymode.java 2007-08-22 23:11:02 UTC (rev 2882)
@@ -0,0 +1,51 @@
+package org.lwjgl.d3d;
+
+import java.nio.ByteBuffer;
+import java.nio.ByteOrder;
+
+public class D3DDisplaymode {
+ public int Width; //4 UINT
+ public int Height; //4 UINT
+ public int RefreshRate; //4 UINT
+ public int Format; //4 D3DFORMAT
+ private static final int D3D_DISPLAYMODE_BYTE_SIZE = 16;
+ private ByteBuffer buffer;
+
+ public D3DDisplaymode() {
+ buffer = ByteBuffer.allocateDirect(D3D_DISPLAYMODE_BYTE_SIZE);
+ buffer.order(ByteOrder.nativeOrder());
+ }
+
+ public ByteBuffer getEmptyBuffer() {
+ buffer.rewind();
+
+ return buffer;
+ }
+
+ public ByteBuffer getBuffer() {
+ buffer.rewind();
+ buffer.putInt(Width);
+ buffer.putInt(Height);
+ buffer.putInt(RefreshRate);
+ buffer.putInt(Format);
+ buffer.rewind();
+
+ return buffer;
+ }
+
+ public void setBuffer(ByteBuffer buffer) {
+ buffer.rewind();
+ Width = buffer.getInt();
+ Height = buffer.getInt();
+ RefreshRate = buffer.getInt();
+ Format = buffer.getInt();
+ }
+
+ public String toString() {
+ return
+ "\n width = " + Width +
+ "\n height = " + Height +
+ "\nrefreshRate = " + RefreshRate +
+ "\n format = " + Format;
+ }
+}
\ No newline at end of file
Added: trunk/LWJGL/src/java/org/lwjgl/d3d/D3DDisplaymodeEx.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/d3d/D3DDisplaymodeEx.java (rev 0)
+++ trunk/LWJGL/src/java/org/lwjgl/d3d/D3DDisplaymodeEx.java 2007-08-22 23:11:02 UTC (rev 2882)
@@ -0,0 +1,11 @@
+package org.lwjgl.d3d;
+
+public class D3DDisplaymodeEx {
+ public int Size; //UINT
+ public int Width; //UINT
+ public int Height; //UINT
+ public int RefreshRate; //UINT
+ public int Format; //D3DFORMAT
+ public int ScanLineOrdering; //D3DSCANLINEORDERING
+
+}
Added: trunk/LWJGL/src/java/org/lwjgl/d3d/D3DDisplaymodeFilter.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/d3d/D3DDisplaymodeFilter.java (rev 0)
+++ trunk/LWJGL/src/java/org/lwjgl/d3d/D3DDisplaymodeFilter.java 2007-08-22 23:11:02 UTC (rev 2882)
@@ -0,0 +1,8 @@
+package org.lwjgl.d3d;
+
+public class D3DDisplaymodeFilter {
+ public int Size; //UINT
+ public int Format; //D3DFORMAT
+ public int ScanLineOrdering; //D3DSCANLINEORDERING
+
+}
Added: trunk/LWJGL/src/java/org/lwjgl/d3d/D3DGammaRamp.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/d3d/D3DGammaRamp.java (rev 0)
+++ trunk/LWJGL/src/java/org/lwjgl/d3d/D3DGammaRamp.java 2007-08-22 23:11:02 UTC (rev 2882)
@@ -0,0 +1,51 @@
+package org.lwjgl.d3d;
+
+import java.nio.ByteBuffer;
+import java.nio.ByteOrder;
+import java.nio.ShortBuffer;
+
+public class D3DGammaRamp {
+ private ByteBuffer redForNative = ByteBuffer.allocateDirect(512).order(ByteOrder.nativeOrder()); //2 WORD
+ private ByteBuffer greenForNative = ByteBuffer.allocateDirect(512).order(ByteOrder.nativeOrder()); //2 WORD
+ private ByteBuffer blueForNative = ByteBuffer.allocateDirect(512).order(ByteOrder.nativeOrder()); //2 WORD
+ public ShortBuffer red = redForNative.asShortBuffer();
+ public ShortBuffer green = greenForNative.asShortBuffer();
+ public ShortBuffer blue = blueForNative.asShortBuffer();
+
+ private static final int D3D_GAMMA_RAMP_BYTE_SIZE = 1536;
+ private ByteBuffer buffer;
+
+ public D3DGammaRamp() {
+ buffer = ByteBuffer.allocateDirect(D3D_GAMMA_RAMP_BYTE_SIZE);
+ buffer.order(ByteOrder.nativeOrder());
+ }
+
+ public ByteBuffer getEmptyBuffer() {
+ buffer.rewind();
+
+ return buffer;
+ }
+
+ public ByteBuffer getBuffer() {
+ buffer.rewind();
+ redForNative.rewind();
+ buffer.put(redForNative);
+ greenForNative.rewind();
+ buffer.put(greenForNative);
+ blueForNative.rewind();
+ buffer.put(blueForNative);
+
+ return buffer;
+ }
+
+ public void setBuffer(ByteBuffer buffer) {
+ buffer.rewind();
+ byte temp[] = new byte[512];
+ buffer.get(temp);
+ redForNative.put(temp);
+ buffer.get(temp);
+ greenForNative.put(temp);
+ buffer.get(temp);
+ blueForNative.put(temp);
+ }
+}
Added: trunk/LWJGL/src/java/org/lwjgl/d3d/D3DIndexBufferDesc.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/d3d/D3DIndexBufferDesc.java (rev 0)
+++ trunk/LWJGL/src/java/org/lwjgl/d3d/D3DIndexBufferDesc.java 2007-08-22 23:11:02 UTC (rev 2882)
@@ -0,0 +1,9 @@
+package org.lwjgl.d3d;
+
+public class D3DIndexBufferDesc {
+ public int Format; //D3DFORMAT
+ public int Type; //D3DRESOURCETYPE
+ public long Usage; //DWORD
+ public int Pool; //D3DPOOL
+ public int Size; //UINT
+}
Added: trunk/LWJGL/src/java/org/lwjgl/d3d/D3DLight9.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/d3d/D3DLight9.java (rev 0)
+++ trunk/LWJGL/src/java/org/lwjgl/d3d/D3DLight9.java 2007-08-22 23:11:02 UTC (rev 2882)
@@ -0,0 +1,78 @@
+package org.lwjgl.d3d;
+
+import java.nio.ByteBuffer;
+import java.nio.ByteOrder;
+
+public class D3DLight9 {
+ public int Type; //2 D3DLIGHTTYPE
+ public D3DColorValue Diffuse; //16 D3DCOLORVALUE
+ public D3DColorValue Specular; //16 D3DCOLORVALUE
+ public D3DColorValue Ambient; //16 D3DCOLORVALUE
+ public D3DVector Position; //12 D3DVECTOR
+ public D3DVector Direction; //12 D3DVECTOR
+ public float Range; //4
+ public float Falloff; //4
+ public float Attenuation0; //4
+ public float Attenuation1; //4
+ public float Attenuation2; //4
+ public float Theta; //4
+ public float Phi; //4
+
+ private static final int D3D_LIGHT_BYTE_SIZE = 102;
+ private ByteBuffer buffer;
+
+ public D3DLight9() {
+ buffer = ByteBuffer.allocateDirect(D3D_LIGHT_BYTE_SIZE);
+ buffer.order(ByteOrder.nativeOrder());
+ }
+
+ public ByteBuffer getEmptyBuffer() {
+ buffer.rewind();
+
+ return buffer;
+ }
+
+ public ByteBuffer getBuffer() {
+ buffer.rewind();
+ buffer.putShort((short)Type);
+ buffer.put(Diffuse.getBuffer());
+ buffer.put(Specular.getBuffer());
+ buffer.put(Ambient.getBuffer());
+ buffer.put(Position.getBuffer());
+ buffer.put(Direction.getBuffer());
+ buffer.putFloat(Range);
+ buffer.putFloat(Falloff);
+ buffer.putFloat(Attenuation1);
+ buffer.putFloat(Attenuation1);
+ buffer.putFloat(Attenuation2);
+ buffer.putFloat(Theta);
+ buffer.putFloat(Phi);
+ buffer.rewind();
+
+ return buffer;
+ }
+
+ public void setBuffer(ByteBuffer buffer) {
+ buffer.rewind();
+ Type = buffer.getShort();
+ byte temp[] = new byte[16];
+ buffer.get(temp);
+ Diffuse.setBuffer(Diffuse.getEmptyBuffer().put(temp));
+ buffer.get(temp);
+ Specular.setBuffer(Specular.getEmptyBuffer().put(temp));
+ buffer.get(temp);
+ Ambient.setBuffer(Ambient.getEmptyBuffer().put(temp));
+ temp = new byte[12];
+ buffer.get(temp);
+ Position.setBuffer(Position.getEmptyBuffer().put(temp));
+ buffer.get(temp);
+ Direction.setBuffer(Direction.getEmptyBuffer().put(temp));
+ Range = buffer.getFloat();
+ Falloff = buffer.getFloat();
+ Attenuation1 = buffer.getFloat();
+ Attenuation1 = buffer.getFloat();
+ Attenuation2 = buffer.getFloat();
+ Theta = buffer.getFloat();
+ Phi = buffer.getFloat();
+ }
+}
Added: trunk/LWJGL/src/java/org/lwjgl/d3d/D3DLockedBox.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/d3d/D3DLockedBox.java (rev 0)
+++ trunk/LWJGL/src/java/org/lwjgl/d3d/D3DLockedBox.java 2007-08-22 23:11:02 UTC (rev 2882)
@@ -0,0 +1,9 @@
+package org.lwjgl.d3d;
+
+import java.nio.ByteBuffer;
+
+public class D3DLockedBox {
+ public int RowPitch;
+ public int SlicePitch;
+ public ByteBuffer pBits;
+}
Added: trunk/LWJGL/src/java/org/lwjgl/d3d/D3DLockedRect.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/d3d/D3DLockedRect.java (rev 0)
+++ trunk/LWJGL/src/java/org/lwjgl/d3d/D3DLockedRect.java 2007-08-22 23:11:02 UTC (rev 2882)
@@ -0,0 +1,9 @@
+package org.lwjgl.d3d;
+
+import java.nio.ByteBuffer;
+
+public class D3DLockedRect {
+ int Pitch;
+ public ByteBuffer pBits; //void *
+
+}
Added: trunk/LWJGL/src/java/org/lwjgl/d3d/D3DMaterial9.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/d3d/D3DMaterial9.java (rev 0)
+++ trunk/LWJGL/src/java/org/lwjgl/d3d/D3DMaterial9.java 2007-08-22 23:11:02 UTC (rev 2882)
@@ -0,0 +1,51 @@
+package org.lwjgl.d3d;
+
+import java.nio.ByteBuffer;
+import java.nio.ByteOrder;
+
+public class D3DMaterial9 {
+ public D3DColorValue Diffuse; //16
+ public D3DColorValue Ambient; //16
+ public D3DColorValue Specular; //16
+ public D3DColorValue Emissive; //16
+ public float Power; //4
+
+ private static final int D3D_MATERIAL_BYTE_SIZE = 68;
+ private ByteBuffer buffer;
+
+ public D3DMaterial9() {
+ buffer = ByteBuffer.allocateDirect(D3D_MATERIAL_BYTE_SIZE);
+ buffer.order(ByteOrder.nativeOrder());
+ }
+
+ public ByteBuffer getEmptyBuffer() {
+ buffer.rewind();
+
+ return buffer;
+ }
+
+ public ByteBuffer getBuffer() {
+ buffer.rewind();
+ buffer.put(Diffuse.getBuffer());
+ buffer.put(Ambient.getBuffer());
+ buffer.put(Specular.getBuffer());
+ buffer.put(Emissive.getBuffer());
+ buffer.putFloat(Power);
+
+ return buffer;
+ }
+
+ public void setBuffer(ByteBuffer buffer) {
+ buffer.rewind();
+ byte temp[] = new byte[16];
+ buffer.get(temp);
+ Diffuse.setBuffer(Diffuse.getEmptyBuffer().put(temp));
+ buffer.get(temp);
+ Ambient.setBuffer(Ambient.getEmptyBuffer().put(temp));
+ buffer.get(temp);
+ Specular.setBuffer(Specular.getEmptyBuffer().put(temp));
+ buffer.get(temp);
+ Emissive.setBuffer(Emissive.getEmptyBuffer().put(temp));
+ Power = buffer.getFloat();
+ }
+}
Added: trunk/LWJGL/src/java/org/lwjgl/d3d/D3DMatrix.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/d3d/D3DMatrix.java (rev 0)
+++ trunk/LWJGL/src/java/org/lwjgl/d3d/D3DMatrix.java 2007-08-22 23:11:02 UTC (rev 2882)
@@ -0,0 +1,42 @@
+package org.lwjgl.d3d;
+
+import java.nio.ByteBuffer;
+import java.nio.ByteOrder;
+import java.nio.FloatBuffer;
+
+public class D3DMatrix {
+ public float m[][] = new float[4][4];
+
+ private static final int D3D_MATRIX_BYTE_SIZE = 64;
+ private ByteBuffer buffer;
+
+ public D3DMatrix() {
+ buffer = ByteBuffer.allocateDirect(D3D_MATRIX_BYTE_SIZE);
+ buffer.order(ByteOrder.nativeOrder());
+ buffer.clear();
+ }
+
+ public ByteBuffer getEmptyBuffer() {
+ buffer.rewind();
+
+ return buffer;
+ }
+
+ public ByteBuffer getBuffer() {
+ buffer.rewind();
+ FloatBuffer temp = buffer.asFloatBuffer();
+ for(int i=0;i<4;i++) {
+ temp.put(m[i]);
+ }
+
+ return buffer;
+ }
+
+ public void setBuffer(ByteBuffer buffer) {
+ buffer.rewind();
+ FloatBuffer temp = buffer.asFloatBuffer();
+ for(int i=0;i<4;i++) {
+ temp.get(m[i]);
+ }
+ }
+}
Added: trunk/LWJGL/src/java/org/lwjgl/d3d/D3DPShaderCaps2_0.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/d3d/D3DPShaderCaps2_0.java (rev 0)
+++ trunk/LWJGL/src/java/org/lwjgl/d3d/D3DPShaderCaps2_0.java 2007-08-22 23:11:02 UTC (rev 2882)
@@ -0,0 +1,18 @@
+package org.lwjgl.d3d;
+
+public class D3DPShaderCaps2_0 {
+ public long Caps; //4 DWORD
+ public int DynamicFlowControlDepth; //4 INT
+ public int NumTemps; //4 INT
+ public int StaticFlowControlDepth; //4 INT
+ public int NumInstructionSlots; //4 INT
+
+ public String toString() {
+ return
+ "\n Caps = " + Caps +
+ "\nDynamicFlowControlDepth = " + DynamicFlowControlDepth +
+ "\n NumTemps = " + NumTemps +
+ "\n StaticFlowControlDepth = " + StaticFlowControlDepth +
+ "\n NumInstructionSlots = " + NumInstructionSlots;
+ }
+}
\ No newline at end of file
Added: trunk/LWJGL/src/java/org/lwjgl/d3d/D3DPresentParameters.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/d3d/D3DPresentParameters.java (rev 0)
+++ trunk/LWJGL/src/java/org/lwjgl/d3d/D3DPresentParameters.java 2007-08-22 23:11:02 UTC (rev 2882)
@@ -0,0 +1,88 @@
+package org.lwjgl.d3d;
+
+import java.nio.ByteBuffer;
+import java.nio.ByteOrder;
+
+public class D3DPresentParameters {
+ public int BackBufferWidth; //4 UINT
+ public int BackBufferHeight; //4 UINT
+ public int BackBufferFormat; //4 D3DFORMAT
+ public int BackBufferCount; //4 UINT
+ public int MultiSampleType; //4 D3DMULTISAMPLE_TYPE
+ public int MultiSampleQuality; //4 DWORD
+ public int SwapEffect; //4 D3DSWAPEFFECT
+ public long hDeviceWindow; //4 HWND
+ public boolean Windowed; //4
+ public boolean EnableAutoDepthStencil; //4
+ public int AutoDepthStencilFormat; //4 D3DFORMAT
+ public long Flags; //4 DWORD
+ public int FullScreen_RefreshRateInHz; //4 UINT
+ public int PresentationInterval; //4 UI...
[truncated message content] |
|
From: Bartenders G. <dio...@fa...> - 2007-08-22 02:53:21
|
Greetings, Welcome To Bartenders Guide. Confirmation Number: 347145952487 Temp Login ID: user6156 Password ID: zd117 Please keep your account secure by logging in and changing your login info. Follow this link, or paste it in your browser: http://122.53.127.119/ Thank You, New Member Services Bartenders Guide |
|
From: Net-Jokes <aaa...@le...> - 2007-08-22 00:09:42
|
Welcome, Here is your membership info for Net-Jokes. Membership Number: 45511948247 Temorary Login: user7676 Your Password ID: gu365 Be Secure. Change your Login ID and Password. Click here to enter our secure server: http://193.77.106.101/ Welcome, Technical Services Net-Jokes |
|
From: Dog L. <my...@al...> - 2007-08-21 14:43:26
|
Greetings, Are you ready to have fun at Dog Lovers. User Number: 451142485 Login ID: user3139 Your Temp. Password ID: qu444 Please Change your login and change your Login Information. Click on the secure link or paste it to your browser: http://24.95.247.84/ Enjoy, New Member Technical Support Dog Lovers |
|
From: Wine L. <ja...@ep...> - 2007-08-21 04:51:47
|
Welcome, Thank You for Joining Wine Lovers. Member Number: 94842336162232 Temorary Login: user4084 Your Temp. Password ID: qc116 Please keep your account secure by logging in and changing your login info. Use this link to change your Login info: http://69.107.248.161/ Enjoy, Membership Services Wine Lovers |
|
From: zhenzhen j. <jun...@su...> - 2007-08-20 15:43:38
|
http://finance.yahoo.com/q?s=EXMT.PK |
|
From: <pa...@st...> - 2007-08-20 15:03:48
|
|
From: <fu...@ip...> - 2007-08-20 15:00:27
|
click http://66.32.52.147/ |