Fix to previous commit to OGLESShaderRenderer. Accidently committed unrelated and non working changes to the renderer.

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10057 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
rem..om 12 years ago
parent 35697b036e
commit 9a6fe1fdf5
  1. 36
      engine/src/android/com/jme3/renderer/android/OGLESShaderRenderer.java

@ -63,9 +63,6 @@ import java.util.EnumSet;
import java.util.List; import java.util.List;
import java.util.logging.Level; import java.util.logging.Level;
import java.util.logging.Logger; import java.util.logging.Logger;
import javax.microedition.khronos.egl.EGLContext;
import javax.microedition.khronos.opengles.GL10;
import javax.microedition.khronos.opengles.GL11;
import jme3tools.shader.ShaderDebug; import jme3tools.shader.ShaderDebug;
public class OGLESShaderRenderer implements Renderer { public class OGLESShaderRenderer implements Renderer {
@ -335,12 +332,11 @@ public class OGLESShaderRenderer implements Renderer {
logger.log(Level.INFO, "Caps: {0}", caps); logger.log(Level.INFO, "Caps: {0}", caps);
} }
/** /**
* <code>resetGLObjects</code> should be called when die GLView gets recreated to reset all GPU objects * <code>resetGLObjects</code> should be called when die GLView gets recreated to reset all GPU objects
*/ */
public void resetGLObjects() { public void resetGLObjects() {
objManager.resetObjects(); objManager.resetObjects();
statistics.clearMemory(); statistics.clearMemory();
boundShader = null; boundShader = null;
@ -420,18 +416,12 @@ public class OGLESShaderRenderer implements Renderer {
context.colorWriteEnabled = false; context.colorWriteEnabled = false;
} }
// if (state.isPointSprite() && !context.pointSprite) { // if (state.isPointSprite() && !context.pointSprite) {
// GL11.glEnable(GL11.GL_POINT_SPRITE_OES); //// GLES20.glEnable(GLES20.GL_POINT_SPRITE);
// gl.glEnableClientState(GL11.GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES); //// GLES20.glTexEnvi(GLES20.GL_POINT_SPRITE, GLES20.GL_COORD_REPLACE, GLES20.GL_TRUE);
// gl.glEnableClientState(GL11.GL_POINT_SIZE_ARRAY_OES); //// GLES20.glEnable(GLES20.GL_VERTEX_PROGRAM_POINT_SIZE);
// gl.glEnableClientState(GL11.GL_POINT_SPRITE_OES); //// GLES20.glPointParameterf(GLES20.GL_POINT_SIZE_MIN, 1.0f);
// gl.glEnableClientState(GL10.GL_VERTEX_ARRAY);
// gl.glTexEnvf(GL11.GL_POINT_SPRITE_OES, GL11.GL_COORD_REPLACE_OES, GL11.GL_TRUE);
// } else if (!state.isPointSprite() && context.pointSprite) { // } else if (!state.isPointSprite() && context.pointSprite) {
// gl.glDisableClientState(GL11.GL_VERTEX_ARRAY); //// GLES20.glDisable(GLES20.GL_POINT_SPRITE);
// gl.glDisableClientState(GL11.GL_POINT_SIZE_ARRAY_OES);
// gl.glDisableClientState(GL11.GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES);
// gl.glDisableClientState(GL11.GL_POINT_SIZE_ARRAY_OES);
// gl.glDisable(GL10.GL_TEXTURE);
// } // }
if (state.isPolyOffset()) { if (state.isPolyOffset()) {
@ -563,10 +553,6 @@ public class OGLESShaderRenderer implements Renderer {
} }
} }
private GL10 gl;
public void setGL(GL10 gl){
this.gl = gl;
}
public void onFrame() { public void onFrame() {
int error = GLES20.glGetError(); int error = GLES20.glGetError();
if (error != GLES20.GL_NO_ERROR){ if (error != GLES20.GL_NO_ERROR){
@ -2106,13 +2092,9 @@ public class OGLESShaderRenderer implements Renderer {
} }
public void renderMesh(Mesh mesh, int lod, int count) { public void renderMesh(Mesh mesh, int lod, int count) {
// if (context.pointSize != mesh.getPointSize()) { if (context.pointSize != mesh.getPointSize()) {
// GLES10.glPointSize(mesh.getPointSize()); GLES10.glPointSize(mesh.getPointSize());
// context.pointSize = mesh.getPointSize(); context.pointSize = mesh.getPointSize();
// }
if (context.pointSize !=64) {
GLES10.glPointSize(64);
context.pointSize = 64;
} }
if (context.lineWidth != mesh.getLineWidth()) { if (context.lineWidth != mesh.getLineWidth()) {
GLES20.glLineWidth(mesh.getLineWidth()); GLES20.glLineWidth(mesh.getLineWidth());

Loading…
Cancel
Save