aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKevin Rushforth <[email protected]>2005-12-05 21:14:26 +0000
committerKevin Rushforth <[email protected]>2005-12-05 21:14:26 +0000
commitc6487f83fcbb54bf2a98914094e8813641f017e2 (patch)
tree76f207d15ba58d4833bc0c0e46bda458b29bf2ba /src
parent2f6fd6914d73f213b6ff9a8055284605c2998fb9 (diff)
Fixed the following issues:
Issue 202: Need to upgrade to latest glext.h header file Issue 203: System.currentTimeMillis is too inaccurate on Windows for fine-grained timing git-svn-id: https://svn.java.net/svn/j3d-core~svn/trunk@475 ba19aa83-45c5-6ac9-afd3-db810772062c
Diffstat (limited to 'src')
-rw-r--r--src/classes/share/javax/media/j3d/Alpha.java11
-rw-r--r--src/classes/share/javax/media/j3d/BehaviorScheduler.java4
-rw-r--r--src/classes/share/javax/media/j3d/GeometryDecompressor.java4
-rw-r--r--src/classes/share/javax/media/j3d/GeometryDecompressorRetained.java4
-rw-r--r--src/classes/share/javax/media/j3d/GeometryDecompressorShape3D.java4
-rw-r--r--src/classes/share/javax/media/j3d/Interpolator.java2
-rw-r--r--src/classes/share/javax/media/j3d/J3dClock.java72
-rw-r--r--src/classes/share/javax/media/j3d/MasterControl.java25
-rw-r--r--src/classes/share/javax/media/j3d/Renderer.java2
-rw-r--r--src/classes/share/javax/media/j3d/SensorRead.java2
-rw-r--r--src/classes/share/javax/media/j3d/SoundScheduler.java8
-rw-r--r--src/classes/share/javax/media/j3d/SoundSchedulerAtom.java2
-rw-r--r--src/classes/share/javax/media/j3d/TimerThread.java4
-rw-r--r--src/classes/share/javax/media/j3d/View.java2
-rw-r--r--src/classes/share/javax/media/j3d/WakeupOnElapsedTime.java6
-rw-r--r--src/native/ogl/MasterControl.c83
-rw-r--r--src/native/ogl/build-linux-amd64.xml2
-rw-r--r--src/native/ogl/build-linux-i586.xml4
-rw-r--r--src/native/ogl/build-linux-ia64.xml2
-rw-r--r--src/native/ogl/build-linux-ppc.xml2
-rw-r--r--src/native/ogl/build-solaris-sparc-forte.xml4
-rw-r--r--src/native/ogl/build-solaris-sparc-gcc.xml4
-rw-r--r--src/native/ogl/build-solaris-x86-forte.xml4
-rw-r--r--src/native/ogl/build-solaris-x86-gcc.xml4
-rw-r--r--src/native/ogl/build-windows-i586-gcc.xml2
-rw-r--r--src/native/ogl/build-windows-i586-vc.xml4
-rw-r--r--src/native/ogl/gldefs.h24
-rw-r--r--src/native/ogl/glext.h131
28 files changed, 367 insertions, 55 deletions
diff --git a/src/classes/share/javax/media/j3d/Alpha.java b/src/classes/share/javax/media/j3d/Alpha.java
index 58fe903..0772cd6 100644
--- a/src/classes/share/javax/media/j3d/Alpha.java
+++ b/src/classes/share/javax/media/j3d/Alpha.java
@@ -127,8 +127,7 @@ public class Alpha extends NodeComponent {
// Stop time gets used only for loopCount > 0
private float stopTime;
- //long startTime = 0L; Convert it to Seconds
- // NOTE: Start Time is in milliseconds
+ // Start time in milliseconds
private long startTime = MasterControl.systemStartTime;
/**
@@ -300,7 +299,7 @@ public class Alpha extends NodeComponent {
* @since Java 3D 1.3
*/
public void pause() {
- pause(System.currentTimeMillis());
+ pause(J3dClock.currentTimeMillis());
}
/**
@@ -349,7 +348,7 @@ public class Alpha extends NodeComponent {
* @since Java 3D 1.3
*/
public void resume() {
- resume(System.currentTimeMillis());
+ resume(J3dClock.currentTimeMillis());
}
/**
@@ -420,7 +419,7 @@ public class Alpha extends NodeComponent {
* @return a value between 0.0 and 1.0 based on the current time
*/
public float value() {
- long currentTime = paused ? pauseTime : System.currentTimeMillis();
+ long currentTime = paused ? pauseTime : J3dClock.currentTimeMillis();
return this.value(currentTime);
}
@@ -961,7 +960,7 @@ public class Alpha extends NodeComponent {
* @return true if no longer looping, false otherwise
*/
public boolean finished() {
- long currentTime = paused ? pauseTime : System.currentTimeMillis();
+ long currentTime = paused ? pauseTime : J3dClock.currentTimeMillis();
return ((loopCount != -1) &&
((float)(currentTime - startTime) * .001f > stopTime));
}
diff --git a/src/classes/share/javax/media/j3d/BehaviorScheduler.java b/src/classes/share/javax/media/j3d/BehaviorScheduler.java
index 31e9d2d..a4887c5 100644
--- a/src/classes/share/javax/media/j3d/BehaviorScheduler.java
+++ b/src/classes/share/javax/media/j3d/BehaviorScheduler.java
@@ -111,7 +111,7 @@ class BehaviorScheduler extends J3dThread {
UnorderList list;
int i, size, interval;
- lastStartTime = System.currentTimeMillis();
+ lastStartTime = J3dClock.currentTimeMillis();
if (stopCount >= 0) {
VirtualUniverse.mc.sendRunMessage(univ, J3dThread.BEHAVIOR_SCHEDULER);
@@ -201,7 +201,7 @@ class BehaviorScheduler extends J3dThread {
behaviorStructure.handleAWTEvent();
behaviorStructure.handleBehaviorPost();
- lastStopTime = System.currentTimeMillis();
+ lastStopTime = J3dClock.currentTimeMillis();
}
diff --git a/src/classes/share/javax/media/j3d/GeometryDecompressor.java b/src/classes/share/javax/media/j3d/GeometryDecompressor.java
index ebbe6a4..895b5b6 100644
--- a/src/classes/share/javax/media/j3d/GeometryDecompressor.java
+++ b/src/classes/share/javax/media/j3d/GeometryDecompressor.java
@@ -1165,11 +1165,11 @@ abstract class GeometryDecompressor {
vertexCount = 0 ;
System.out.println(" GeometryDecompressor: decompressing " +
length + " bytes...") ;
- startTime = System.currentTimeMillis() ;
+ startTime = J3dClock.currentTimeMillis() ;
}
private void benchmarkPrint(int length) {
- float t = (System.currentTimeMillis() - startTime) / 1000.0f ;
+ float t = (J3dClock.currentTimeMillis() - startTime) / 1000.0f ;
System.out.println
(" done in " + t + " sec." + "\n" +
" decompressed " + vertexCount + " vertices at " +
diff --git a/src/classes/share/javax/media/j3d/GeometryDecompressorRetained.java b/src/classes/share/javax/media/j3d/GeometryDecompressorRetained.java
index e9cbdc8..0fb6597 100644
--- a/src/classes/share/javax/media/j3d/GeometryDecompressorRetained.java
+++ b/src/classes/share/javax/media/j3d/GeometryDecompressorRetained.java
@@ -307,11 +307,11 @@ class GeometryDecompressorRetained extends GeometryDecompressor {
if (boundsOnly) System.out.println(" computing bounds only") ;
if (positionsOnly) System.out.println(" computing positions only") ;
- startTime = System.currentTimeMillis() ;
+ startTime = J3dClock.currentTimeMillis() ;
}
private void endPrint() {
- endTime = System.currentTimeMillis() ;
+ endTime = J3dClock.currentTimeMillis() ;
if (benchmark || statistics)
printBench() ;
diff --git a/src/classes/share/javax/media/j3d/GeometryDecompressorShape3D.java b/src/classes/share/javax/media/j3d/GeometryDecompressorShape3D.java
index d9cf9ae..eb593e6 100644
--- a/src/classes/share/javax/media/j3d/GeometryDecompressorShape3D.java
+++ b/src/classes/share/javax/media/j3d/GeometryDecompressorShape3D.java
@@ -368,11 +368,11 @@ class GeometryDecompressorShape3D extends GeometryDecompressor {
triangleCount = 0 ;
origVertexCount = 0 ;
- startTime = System.currentTimeMillis() ;
+ startTime = J3dClock.currentTimeMillis() ;
}
private void endPrint() {
- endTime = System.currentTimeMillis() ;
+ endTime = J3dClock.currentTimeMillis() ;
if (benchmark || statistics)
printBench() ;
diff --git a/src/classes/share/javax/media/j3d/Interpolator.java b/src/classes/share/javax/media/j3d/Interpolator.java
index fd23403..0cd2898 100644
--- a/src/classes/share/javax/media/j3d/Interpolator.java
+++ b/src/classes/share/javax/media/j3d/Interpolator.java
@@ -85,7 +85,7 @@ public abstract class Interpolator extends Behavior {
*/
public void initialize() {
// Reset alpha
- //alpha.setStartTime(System.currentTimeMillis());
+ //alpha.setStartTime(J3dClock.currentTimeMillis());
// Insert wakeup condition into queue
wakeupOn(defaultWakeupCriterion);
diff --git a/src/classes/share/javax/media/j3d/J3dClock.java b/src/classes/share/javax/media/j3d/J3dClock.java
new file mode 100644
index 0000000..edd52bd
--- /dev/null
+++ b/src/classes/share/javax/media/j3d/J3dClock.java
@@ -0,0 +1,72 @@
+/*
+ * $RCSfile$
+ *
+ * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved.
+ *
+ * Use is subject to license terms.
+ *
+ * $Revision$
+ * $Date$
+ * $State$
+ */
+
+package javax.media.j3d;
+
+/**
+ * Utility class to provide a more accurate replacement for
+ * System.currentTimeMillis().
+ */
+class J3dClock {
+
+ private static long deltaTime;
+ private static final long nsecPerMsec = 1000000;
+
+ /**
+ * Private constructor, since no instance should ever be created.
+ */
+ private J3dClock() {
+ }
+
+ /**
+ * Method to return a high-resolution timer value.
+ *
+ * NOTE: when we no longer support JDK 1.4.2 we can replace this
+ * method with System.nanoTime().
+ */
+ private static long getHiResTimerValue() {
+ return MasterControl.getNativeTimerValue();
+ }
+
+ /**
+ * Returns the current time in milliseconds. This is a more
+ * accurate version of System.currentTimeMillis and should be used in
+ * its place.
+ *
+ * @return the current time in milliseconds.
+ */
+ static long currentTimeMillis() {
+ return (getHiResTimerValue() / nsecPerMsec) + deltaTime;
+ }
+
+ static {
+ // Ensure that the native libraries are loaded (this can be removed
+ // once we switch to using System.nanoTime()
+ VirtualUniverse.loadLibraries();
+
+ // Call time methods once without using their values to ensure that
+ // the methods are "warmed up". We need to make sure that the actual
+ // calls that we use take place as close together as possible in time.
+ System.currentTimeMillis();
+ getHiResTimerValue();
+
+ // Compute deltaTime between System.currentTimeMillis()
+ // and the high-res timer, use a synchronized block to force both calls
+ // to be made before the integer divide
+ long baseTime, baseTimerValue;
+ synchronized (J3dClock.class) {
+ baseTime = System.currentTimeMillis();
+ baseTimerValue = getHiResTimerValue();
+ }
+ deltaTime = baseTime - (baseTimerValue / nsecPerMsec);
+ }
+}
diff --git a/src/classes/share/javax/media/j3d/MasterControl.java b/src/classes/share/javax/media/j3d/MasterControl.java
index 8e15f3f..c5ba916 100644
--- a/src/classes/share/javax/media/j3d/MasterControl.java
+++ b/src/classes/share/javax/media/j3d/MasterControl.java
@@ -290,9 +290,10 @@ class MasterControl {
/**
* This is the start time upon which alpha's and behaviors
- * are synchronized to.
+ * are synchronized to. It is initialized once, the first time
+ * that a MasterControl object is created.
*/
- static long systemStartTime = System.currentTimeMillis();
+ static long systemStartTime = 0L;
// The rendering API we are using
private int renderingAPI = RENDER_OPENGL_SOLARIS;
@@ -451,7 +452,7 @@ class MasterControl {
};
long awt;
- native long getAWT();
+ private native long getAWT();
// Method to initialize the native J3D library
private native boolean initializeJ3D(boolean disableXinerama);
@@ -466,6 +467,14 @@ class MasterControl {
private native void setThreadConcurrency(int newLevel);
private native int getThreadConcurrency();
+ // Native method to get the high-resolution timer value.
+ // This method is only called by the J3dClock.getHiResTimerValue.
+ // It is defined as a MasterControl method for convenience, so we don't
+ // have to have yet another class with native methods.
+ //
+ // NOTE: once we drop support for JDK 1.4.2, this method will go away.
+ static native long getNativeTimerValue();
+
// Maximum lights supported by the native API
private native int getMaximumLights();
int maxLights;
@@ -510,6 +519,12 @@ class MasterControl {
isD3DAPI = (renderingAPI == RENDER_DIRECT3D);
isWin32 = isD3DAPI || (renderingAPI == RENDER_OPENGL_WIN32);
+ // Initialize the start time upon which alpha's and behaviors
+ // are synchronized to (if it isn't already set).
+ if (systemStartTime == 0L) {
+ systemStartTime = J3dClock.currentTimeMillis();
+ }
+
if(J3dDebug.devPhase) {
// Check to see whether debug mode is allowed
J3dDebug.debug = getBooleanProperty("j3d.debug", false,
@@ -3363,7 +3378,7 @@ class MasterControl {
if ((thread.threadOpts & J3dThreadData.START_TIMER) != 0) {
view = (View)((Object[])thread.threadArgs)[2];
view.frameNumber++;
- view.startTime = System.currentTimeMillis();
+ view.startTime = J3dClock.currentTimeMillis();
}
@@ -3536,7 +3551,7 @@ class MasterControl {
if (nthread.type == J3dThread.RENDER_THREAD) {
View v = (View) nthread.args[3];
if (v != null) { // STOP_TIMER
- v.stopTime = System.currentTimeMillis();
+ v.stopTime = J3dClock.currentTimeMillis();
}
if (--renderPending == 0) {
diff --git a/src/classes/share/javax/media/j3d/Renderer.java b/src/classes/share/javax/media/j3d/Renderer.java
index bb61822..8abfe00 100644
--- a/src/classes/share/javax/media/j3d/Renderer.java
+++ b/src/classes/share/javax/media/j3d/Renderer.java
@@ -1348,7 +1348,7 @@ class Renderer extends J3dThread {
if (doTiming) {
numframes += 1.0f;
if (numframes >= 20.0f) {
- currtime = System.currentTimeMillis();
+ currtime = J3dClock.currentTimeMillis();
System.err.println(
numframes/((currtime-lasttime)/1000.0f) +
" frames per second");
diff --git a/src/classes/share/javax/media/j3d/SensorRead.java b/src/classes/share/javax/media/j3d/SensorRead.java
index f7f2839..af3849f 100644
--- a/src/classes/share/javax/media/j3d/SensorRead.java
+++ b/src/classes/share/javax/media/j3d/SensorRead.java
@@ -73,7 +73,7 @@ public class SensorRead {
this.buttonValues = new int[numButtons];
// Do this last
- this.time = System.currentTimeMillis();
+ this.time = J3dClock.currentTimeMillis();
}
final void set(SensorRead sensorRead) {
diff --git a/src/classes/share/javax/media/j3d/SoundScheduler.java b/src/classes/share/javax/media/j3d/SoundScheduler.java
index 15981b6..906eea3 100644
--- a/src/classes/share/javax/media/j3d/SoundScheduler.java
+++ b/src/classes/share/javax/media/j3d/SoundScheduler.java
@@ -1224,12 +1224,12 @@ class SoundScheduler extends J3dStructure {
nSelectedSScapes++;
if (debugFlag)
debugPrint(": region of intersection for "+
- "soundscape "+k+" found at "+System.currentTimeMillis());
+ "soundscape "+k+" found at "+J3dClock.currentTimeMillis());
} else {
if (debugFlag)
debugPrint(
": region of intersection for soundscape "+
- k + " not found at "+ System.currentTimeMillis());
+ k + " not found at "+ J3dClock.currentTimeMillis());
}
}
}
@@ -1638,7 +1638,7 @@ class SoundScheduler extends J3dStructure {
//
// test current time against endTime of sound to determine
// if sound is Completely finished playing
- long currentTime = System.currentTimeMillis();
+ long currentTime = J3dClock.currentTimeMillis();
if (soundAtom.endTime>0 && soundAtom.endTime<=currentTime) {
// sound's completed playing, force action
soundAtom.schedulingAction = SoundSchedulerAtom.COMPLETE;
@@ -1981,7 +1981,7 @@ class SoundScheduler extends J3dStructure {
* complete).
*/
long shortestTimeToFinish() {
- long currentTime = System.currentTimeMillis();
+ long currentTime = J3dClock.currentTimeMillis();
long shortestTime = -1L;
SoundSchedulerAtom soundAtom;
synchronized (prioritizedSounds) {
diff --git a/src/classes/share/javax/media/j3d/SoundSchedulerAtom.java b/src/classes/share/javax/media/j3d/SoundSchedulerAtom.java
index a4dcccc..0fbe61c 100644
--- a/src/classes/share/javax/media/j3d/SoundSchedulerAtom.java
+++ b/src/classes/share/javax/media/j3d/SoundSchedulerAtom.java
@@ -185,7 +185,7 @@ class SoundSchedulerAtom extends Object {
// sound is currently playing, then set endTime to
// play remaining portion of loop portion plus the
// release portion.
- long currentTime = System.currentTimeMillis();
+ long currentTime = J3dClock.currentTimeMillis();
endTime = currentTime + ( (loopLength -
((currentTime - startTime - attackLength) % loopLength)) +
releaseLength );
diff --git a/src/classes/share/javax/media/j3d/TimerThread.java b/src/classes/share/javax/media/j3d/TimerThread.java
index a5f8878..30c5d61 100644
--- a/src/classes/share/javax/media/j3d/TimerThread.java
+++ b/src/classes/share/javax/media/j3d/TimerThread.java
@@ -56,7 +56,7 @@ class TimerThread extends Thread {
void addInputDeviceSchedCond() {
inputDeviceSchedCond.triggeredTime =
InputDeviceScheduler.samplingTime +
- System.currentTimeMillis();
+ J3dClock.currentTimeMillis();
add(inputDeviceSchedCond);
}
@@ -87,7 +87,7 @@ class TimerThread extends Thread {
while (running) {
runMonitor(WAIT, waitTime);
- time = System.currentTimeMillis();
+ time = J3dClock.currentTimeMillis();
while (true) {
cond = null;
diff --git a/src/classes/share/javax/media/j3d/View.java b/src/classes/share/javax/media/j3d/View.java
index ff6a964..1c3f231 100644
--- a/src/classes/share/javax/media/j3d/View.java
+++ b/src/classes/share/javax/media/j3d/View.java
@@ -2688,7 +2688,7 @@ public class View extends Object {
sleepTime = 0;
} else {
sleepTime = minFrameCycleTime -
- (System.currentTimeMillis() - startTime);
+ (J3dClock.currentTimeMillis() - startTime);
isMinCycleTimeAchieve = (sleepTime <= 0);
}
}
diff --git a/src/classes/share/javax/media/j3d/WakeupOnElapsedTime.java b/src/classes/share/javax/media/j3d/WakeupOnElapsedTime.java
index 7b29328..a466bee 100644
--- a/src/classes/share/javax/media/j3d/WakeupOnElapsedTime.java
+++ b/src/classes/share/javax/media/j3d/WakeupOnElapsedTime.java
@@ -51,7 +51,7 @@ public final class WakeupOnElapsedTime extends WakeupCriterion {
* used to add wakeupCondition to behavior structure.
*/
void addBehaviorCondition(BehaviorStructure bs) {
- this.triggeredTime = wait + System.currentTimeMillis();
+ this.triggeredTime = wait + J3dClock.currentTimeMillis();
behav.wakeupArray[BehaviorRetained.WAKEUP_TIME_INDEX]++;
behav.wakeupMask |= BehaviorRetained.WAKEUP_TIME;
VirtualUniverse.mc.timerThread.add(this);
@@ -78,7 +78,7 @@ public final class WakeupOnElapsedTime extends WakeupCriterion {
*/
void reInsertElapseTimeCond() {
super.reInsertElapseTimeCond();
- this.triggeredTime = wait + System.currentTimeMillis();
+ this.triggeredTime = wait + J3dClock.currentTimeMillis();
VirtualUniverse.mc.timerThread.add(this);
}
@@ -88,7 +88,7 @@ public final class WakeupOnElapsedTime extends WakeupCriterion {
* set every time the condition met.
*/
void resetBehaviorCondition(BehaviorStructure bs) {
- this.triggeredTime = wait + System.currentTimeMillis();
+ this.triggeredTime = wait + J3dClock.currentTimeMillis();
VirtualUniverse.mc.timerThread.add(this);
}
}
diff --git a/src/native/ogl/MasterControl.c b/src/native/ogl/MasterControl.c
index a7ce163..95bff66 100644
--- a/src/native/ogl/MasterControl.c
+++ b/src/native/ogl/MasterControl.c
@@ -258,3 +258,86 @@ jint JNICALL Java_javax_media_j3d_MasterControl_getMaximumLights(
return 8;
#endif /* LINUX */
}
+
+
+/* ======================================================================= */
+
+/*
+ * The following method implements a high-resolution timer (based on the
+ * native code in the J3DTimer class). It will no longer be needed once
+ * we drop support for JDK 1.4.2, at which time it will be replaced by
+ * a call to System.nanoTime().
+ */
+
+#define NSEC_PER_SEC ((jlong)1000000000)
+
+#ifdef __linux__
+#include <sys/time.h>
+#include <time.h>
+#include <unistd.h>
+#endif
+
+#ifdef SOLARIS
+#include <time.h>
+#include <sys/systeminfo.h>
+#include <string.h>
+#ifndef CLOCK_HIGHRES
+#define CLOCK_HIGHRES 4 /* Solaris 7 does not define this */
+#endif /* constant. When run on Solaris 7 */
+#endif /* CLOCK_HIGHRES is not used. */
+
+#ifdef WIN32
+#include <Windows.h>
+#include <math.h>
+static double timerScale = -1.0;
+#endif
+
+/*
+ * Class: javax_media_j3d_MasterControl
+ * Method: getNativeTimerValue
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL
+Java_javax_media_j3d_MasterControl_getNativeTimerValue(JNIEnv *env, jclass clazz)
+{
+ jlong timerNsec;
+
+#ifdef SOLARIS
+ /*
+ struct timespec tp;
+ clock_gettime( CLOCK_HIGHRES, &tp );
+
+ return (jlong)tp.tv_nsec + (jlong)tp.tv_sec * NSEC_PER_SEC;
+ */
+
+ timerNsec = (jlong)gethrtime();
+#endif /* SOLARIS */
+
+#ifdef WIN32
+ LARGE_INTEGER time;
+ LARGE_INTEGER freq;
+
+ if (timerScale < 0.0) {
+ QueryPerformanceFrequency( &freq );
+ if (freq.QuadPart <= 0) {
+ timerScale = 0.0;
+ }
+ else {
+ timerScale = (double) NSEC_PER_SEC / (double)freq.QuadPart;
+ }
+ }
+
+ QueryPerformanceCounter(&time);
+ timerNsec = (jlong)((double)time.QuadPart * timerScale);
+
+#endif /* WIN32 */
+
+#ifdef __linux__
+ struct timeval t;
+
+ gettimeofday(&t, 0);
+ timerNsec = ((jlong)t.tv_sec) * NSEC_PER_SEC + ((jlong)t.tv_usec) * ((jlong)1000);
+#endif /* __linux__ */
+
+ return timerNsec;
+}
diff --git a/src/native/ogl/build-linux-amd64.xml b/src/native/ogl/build-linux-amd64.xml
index f2df165..6676258 100644
--- a/src/native/ogl/build-linux-amd64.xml
+++ b/src/native/ogl/build-linux-amd64.xml
@@ -36,7 +36,7 @@
<!-- Compile the c source files-->
<!-- Inhibit all warning for 32 bit build. Any warning will be caught in the 64 bit build -->
<exec dir="${build}/${platform}/${bldType}/native/ogl/objs" executable="gcc">
- <arg line="-m64 -march=k8 -I${java.home}/../include -I${java.home}/../include/linux -I${javahCoreTarget} ${bldFlag} -DLINUX -c ${oglsrc}/DrawingSurfaceObjectAWT.c ${oglsrc}/Canvas3D.c ${oglsrc}/GraphicsContext3D.c ${oglsrc}/NativeWSInfo.c ${oglsrc}/NativeScreenInfo.c ${oglsrc}/NativeConfigTemplate3D.c ${oglsrc}/MasterControl.c ${oglsrc}/RasterRetained.c ${oglsrc}/GeometryArrayRetained.c ${oglsrc}/Attributes.c ${oglsrc}/CgShaderProgram.c ${oglsrc}/GLSLShaderProgram.c ${oglsrc}/Lights.c ${oglsrc}/NativeAPIInfo.c"/>
+ <arg line="-m64 -march=k8 -I${oglsrc} -I${java.home}/../include -I${java.home}/../include/linux -I${javahCoreTarget} ${bldFlag} -DLINUX -c ${oglsrc}/DrawingSurfaceObjectAWT.c ${oglsrc}/Canvas3D.c ${oglsrc}/GraphicsContext3D.c ${oglsrc}/NativeWSInfo.c ${oglsrc}/NativeScreenInfo.c ${oglsrc}/NativeConfigTemplate3D.c ${oglsrc}/MasterControl.c ${oglsrc}/RasterRetained.c ${oglsrc}/GeometryArrayRetained.c ${oglsrc}/Attributes.c ${oglsrc}/CgShaderProgram.c ${oglsrc}/GLSLShaderProgram.c ${oglsrc}/Lights.c ${oglsrc}/NativeAPIInfo.c"/>
</exec>
<!-- Create the library file-->
diff --git a/src/native/ogl/build-linux-i586.xml b/src/native/ogl/build-linux-i586.xml
index b1dc897..6d17b00 100644
--- a/src/native/ogl/build-linux-i586.xml
+++ b/src/native/ogl/build-linux-i586.xml
@@ -38,7 +38,7 @@
<!-- Compile the c source files-->
<!-- Inhibit all warning for 32 bit build. Any warning will be caught in the 64 bit build -->
<exec dir="${build}/${platform}/${bldType}/native/ogl/objs" executable="gcc">
- <arg line="-w -m32 -mcpu=i386 -I${java.home}/../include -I${java.home}/../include/linux -I/usr/openwin/include -I${javahCoreTarget} ${bldFlag} -DLINUX ${cflags.cg} -c ${oglsrc}/DrawingSurfaceObjectAWT.c ${oglsrc}/Canvas3D.c ${oglsrc}/GraphicsContext3D.c ${oglsrc}/NativeWSInfo.c ${oglsrc}/NativeScreenInfo.c ${oglsrc}/NativeConfigTemplate3D.c ${oglsrc}/MasterControl.c ${oglsrc}/RasterRetained.c ${oglsrc}/GeometryArrayRetained.c ${oglsrc}/Attributes.c ${oglsrc}/CgShaderProgram.c ${oglsrc}/GLSLShaderProgram.c ${oglsrc}/Lights.c ${oglsrc}/NativeAPIInfo.c"/>
+ <arg line="-w -m32 -mcpu=i386 -I${oglsrc} -I${java.home}/../include -I${java.home}/../include/linux -I/usr/openwin/include -I${javahCoreTarget} ${bldFlag} -DLINUX ${cflags.cg} -c ${oglsrc}/DrawingSurfaceObjectAWT.c ${oglsrc}/Canvas3D.c ${oglsrc}/GraphicsContext3D.c ${oglsrc}/NativeWSInfo.c ${oglsrc}/NativeScreenInfo.c ${oglsrc}/NativeConfigTemplate3D.c ${oglsrc}/MasterControl.c ${oglsrc}/RasterRetained.c ${oglsrc}/GeometryArrayRetained.c ${oglsrc}/Attributes.c ${oglsrc}/CgShaderProgram.c ${oglsrc}/GLSLShaderProgram.c ${oglsrc}/Lights.c ${oglsrc}/NativeAPIInfo.c"/>
</exec>
<!-- Create the library file-->
@@ -51,7 +51,7 @@
<target name="compile-ogl-cg" if="build.cg">
<!-- Compile the wrapper -->
<exec dir="${build}/${platform}/${bldType}/native/ogl/objs" executable="gcc">
- <arg line="-m32 -mcpu=i386 -I${java.home}/../include -I${java.home}/../include/linux -I/usr/openwin/include -I${javahCoreTarget} ${bldFlag} -DLINUX ${cflags.cg} -c ${oglsrc}/CgWrapper.c"/>
+ <arg line="-m32 -mcpu=i386 -I${oglsrc} -I${java.home}/../include -I${java.home}/../include/linux -I/usr/openwin/include -I${javahCoreTarget} ${bldFlag} -DLINUX ${cflags.cg} -c ${oglsrc}/CgWrapper.c"/>
</exec>
<!-- Create the wrapper library -->
diff --git a/src/native/ogl/build-linux-ia64.xml b/src/native/ogl/build-linux-ia64.xml
index 20d7f4d..ea26b1e 100644
--- a/src/native/ogl/build-linux-ia64.xml
+++ b/src/native/ogl/build-linux-ia64.xml
@@ -35,7 +35,7 @@
<!-- Compile the c source files; based on build-linux-amd64.xml-->
<exec dir="${build}/${platform}/${bldType}/native/ogl/objs" executable="gcc">
- <arg line="-I${java.home}/../include -I${java.home}/../include/linux -I${javahCoreTarget} ${bldFlag} -DLINUX -c ${oglsrc}/DrawingSurfaceObjectAWT.c ${oglsrc}/Canvas3D.c ${oglsrc}/GraphicsContext3D.c ${oglsrc}/NativeWSInfo.c ${oglsrc}/NativeScreenInfo.c ${oglsrc}/NativeConfigTemplate3D.c ${oglsrc}/MasterControl.c ${oglsrc}/RasterRetained.c ${oglsrc}/GeometryArrayRetained.c ${oglsrc}/Attributes.c ${oglsrc}/CgShaderProgram.c ${oglsrc}/GLSLShaderProgram.c ${oglsrc}/Lights.c ${oglsrc}/NativeAPIInfo.c"/>
+ <arg line="-I${oglsrc} -I${java.home}/../include -I${java.home}/../include/linux -I${javahCoreTarget} ${bldFlag} -DLINUX -c ${oglsrc}/DrawingSurfaceObjectAWT.c ${oglsrc}/Canvas3D.c ${oglsrc}/GraphicsContext3D.c ${oglsrc}/NativeWSInfo.c ${oglsrc}/NativeScreenInfo.c ${oglsrc}/NativeConfigTemplate3D.c ${oglsrc}/MasterControl.c ${oglsrc}/RasterRetained.c ${oglsrc}/GeometryArrayRetained.c ${oglsrc}/Attributes.c ${oglsrc}/CgShaderProgram.c ${oglsrc}/GLSLShaderProgram.c ${oglsrc}/Lights.c ${oglsrc}/NativeAPIInfo.c"/>
</exec>
<!-- Create the library file; based on build-linux-amd64.xml-->
diff --git a/src/native/ogl/build-linux-ppc.xml b/src/native/ogl/build-linux-ppc.xml
index 1149d05..3541972 100644
--- a/src/native/ogl/build-linux-ppc.xml
+++ b/src/native/ogl/build-linux-ppc.xml
@@ -36,7 +36,7 @@
<!-- Compile the c source files-->
<!-- Inhibit all warning for 32 bit build. Any warning will be caught in the 64 bit build -->
<exec dir="${build}/${platform}/${bldType}/native/ogl/objs" executable="gcc">
- <arg line="-w -I${java.home}/../include -I${java.home}/../include/linux -I/usr/X11R6/include -I${javahCoreTarget} ${bldFlag} -DLINUX -c ${oglsrc}/DrawingSurfaceObjectAWT.c ${oglsrc}/Canvas3D.c ${oglsrc}/GraphicsContext3D.c ${oglsrc}/NativeWSInfo.c ${oglsrc}/NativeScreenInfo.c ${oglsrc}/NativeConfigTemplate3D.c ${oglsrc}/MasterControl.c ${oglsrc}/RasterRetained.c ${oglsrc}/CompressedGeometryRetained.c ${oglsrc}/GeometryArrayRetained.c ${oglsrc}/Attributes.c ${oglsrc}/CgShaderProgram.c ${oglsrc}/GLSLShaderProgram.c ${oglsrc}/Lights.c ${oglsrc}/NativeAPIInfo.c"/>
+ <arg line="-w -I${oglsrc} -I${java.home}/../include -I${java.home}/../include/linux -I/usr/X11R6/include -I${javahCoreTarget} ${bldFlag} -DLINUX -c ${oglsrc}/DrawingSurfaceObjectAWT.c ${oglsrc}/Canvas3D.c ${oglsrc}/GraphicsContext3D.c ${oglsrc}/NativeWSInfo.c ${oglsrc}/NativeScreenInfo.c ${oglsrc}/NativeConfigTemplate3D.c ${oglsrc}/MasterControl.c ${oglsrc}/RasterRetained.c ${oglsrc}/CompressedGeometryRetained.c ${oglsrc}/GeometryArrayRetained.c ${oglsrc}/Attributes.c ${oglsrc}/CgShaderProgram.c ${oglsrc}/GLSLShaderProgram.c ${oglsrc}/Lights.c ${oglsrc}/NativeAPIInfo.c"/>
</exec>
<!-- Create the library file-->
diff --git a/src/native/ogl/build-solaris-sparc-forte.xml b/src/native/ogl/build-solaris-sparc-forte.xml
index 453d493..586374a 100644
--- a/src/native/ogl/build-solaris-sparc-forte.xml
+++ b/src/native/ogl/build-solaris-sparc-forte.xml
@@ -30,7 +30,7 @@
<!-- Compile the c source files-->
<!-- Inhibit all warning for 32 bit build. Any warning will be caught in the 64 bit build -->
<exec dir="${build}/${platform}/${bldType}/native/ogl/objs" executable="cc">
- <arg line="-v -xCC -xchip=ultra -xarch=v8a -xcode=pic32 -I${java.home}/../include -I${java.home}/../include/solaris -I/usr/openwin/include -I${javahCoreTarget} ${bldFlag} -DSOLARIS -c ${oglsrc}/DrawingSurfaceObjectAWT.c ${oglsrc}/Canvas3D.c ${oglsrc}/GraphicsContext3D.c ${oglsrc}/NativeWSInfo.c ${oglsrc}/NativeScreenInfo.c ${oglsrc}/NativeConfigTemplate3D.c ${oglsrc}/MasterControl.c ${oglsrc}/RasterRetained.c ${oglsrc}/GeometryArrayRetained.c ${oglsrc}/Attributes.c ${oglsrc}/CgShaderProgram.c ${oglsrc}/GLSLShaderProgram.c ${oglsrc}/Lights.c ${oglsrc}/NativeAPIInfo.c"/>
+ <arg line="-v -xCC -xchip=ultra -xarch=v8a -xcode=pic32 -I${oglsrc} -I${java.home}/../include -I${java.home}/../include/solaris -I/usr/openwin/include -I${javahCoreTarget} ${bldFlag} -DSOLARIS -c ${oglsrc}/DrawingSurfaceObjectAWT.c ${oglsrc}/Canvas3D.c ${oglsrc}/GraphicsContext3D.c ${oglsrc}/NativeWSInfo.c ${oglsrc}/NativeScreenInfo.c ${oglsrc}/NativeConfigTemplate3D.c ${oglsrc}/MasterControl.c ${oglsrc}/RasterRetained.c ${oglsrc}/GeometryArrayRetained.c ${oglsrc}/Attributes.c ${oglsrc}/CgShaderProgram.c ${oglsrc}/GLSLShaderProgram.c ${oglsrc}/Lights.c ${oglsrc}/NativeAPIInfo.c"/>
</exec>
<!-- Create the library file-->
@@ -51,7 +51,7 @@
<!-- Compile the c source files-->
<exec dir="${build}/${platform}/${bldType}/native/ogl/objs/sparcv9" executable="cc">
- <arg line="-v -xCC -xchip=ultra -xarch=v9a -xcode=pic32 -I${java.home}/../include -I${java.home}/../include/solaris -I/usr/openwin/include -I${javahCoreTarget} ${bldFlag} -DSOLARIS -c ${oglsrc}/DrawingSurfaceObjectAWT.c ${oglsrc}/Canvas3D.c ${oglsrc}/GraphicsContext3D.c ${oglsrc}/NativeWSInfo.c ${oglsrc}/NativeScreenInfo.c ${oglsrc}/NativeConfigTemplate3D.c ${oglsrc}/MasterControl.c ${oglsrc}/RasterRetained.c ${oglsrc}/GeometryArrayRetained.c ${oglsrc}/Attributes.c ${oglsrc}/CgShaderProgram.c ${oglsrc}/GLSLShaderProgram.c ${oglsrc}/Lights.c ${oglsrc}/NativeAPIInfo.c"/>
+ <arg line="-v -xCC -xchip=ultra -xarch=v9a -xcode=pic32 -I${oglsrc} -I${java.home}/../include -I${java.home}/../include/solaris -I/usr/openwin/include -I${javahCoreTarget} ${bldFlag} -DSOLARIS -c ${oglsrc}/DrawingSurfaceObjectAWT.c ${oglsrc}/Canvas3D.c ${oglsrc}/GraphicsContext3D.c ${oglsrc}/NativeWSInfo.c ${oglsrc}/NativeScreenInfo.c ${oglsrc}/NativeConfigTemplate3D.c ${oglsrc}/MasterControl.c ${oglsrc}/RasterRetained.c ${oglsrc}/GeometryArrayRetained.c ${oglsrc}/Attributes.c ${oglsrc}/CgShaderProgram.c ${oglsrc}/GLSLShaderProgram.c ${oglsrc}/Lights.c ${oglsrc}/NativeAPIInfo.c"/>
</exec>
<!-- Create the library file-->
diff --git a/src/native/ogl/build-solaris-sparc-gcc.xml b/src/native/ogl/build-solaris-sparc-gcc.xml
index fdf7a97..900cc0c 100644
--- a/src/native/ogl/build-solaris-sparc-gcc.xml
+++ b/src/native/ogl/build-solaris-sparc-gcc.xml
@@ -30,7 +30,7 @@
<!-- Compile the c source files-->
<!-- Inhibit all warning for 32 bit build. Any warning will be caught in the 64 bit build -->
<exec dir="${build}/${platform}/${bldType}/native/ogl/objs" executable="gcc">
- <arg line="-w -m32 -mcpu=v9 -I${java.home}/../include -I${java.home}/../include/solaris -I/usr/openwin/include -I${javahCoreTarget} ${bldFlag} -DSOLARIS -c ${oglsrc}/DrawingSurfaceObjectAWT.c ${oglsrc}/Canvas3D.c ${oglsrc}/GraphicsContext3D.c ${oglsrc}/NativeWSInfo.c ${oglsrc}/NativeScreenInfo.c ${oglsrc}/NativeConfigTemplate3D.c ${oglsrc}/MasterControl.c ${oglsrc}/RasterRetained.c ${oglsrc}/GeometryArrayRetained.c ${oglsrc}/Attributes.c ${oglsrc}/CgShaderProgram.c ${oglsrc}/GLSLShaderProgram.c ${oglsrc}/Lights.c ${oglsrc}/NativeAPIInfo.c"/>
+ <arg line="-w -m32 -mcpu=v9 -I${oglsrc} -I${java.home}/../include -I${java.home}/../include/solaris -I/usr/openwin/include -I${javahCoreTarget} ${bldFlag} -DSOLARIS -c ${oglsrc}/DrawingSurfaceObjectAWT.c ${oglsrc}/Canvas3D.c ${oglsrc}/GraphicsContext3D.c ${oglsrc}/NativeWSInfo.c ${oglsrc}/NativeScreenInfo.c ${oglsrc}/NativeConfigTemplate3D.c ${oglsrc}/MasterControl.c ${oglsrc}/RasterRetained.c ${oglsrc}/GeometryArrayRetained.c ${oglsrc}/Attributes.c ${oglsrc}/CgShaderProgram.c ${oglsrc}/GLSLShaderProgram.c ${oglsrc}/Lights.c ${oglsrc}/NativeAPIInfo.c"/>
</exec>
<!-- Create the library file-->
@@ -51,7 +51,7 @@
<!-- Compile the c source files-->
<exec dir="${build}/${platform}/${bldType}/native/ogl/objs/sparcv9" executable="gcc">
- <arg line="-m64 -mcpu=v9 -I${java.home}/../include -I${java.home}/../include/solaris -I/usr/openwin/include -I${javahCoreTarget} ${bldFlag} -DSOLARIS -c ${oglsrc}/DrawingSurfaceObjectAWT.c ${oglsrc}/Canvas3D.c ${oglsrc}/GraphicsContext3D.c ${oglsrc}/NativeWSInfo.c ${oglsrc}/NativeScreenInfo.c ${oglsrc}/NativeConfigTemplate3D.c ${oglsrc}/MasterControl.c ${oglsrc}/RasterRetained.c ${oglsrc}/GeometryArrayRetained.c ${oglsrc}/Attributes.c ${oglsrc}/CgShaderProgram.c ${oglsrc}/GLSLShaderProgram.c ${oglsrc}/Lights.c ${oglsrc}/NativeAPIInfo.c"/>
+ <arg line="-m64 -mcpu=v9 -I${oglsrc} -I${java.home}/../include -I${java.home}/../include/solaris -I/usr/openwin/include -I${javahCoreTarget} ${bldFlag} -DSOLARIS -c ${oglsrc}/DrawingSurfaceObjectAWT.c ${oglsrc}/Canvas3D.c ${oglsrc}/GraphicsContext3D.c ${oglsrc}/NativeWSInfo.c ${oglsrc}/NativeScreenInfo.c ${oglsrc}/NativeConfigTemplate3D.c ${oglsrc}/MasterControl.c ${oglsrc}/RasterRetained.c ${oglsrc}/GeometryArrayRetained.c ${oglsrc}/Attributes.c ${oglsrc}/CgShaderProgram.c ${oglsrc}/GLSLShaderProgram.c ${oglsrc}/Lights.c ${oglsrc}/NativeAPIInfo.c"/>
</exec>
<!-- Create the library file-->
diff --git a/src/native/ogl/build-solaris-x86-forte.xml b/src/native/ogl/build-solaris-x86-forte.xml
index 942319a..c733616 100644
--- a/src/native/ogl/build-solaris-x86-forte.xml
+++ b/src/native/ogl/build-solaris-x86-forte.xml
@@ -30,7 +30,7 @@
<!-- Compile the c source files-->
<!-- Inhibit all warning for 32 bit build. Any warning will be caught in the 64 bit build -->
<exec dir="${build}/${platform}/${bldType}/native/ogl/objs" executable="cc">
- <arg line="-v -xCC -xchip=pentium3 -xarch=generic -KPIC -I${java.home}/../include -I${java.home}/../include/solaris -I/usr/openwin/include -I${javahCoreTarget} ${bldFlag} -DSOLARIS -c ${oglsrc}/DrawingSurfaceObjectAWT.c ${oglsrc}/Canvas3D.c ${oglsrc}/GraphicsContext3D.c ${oglsrc}/NativeWSInfo.c ${oglsrc}/NativeScreenInfo.c ${oglsrc}/NativeConfigTemplate3D.c ${oglsrc}/MasterControl.c ${oglsrc}/RasterRetained.c ${oglsrc}/GeometryArrayRetained.c ${oglsrc}/Attributes.c ${oglsrc}/CgShaderProgram.c ${oglsrc}/GLSLShaderProgram.c ${oglsrc}/Lights.c ${oglsrc}/NativeAPIInfo.c"/>
+ <arg line="-v -xCC -xchip=pentium3 -xarch=generic -KPIC -I${oglsrc} -I${java.home}/../include -I${java.home}/../include/solaris -I/usr/openwin/include -I${javahCoreTarget} ${bldFlag} -DSOLARIS -c ${oglsrc}/DrawingSurfaceObjectAWT.c ${oglsrc}/Canvas3D.c ${oglsrc}/GraphicsContext3D.c ${oglsrc}/NativeWSInfo.c ${oglsrc}/NativeScreenInfo.c ${oglsrc}/NativeConfigTemplate3D.c ${oglsrc}/MasterControl.c ${oglsrc}/RasterRetained.c ${oglsrc}/GeometryArrayRetained.c ${oglsrc}/Attributes.c ${oglsrc}/CgShaderProgram.c ${oglsrc}/GLSLShaderProgram.c ${oglsrc}/Lights.c ${oglsrc}/NativeAPIInfo.c"/>
</exec>
<!-- Create the library file-->
@@ -58,7 +58,7 @@
<!-- Compile the c source files-->
<exec dir="${build}/${platform}/${bldType}/native/ogl/objs/amd64" executable="cc">
- <arg line="-v -xCC -xchip=opteron -xarch=generic64 -KPIC -I${java.home}/../include -I${java.home}/../include/solaris -I/usr/openwin/include -I${javahCoreTarget} ${bldFlag} -DSOLARIS -c ${oglsrc}/DrawingSurfaceObjectAWT.c ${oglsrc}/Canvas3D.c ${oglsrc}/GraphicsContext3D.c ${oglsrc}/NativeWSInfo.c ${oglsrc}/NativeScreenInfo.c ${oglsrc}/NativeConfigTemplate3D.c ${oglsrc}/MasterControl.c ${oglsrc}/RasterRetained.c ${oglsrc}/GeometryArrayRetained.c ${oglsrc}/Attributes.c ${oglsrc}/CgShaderProgram.c ${oglsrc}/GLSLShaderProgram.c ${oglsrc}/Lights.c ${oglsrc}/NativeAPIInfo.c"/>
+ <arg line="-v -xCC -xchip=opteron -xarch=generic64 -KPIC -I${oglsrc} -I${java.home}/../include -I${java.home}/../include/solaris -I/usr/openwin/include -I${javahCoreTarget} ${bldFlag} -DSOLARIS -c ${oglsrc}/DrawingSurfaceObjectAWT.c ${oglsrc}/Canvas3D.c ${oglsrc}/GraphicsContext3D.c ${oglsrc}/NativeWSInfo.c ${oglsrc}/NativeScreenInfo.c ${oglsrc}/NativeConfigTemplate3D.c ${oglsrc}/MasterControl.c ${oglsrc}/RasterRetained.c ${oglsrc}/GeometryArrayRetained.c ${oglsrc}/Attributes.c ${oglsrc}/CgShaderProgram.c ${oglsrc}/GLSLShaderProgram.c ${oglsrc}/Lights.c ${oglsrc}/NativeAPIInfo.c"/>
</exec>
<!-- Create the library file-->
diff --git a/src/native/ogl/build-solaris-x86-gcc.xml b/src/native/ogl/build-solaris-x86-gcc.xml
index 7131d06..79deadc 100644
--- a/src/native/ogl/build-solaris-x86-gcc.xml
+++ b/src/native/ogl/build-solaris-x86-gcc.xml
@@ -30,7 +30,7 @@
<!-- Compile the c source files-->
<!-- Inhibit all warning for 32 bit build. Any warning will be caught in the 64 bit build -->
<exec dir="${build}/${platform}/${bldType}/native/ogl/objs" executable="gcc">
- <arg line="-w -m32 -I${java.home}/../include -I${java.home}/../include/solaris -I/usr/openwin/include -I${javahCoreTarget} ${bldFlag} -DSOLARIS -c ${oglsrc}/DrawingSurfaceObjectAWT.c ${oglsrc}/Canvas3D.c ${oglsrc}/GraphicsContext3D.c ${oglsrc}/NativeWSInfo.c ${oglsrc}/NativeScreenInfo.c ${oglsrc}/NativeConfigTemplate3D.c ${oglsrc}/MasterControl.c ${oglsrc}/RasterRetained.c ${oglsrc}/GeometryArrayRetained.c ${oglsrc}/Attributes.c ${oglsrc}/CgShaderProgram.c ${oglsrc}/GLSLShaderProgram.c ${oglsrc}/Lights.c ${oglsrc}/NativeAPIInfo.c"/>
+ <arg line="-w -m32 -I${oglsrc} -I${java.home}/../include -I${java.home}/../include/solaris -I/usr/openwin/include -I${javahCoreTarget} ${bldFlag} -DSOLARIS -c ${oglsrc}/DrawingSurfaceObjectAWT.c ${oglsrc}/Canvas3D.c ${oglsrc}/GraphicsContext3D.c ${oglsrc}/NativeWSInfo.c ${oglsrc}/NativeScreenInfo.c ${oglsrc}/NativeConfigTemplate3D.c ${oglsrc}/MasterControl.c ${oglsrc}/RasterRetained.c ${oglsrc}/GeometryArrayRetained.c ${oglsrc}/Attributes.c ${oglsrc}/CgShaderProgram.c ${oglsrc}/GLSLShaderProgram.c ${oglsrc}/Lights.c ${oglsrc}/NativeAPIInfo.c"/>
</exec>
<!-- Create the library file-->
@@ -58,7 +58,7 @@
<!-- Compile the c source files-->
<exec dir="${build}/${platform}/${bldType}/native/ogl/objs/amd64" executable="gcc">
- <arg line="-m64 -I${java.home}/../include -I${java.home}/../include/solaris -I/usr/openwin/include -I${javahCoreTarget} ${bldFlag} -DSOLARIS -c ${oglsrc}/DrawingSurfaceObjectAWT.c ${oglsrc}/Canvas3D.c ${oglsrc}/GraphicsContext3D.c ${oglsrc}/NativeWSInfo.c ${oglsrc}/NativeScreenInfo.c ${oglsrc}/NativeConfigTemplate3D.c ${oglsrc}/MasterControl.c ${oglsrc}/RasterRetained.c ${oglsrc}/GeometryArrayRetained.c ${oglsrc}/Attributes.c ${oglsrc}/CgShaderProgram.c ${oglsrc}/GLSLShaderProgram.c ${oglsrc}/Lights.c ${oglsrc}/NativeAPIInfo.c"/>
+ <arg line="-m64 -I${oglsrc} -I${java.home}/../include -I${java.home}/../include/solaris -I/usr/openwin/include -I${javahCoreTarget} ${bldFlag} -DSOLARIS -c ${oglsrc}/DrawingSurfaceObjectAWT.c ${oglsrc}/Canvas3D.c ${oglsrc}/GraphicsContext3D.c ${oglsrc}/NativeWSInfo.c ${oglsrc}/NativeScreenInfo.c ${oglsrc}/NativeConfigTemplate3D.c ${oglsrc}/MasterControl.c ${oglsrc}/RasterRetained.c ${oglsrc}/GeometryArrayRetained.c ${oglsrc}/Attributes.c ${oglsrc}/CgShaderProgram.c ${oglsrc}/GLSLShaderProgram.c ${oglsrc}/Lights.c ${oglsrc}/NativeAPIInfo.c"/>
</exec>
<!-- Create the library file-->
diff --git a/src/native/ogl/build-windows-i586-gcc.xml b/src/native/ogl/build-windows-i586-gcc.xml
index 08c07db..38824fd 100644
--- a/src/native/ogl/build-windows-i586-gcc.xml
+++ b/src/native/ogl/build-windows-i586-gcc.xml
@@ -52,7 +52,7 @@
<!-- Inhibit all warning for native build. Remove -w to switch warning on -->
<exec dir="${build}/${platform}/${bldType}/native/ogl/objs" executable="gcc">
- <arg line="-w -D_WINGDI_ -D_JNI_IMPLEMENTATION_ -I&quot;${javaInclude}&quot; -I&quot;${javaWin32Include}&quot; -I&quot;${javahCoreTarget}&quot; ${bldFlag} -c &quot;${oglsrc}/DrawingSurfaceObjectAWT.c&quot; &quot;${oglsrc}/Canvas3D.c&quot; &quot;${oglsrc}/GraphicsContext3D.c&quot; &quot;${oglsrc}/NativeWSInfo.c&quot; &quot;${oglsrc}/NativeScreenInfo.c&quot; &quot;${oglsrc}/NativeConfigTemplate3D.c&quot; &quot;${oglsrc}/MasterControl.c&quot; &quot;${oglsrc}/RasterRetained.c&quot; &quot;${oglsrc}/GeometryArrayRetained.c&quot; &quot;${oglsrc}/Attributes.c&quot; &quot;${oglsrc}/CgShaderProgram.c&quot; &quot;${oglsrc}/GLSLShaderProgram.c&quot; &quot;${oglsrc}/Lights.c&quot; &quot;${oglsrc}/NativeAPIInfo.c&quot;"/>
+ <arg line="-w -D_WINGDI_ -D_JNI_IMPLEMENTATION_ -I&quot;${oglsrc}&quot; -I&quot;${javaInclude}&quot; -I&quot;${javaWin32Include}&quot; -I&quot;${javahCoreTarget}&quot; ${bldFlag} -c &quot;${oglsrc}/DrawingSurfaceObjectAWT.c&quot; &quot;${oglsrc}/Canvas3D.c&quot; &quot;${oglsrc}/GraphicsContext3D.c&quot; &quot;${oglsrc}/NativeWSInfo.c&quot; &quot;${oglsrc}/NativeScreenInfo.c&quot; &quot;${oglsrc}/NativeConfigTemplate3D.c&quot; &quot;${oglsrc}/MasterControl.c&quot; &quot;${oglsrc}/RasterRetained.c&quot; &quot;${oglsrc}/GeometryArrayRetained.c&quot; &quot;${oglsrc}/Attributes.c&quot; &quot;${oglsrc}/CgShaderProgram.c&quot; &quot;${oglsrc}/GLSLShaderProgram.c&quot; &quot;${oglsrc}/Lights.c&quot; &quot;${oglsrc}/NativeAPIInfo.c&quot;"/>
</exec>
<!-- Create the library file-->
diff --git a/src/native/ogl/build-windows-i586-vc.xml b/src/native/ogl/build-windows-i586-vc.xml
index 284362e..1977e00 100644
--- a/src/native/ogl/build-windows-i586-vc.xml
+++ b/src/native/ogl/build-windows-i586-vc.xml
@@ -55,7 +55,7 @@
<target name="compile-ogl">
<!-- Compile the c source files-->
<exec dir="${build}/${platform}/${bldType}/native/ogl/objs" executable="cl">
- <arg line="-I&quot;${javaInclude}&quot; -I&quot;${javaWin32Include}&quot; -I&quot;${javahCoreTarget}&quot; -I&quot;${cg.home}\include&quot; -nologo -MT -W3 -GX -Ox -YX -FD ${bldFlag} ${cflags.cg} -c &quot;${oglsrc}/DrawingSurfaceObjectAWT.c&quot; &quot;${oglsrc}/Canvas3D.c&quot; &quot;${oglsrc}/GraphicsContext3D.c&quot; &quot;${oglsrc}/NativeWSInfo.c&quot; &quot;${oglsrc}/NativeScreenInfo.c&quot; &quot;${oglsrc}/NativeConfigTemplate3D.c&quot; &quot;${oglsrc}/MasterControl.c&quot; &quot;${oglsrc}/RasterRetained.c&quot; &quot;${oglsrc}/GeometryArrayRetained.c&quot; &quot;${oglsrc}/Attributes.c&quot; &quot;${oglsrc}/CgShaderProgram.c&quot; &quot;${oglsrc}/GLSLShaderProgram.c&quot; &quot;${oglsrc}/Lights.c&quot; &quot;${oglsrc}/NativeAPIInfo.c&quot;"/>
+ <arg line="-I&quot;${oglsrc}&quot; -I&quot;${javaInclude}&quot; -I&quot;${javaWin32Include}&quot; -I&quot;${javahCoreTarget}&quot; -I&quot;${cg.home}\include&quot; -nologo -MT -W3 -GX -Ox -YX -FD ${bldFlag} ${cflags.cg} -c &quot;${oglsrc}/DrawingSurfaceObjectAWT.c&quot; &quot;${oglsrc}/Canvas3D.c&quot; &quot;${oglsrc}/GraphicsContext3D.c&quot; &quot;${oglsrc}/NativeWSInfo.c&quot; &quot;${oglsrc}/NativeScreenInfo.c&quot; &quot;${oglsrc}/NativeConfigTemplate3D.c&quot; &quot;${oglsrc}/MasterControl.c&quot; &quot;${oglsrc}/RasterRetained.c&quot; &quot;${oglsrc}/GeometryArrayRetained.c&quot; &quot;${oglsrc}/Attributes.c&quot; &quot;${oglsrc}/CgShaderProgram.c&quot; &quot;${oglsrc}/GLSLShaderProgram.c&quot; &quot;${oglsrc}/Lights.c&quot; &quot;${oglsrc}/NativeAPIInfo.c&quot;"/>
</exec>
<!-- Create the library file-->
@@ -69,7 +69,7 @@
<target name="compile-ogl-cg" if="build.cg">
<!-- Compile the c source files-->
<exec dir="${build}/${platform}/${bldType}/native/ogl/objs" executable="cl">
- <arg line="-I&quot;${javaInclude}&quot; -I&quot;${javaWin32Include}&quot; -I&quot;${javahCoreTarget}&quot; -I&quot;${cg.home}\include&quot; -nologo -MT -W3 -GX -Ox -YX -FD ${bldFlag} ${cflags.cg} -c &quot;${oglsrc}/CgWrapper.c&quot;"/>
+ <arg line="-I&quot;${oglsrc}&quot; -I&quot;${javaInclude}&quot; -I&quot;${javaWin32Include}&quot; -I&quot;${javahCoreTarget}&quot; -I&quot;${cg.home}\include&quot; -nologo -MT -W3 -GX -Ox -YX -FD ${bldFlag} ${cflags.cg} -c &quot;${oglsrc}/CgWrapper.c&quot;"/>
</exec>
<!-- Create the library file-->
diff --git a/src/native/ogl/gldefs.h b/src/native/ogl/gldefs.h
index 2e5246f..48d5b33 100644
--- a/src/native/ogl/gldefs.h
+++ b/src/native/ogl/gldefs.h
@@ -23,6 +23,20 @@
#include <stdlib.h>
#include <string.h>
+/*
+ * Before we include gl.h we need to ensure that our versions of the
+ * wglext.h and glext.h files get loaded, not the platform's versions.
+ */
+#ifndef __glext_h_
+#define __glext_h_
+#define Java3D_undef__glext_h_
+#endif
+
+#ifndef __wglext_h_
+#define __wglext_h_
+#define Java3D_undef__wglext_h_
+#endif
+
#if defined(SOLARIS) || defined(LINUX)
#define GLX_GLEXT_PROTOTYPES
#define GLX_GLXEXT_PROTOTYPES
@@ -31,8 +45,12 @@
#include <limits.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
+
#include <GL/gl.h>
#include <GL/glx.h>
+#ifdef Java3D_undef__glext_h_
+#undef __glext_h_
+#endif
#include "glext.h"
#endif
@@ -73,6 +91,12 @@
#ifndef D3D
#include <GL/gl.h>
+#ifdef Java3D_undef__wglext_h_
+#undef __wglext_h_
+#endif
+#ifdef Java3D_undef__glext_h_
+#undef __glext_h_
+#endif
#include "wglext.h"
#include "glext.h"
#endif
diff --git a/src/native/ogl/glext.h b/src/native/ogl/glext.h
index 9e88dd9..7bb8e6e 100644
--- a/src/native/ogl/glext.h
+++ b/src/native/ogl/glext.h
@@ -52,9 +52,9 @@ extern "C" {
/*************************************************************/
/* Header file version number, required by OpenGL ABI for Linux */
-/* glext.h last updated 2005/01/07 */
+/* glext.h last updated 2005/06/20 */
/* Current version at http://oss.sgi.com/projects/ogl-sample/registry/ */
-#define GL_GLEXT_VERSION 25
+#define GL_GLEXT_VERSION 29
#ifndef GL_VERSION_1_2
#define GL_UNSIGNED_BYTE_3_3_2 0x8032
@@ -915,7 +915,7 @@ extern "C" {
#ifndef GL_ARB_color_buffer_float
#define GL_RGBA_FLOAT_MODE_ARB 0x8820
#define GL_CLAMP_VERTEX_COLOR_ARB 0x891A
-#define GL_CLAMP_FRAGMENT_COLOR_ARB 0x891A
+#define GL_CLAMP_FRAGMENT_COLOR_ARB 0x891B
#define GL_CLAMP_READ_COLOR_ARB 0x891C
#define GL_FIXED_ONLY_ARB 0x891D
#endif
@@ -2922,6 +2922,11 @@ extern "C" {
#ifndef GL_ATI_vertex_attrib_array_object
#endif
+#ifndef GL_OES_read_format
+#define GL_IMPLEMENTATION_COLOR_READ_TYPE_OES 0x8B9A
+#define GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES 0x8B9B
+#endif
+
#ifndef GL_EXT_depth_bounds_test
#define GL_DEPTH_BOUNDS_TEST_EXT 0x8890
#define GL_DEPTH_BOUNDS_EXT 0x8891
@@ -2975,12 +2980,70 @@ extern "C" {
/* reuse GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB */
#endif
+#ifndef GL_EXT_framebuffer_object
+#define GL_INVALID_FRAMEBUFFER_OPERATION_EXT 0x0506
+#define GL_MAX_RENDERBUFFER_SIZE_EXT 0x84E8
+#define GL_FRAMEBUFFER_BINDING_EXT 0x8CA6
+#define GL_RENDERBUFFER_BINDING_EXT 0x8CA7
+#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT 0x8CD0
+#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT 0x8CD1
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT 0x8CD2
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT 0x8CD3
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT 0x8CD4
+#define GL_FRAMEBUFFER_COMPLETE_EXT 0x8CD5
+#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT 0x8CD6
+#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT 0x8CD7
+#define GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT 0x8CD8
+#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT 0x8CD9
+#define GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT 0x8CDA
+#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT 0x8CDB
+#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT 0x8CDC
+#define GL_FRAMEBUFFER_UNSUPPORTED_EXT 0x8CDD
+#define GL_MAX_COLOR_ATTACHMENTS_EXT 0x8CDF
+#define GL_COLOR_ATTACHMENT0_EXT 0x8CE0
+#define GL_COLOR_ATTACHMENT1_EXT 0x8CE1
+#define GL_COLOR_ATTACHMENT2_EXT 0x8CE2
+#define GL_COLOR_ATTACHMENT3_EXT 0x8CE3
+#define GL_COLOR_ATTACHMENT4_EXT 0x8CE4
+#define GL_COLOR_ATTACHMENT5_EXT 0x8CE5
+#define GL_COLOR_ATTACHMENT6_EXT 0x8CE6
+#define GL_COLOR_ATTACHMENT7_EXT 0x8CE7
+#define GL_COLOR_ATTACHMENT8_EXT 0x8CE8
+#define GL_COLOR_ATTACHMENT9_EXT 0x8CE9
+#define GL_COLOR_ATTACHMENT10_EXT 0x8CEA
+#define GL_COLOR_ATTACHMENT11_EXT 0x8CEB
+#define GL_COLOR_ATTACHMENT12_EXT 0x8CEC
+#define GL_COLOR_ATTACHMENT13_EXT 0x8CED
+#define GL_COLOR_ATTACHMENT14_EXT 0x8CEE
+#define GL_COLOR_ATTACHMENT15_EXT 0x8CEF
+#define GL_DEPTH_ATTACHMENT_EXT 0x8D00
+#define GL_STENCIL_ATTACHMENT_EXT 0x8D20
+#define GL_FRAMEBUFFER_EXT 0x8D40
+#define GL_RENDERBUFFER_EXT 0x8D41
+#define GL_RENDERBUFFER_WIDTH_EXT 0x8D42
+#define GL_RENDERBUFFER_HEIGHT_EXT 0x8D43
+#define GL_RENDERBUFFER_INTERNAL_FORMAT_EXT 0x8D44
+#define GL_STENCIL_INDEX1_EXT 0x8D46
+#define GL_STENCIL_INDEX4_EXT 0x8D47
+#define GL_STENCIL_INDEX8_EXT 0x8D48
+#define GL_STENCIL_INDEX16_EXT 0x8D49
+#define GL_RENDERBUFFER_RED_SIZE_EXT 0x8D50
+#define GL_RENDERBUFFER_GREEN_SIZE_EXT 0x8D51
+#define GL_RENDERBUFFER_BLUE_SIZE_EXT 0x8D52
+#define GL_RENDERBUFFER_ALPHA_SIZE_EXT 0x8D53
+#define GL_RENDERBUFFER_DEPTH_SIZE_EXT 0x8D54
+#define GL_RENDERBUFFER_STENCIL_SIZE_EXT 0x8D55
+#endif
+
+#ifndef GL_GREMEDY_string_marker
+#endif
+
/*************************************************************/
#include <stddef.h>
#ifndef GL_VERSION_2_0
-/* GL types for andling program/shader text */
+/* GL type for program/shader text */
typedef char GLchar; /* native character */
#endif
@@ -2997,13 +3060,17 @@ typedef ptrdiff_t GLsizeiptrARB;
#endif
#ifndef GL_ARB_shader_objects
-/* GL types for handling shader object handles and characters */
+/* GL types for handling shader object handles and program/shader text */
typedef char GLcharARB; /* native character */
typedef unsigned int GLhandleARB; /* shader object handle */
#endif
+/* GL types for "half" precision (s10e5) float data in host memory */
+#ifndef GL_ARB_half_float_pixel
+typedef unsigned short GLhalfARB;
+#endif
+
#ifndef GL_NV_half_float
-/* GL type for representing NVIDIA "half" floating point type in host memory */
typedef unsigned short GLhalfNV;
#endif
@@ -6320,6 +6387,10 @@ typedef void (APIENTRYP PFNGLGETVERTEXATTRIBARRAYOBJECTFVATIPROC) (GLuint index,
typedef void (APIENTRYP PFNGLGETVERTEXATTRIBARRAYOBJECTIVATIPROC) (GLuint index, GLenum pname, GLint *params);
#endif
+#ifndef GL_OES_read_format
+#define GL_OES_read_format 1
+#endif
+
#ifndef GL_EXT_depth_bounds_test
#define GL_EXT_depth_bounds_test 1
#ifdef GL_GLEXT_PROTOTYPES
@@ -6368,6 +6439,54 @@ typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEEXTPROC) (GLenum modeRGB, GLen
#define GL_NV_vertex_program3 1
#endif
+#ifndef GL_EXT_framebuffer_object
+#define GL_EXT_framebuffer_object 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI GLboolean APIENTRY glIsRenderbufferEXT (GLuint);
+GLAPI void APIENTRY glBindRenderbufferEXT (GLenum, GLuint);
+GLAPI void APIENTRY glDeleteRenderbuffersEXT (GLsizei, const GLuint *);
+GLAPI void APIENTRY glGenRenderbuffersEXT (GLsizei, GLuint *);
+GLAPI void APIENTRY glRenderbufferStorageEXT (GLenum, GLenum, GLsizei, GLsizei);
+GLAPI void APIENTRY glGetRenderbufferParameterivEXT (GLenum, GLenum, GLint *);
+GLAPI GLboolean APIENTRY glIsFramebufferEXT (GLuint);
+GLAPI void APIENTRY glBindFramebufferEXT (GLenum, GLuint);
+GLAPI void APIENTRY glDeleteFramebuffersEXT (GLsizei, const GLuint *);
+GLAPI void APIENTRY glGenFramebuffersEXT (GLsizei, GLuint *);
+GLAPI GLenum APIENTRY glCheckFramebufferStatusEXT (GLenum);
+GLAPI void APIENTRY glFramebufferTexture1DEXT (GLenum, GLenum, GLenum, GLuint, GLint);
+GLAPI void APIENTRY glFramebufferTexture2DEXT (GLenum, GLenum, GLenum, GLuint, GLint);
+GLAPI void APIENTRY glFramebufferTexture3DEXT (GLenum, GLenum, GLenum, GLuint, GLint, GLint);
+GLAPI void APIENTRY glFramebufferRenderbufferEXT (GLenum, GLenum, GLenum, GLuint);
+GLAPI void APIENTRY glGetFramebufferAttachmentParameterivEXT (GLenum, GLenum, GLenum, GLint *);
+GLAPI void APIENTRY glGenerateMipmapEXT (GLenum);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef GLboolean (APIENTRYP PFNGLISRENDERBUFFEREXTPROC) (GLuint renderbuffer);
+typedef void (APIENTRYP PFNGLBINDRENDERBUFFEREXTPROC) (GLenum target, GLuint renderbuffer);
+typedef void (APIENTRYP PFNGLDELETERENDERBUFFERSEXTPROC) (GLsizei n, const GLuint *renderbuffers);
+typedef void (APIENTRYP PFNGLGENRENDERBUFFERSEXTPROC) (GLsizei n, GLuint *renderbuffers);
+typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
+typedef void (APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
+typedef GLboolean (APIENTRYP PFNGLISFRAMEBUFFEREXTPROC) (GLuint framebuffer);
+typedef void (APIENTRYP PFNGLBINDFRAMEBUFFEREXTPROC) (GLenum target, GLuint framebuffer);
+typedef void (APIENTRYP PFNGLDELETEFRAMEBUFFERSEXTPROC) (GLsizei n, const GLuint *framebuffers);
+typedef void (APIENTRYP PFNGLGENFRAMEBUFFERSEXTPROC) (GLsizei n, GLuint *framebuffers);
+typedef GLenum (APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC) (GLenum target);
+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE1DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
+typedef void (APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
+typedef void (APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGENERATEMIPMAPEXTPROC) (GLenum target);
+#endif
+
+#ifndef GL_GREMEDY_string_marker
+#define GL_GREMEDY_string_marker 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glStringMarkerGREMEDY (GLsizei, const GLvoid *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLSTRINGMARKERGREMEDYPROC) (GLsizei len, const GLvoid *string);
+#endif
+
#ifdef __cplusplus
}