Made trunk sync with commit r11019 and commit r11020

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@11021 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
experimental
rem..om 11 years ago
parent 84aa234446
commit 5d02fe1c20
  1. 9
      engine/src/android/com/jme3/renderer/android/OGLESShaderRenderer.java
  2. 6
      engine/src/core/com/jme3/material/Material.java
  3. 6
      engine/src/jogl/com/jme3/renderer/jogl/JoglGL1Renderer.java
  4. 4
      engine/src/jogl/com/jme3/renderer/jogl/JoglRenderer.java
  5. 6
      engine/src/lwjgl/com/jme3/renderer/lwjgl/LwjglGL1Renderer.java
  6. 6
      engine/src/lwjgl/com/jme3/renderer/lwjgl/LwjglRenderer.java

@ -153,6 +153,11 @@ public class OGLESShaderRenderer implements Renderer {
powerVr = GLES20.glGetString(GLES20.GL_RENDERER).contains("PowerVR");
//workaround, always assume we support GLSL100
//some cards just don't report this correctly
caps.add(Caps.GLSL100);
/*
// Fix issue in TestRenderToMemory when GL_FRONT is the main
// buffer being used.
@ -2302,7 +2307,7 @@ public class OGLESShaderRenderer implements Renderer {
}
}
VertexBuffer indices = null;
VertexBuffer indices;
if (mesh.getNumLodLevels() > 0) {
indices = mesh.getLodLevel(lod);
} else {
@ -2319,7 +2324,7 @@ public class OGLESShaderRenderer implements Renderer {
}
private void renderMeshDefault(Mesh mesh, int lod, int count) {
VertexBuffer indices = null;
VertexBuffer indices;
VertexBuffer interleavedData = mesh.getBuffer(Type.InterleavedData);
if (interleavedData != null && interleavedData.isUpdateNeeded()) {
updateBufferData(interleavedData);

@ -893,12 +893,6 @@ public class Material implements CloneableSmartAsset, Cloneable, Savable {
// When choosing technique, we choose one that
// supports all the caps.
EnumSet<Caps> rendererCaps = renderManager.getRenderer().getCaps();
//workaround, always assume we support GLSL100
//some cards just don't report this correctly
if( rendererCaps.contains(Caps.GLSL100) == false )
rendererCaps.add(Caps.GLSL100);
if (tech == null) {
if (name.equals("Default")) {

@ -138,6 +138,10 @@ public class JoglGL1Renderer implements GL1Renderer {
gl12 = true;
}
//workaround, always assume we support GLSL100
//some cards just don't report this correctly
caps.add(Caps.GLSL100);
// Default values for certain GL state.
gl.getGL2ES1().glShadeModel(GLLightingFunc.GL_SMOOTH);
gl.getGL2().glColorMaterial(GL.GL_FRONT_AND_BACK, GLLightingFunc.GL_DIFFUSE);
@ -1136,7 +1140,7 @@ public class JoglGL1Renderer implements GL1Renderer {
}
private void renderMeshDefault(Mesh mesh, int lod, int count) {
VertexBuffer indices = null;
VertexBuffer indices;
VertexBuffer interleavedData = mesh.getBuffer(Type.InterleavedData);
if (interleavedData != null && interleavedData.isUpdateNeeded()) {

@ -164,6 +164,10 @@ public class JoglRenderer implements Renderer {
}
}
//workaround, always assume we support GLSL100
//some cards just don't report this correctly
caps.add(Caps.GLSL100);
String versionStr = null;
if (caps.contains(Caps.OpenGL20) || gl.isGL2ES2()) {
versionStr = gl.glGetString(GL2ES2.GL_SHADING_LANGUAGE_VERSION);

@ -102,6 +102,10 @@ public class LwjglGL1Renderer implements GL1Renderer {
gl12 = true;
}
//workaround, always assume we support GLSL100
//some cards just don't report this correctly
caps.add(Caps.GLSL100);
// Default values for certain GL state.
glShadeModel(GL_SMOOTH);
glColorMaterial(GL_FRONT_AND_BACK, GL_DIFFUSE);
@ -1077,7 +1081,7 @@ public class LwjglGL1Renderer implements GL1Renderer {
}
private void renderMeshDefault(Mesh mesh, int lod, int count) {
VertexBuffer indices = null;
VertexBuffer indices;
VertexBuffer interleavedData = mesh.getBuffer(Type.InterleavedData);
if (interleavedData != null && interleavedData.isUpdateNeeded()) {

@ -55,7 +55,9 @@ import com.jme3.texture.Texture;
import com.jme3.texture.Texture.WrapAxis;
import com.jme3.util.BufferUtils;
import com.jme3.util.ListMap;
import com.jme3.util.NativeObject;
import com.jme3.util.NativeObjectManager;
import com.jme3.util.SafeArrayList;
import java.nio.*;
import java.util.EnumSet;
import java.util.List;
@ -157,6 +159,10 @@ public class LwjglRenderer implements Renderer {
}
}
//workaround, always assume we support GLSL100
//some cards just don't report this correctly
caps.add(Caps.GLSL100);
String versionStr = null;
if (ctxCaps.OpenGL20) {
versionStr = glGetString(GL_SHADING_LANGUAGE_VERSION);

Loading…
Cancel
Save