aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl
diff options
context:
space:
mode:
authorRami Santina <[email protected]>2011-10-06 20:21:31 +0300
committerRami Santina <[email protected]>2011-10-06 20:21:31 +0300
commitfe8e357ac03d8dd5e244879647fcec7fca60dedc (patch)
tree9f45329f07d379902dcc9c62c630f7972f96b73b /src/jogl
parent25204678f889de889a6b23c170e17bd7f13d2c01 (diff)
parentfa7627f623141c6fa15856c74d26c8ffe82550d0 (diff)
Merge branch 'master' of git://github.com/sgothel/jogl
Diffstat (limited to 'src/jogl')
-rw-r--r--src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderUtil.java8
-rw-r--r--src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfigurationFactory.java10
2 files changed, 13 insertions, 5 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderUtil.java b/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderUtil.java
index 9ccd38bf1..747dd5c49 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderUtil.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderUtil.java
@@ -39,6 +39,8 @@ import java.util.*;
import javax.media.opengl.*;
+import com.jogamp.common.nio.Buffers;
+
public class ShaderUtil {
static abstract class Impl {
public abstract String getShaderInfoLog(GL gl, int shaderObj);
@@ -237,11 +239,11 @@ public class ShaderUtil {
throw new GLException("No sources specified");
}
- int[] lengths = new int[count];
+ IntBuffer lengths = Buffers.newDirectIntBuffer(count);
for(int i=0; i<count; i++) {
- lengths[i] = source[i].length();
+ lengths.put(i, source[i].length());
}
- gl.glShaderSource(shader, count, source, lengths, 0);
+ gl.glShaderSource(shader, count, source, lengths);
}
public void shaderSource(GL _gl, IntBuffer shaders, java.lang.String[][] sources)
diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfigurationFactory.java b/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfigurationFactory.java
index 36a93f348..8c1cf882c 100644
--- a/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfigurationFactory.java
+++ b/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfigurationFactory.java
@@ -301,15 +301,21 @@ public class EGLGraphicsConfigurationFactory extends GLGraphicsConfigurationFact
}
if(0<=nativeVisualID) {
+ List/*<EGLGLCapabilities>*/ removedCaps = new ArrayList();
for(int i=0; i<availableCaps.size(); ) {
EGLGLCapabilities ecap = (EGLGLCapabilities) availableCaps.get(i);
if(ecap.getNativeVisualID()!=nativeVisualID) {
- availableCaps.remove(i);
+ removedCaps.add(availableCaps.remove(i));
} else {
i++;
}
}
- if(DEBUG) {
+ if(0==availableCaps.size()) {
+ availableCaps = removedCaps;
+ if(DEBUG) {
+ System.err.println("EGLGraphicsConfiguration.eglChooseConfig: post filter nativeVisualID ("+nativeVisualID+") no config found, revert to all");
+ }
+ } else if(DEBUG) {
System.err.println("EGLGraphicsConfiguration.eglChooseConfig: post filter nativeVisualID ("+nativeVisualID+") got configs: "+availableCaps.size());
}
}