* Disable point sprite if not rendering a point mesh. May prevent ATI driver crashes

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7878 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
sha..rd 14 years ago
parent 6c12808493
commit 92a751893f
  1. 14
      engine/src/lwjgl-ogl/com/jme3/renderer/lwjgl/LwjglRenderer.java

@ -2364,6 +2364,20 @@ public class LwjglRenderer implements Renderer {
if (mesh.getVertexCount() == 0) { if (mesh.getVertexCount() == 0) {
return; return;
} }
if (context.pointSprite && mesh.getMode() != Mode.Points){
// XXX: Hack, disable point sprite mode if mesh not in point mode
if (context.boundTextures[0] != null){
if (context.boundTextureUnit != 0){
glActiveTexture(GL_TEXTURE0);
context.boundTextureUnit = 0;
}
glDisable(GL_POINT_SPRITE);
glDisable(GL_VERTEX_PROGRAM_POINT_SIZE);
context.pointSprite = false;
}
}
if (context.pointSize != mesh.getPointSize()) { if (context.pointSize != mesh.getPointSize()) {
glPointSize(mesh.getPointSize()); glPointSize(mesh.getPointSize());
context.pointSize = mesh.getPointSize(); context.pointSize = mesh.getPointSize();

Loading…
Cancel
Save