Skip to content

Commit

Permalink
Fixes #3285 by ensuring rotateModel() is called inside the drawing loop
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexisDrogoul committed Feb 19, 2022
1 parent d661d69 commit d3f14ef
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
3 changes: 2 additions & 1 deletion ummisco.gama.opengl/src/ummisco/gama/opengl/OpenGL.java
Expand Up @@ -1512,7 +1512,8 @@ public Pass beginScene() {
resetMatrix(GLMatrixFunc.GL_PROJECTION);
updatePerspective(gl);
resetMatrix(GLMatrixFunc.GL_MODELVIEW);
rotateModel();
// AD removed from here and put in ModelScene.draw() so that it is inside the keystone drawing. See #3285
// rotateModel();
return endScene;
}

Expand Down
@@ -1,12 +1,12 @@
/*******************************************************************************************************
*
* ModelScene.java, in ummisco.gama.opengl, is part of the source code of the
* GAMA modeling and simulation platform (v.1.8.2).
* ModelScene.java, in ummisco.gama.opengl, is part of the source code of the GAMA modeling and simulation platform
* (v.1.8.2).
*
* (c) 2007-2022 UMI 209 UMMISCO IRD/SU & Partners (IRIT, MIAT, TLU, CTU)
*
* Visit https://github.com/gama-platform/gama for license information and contacts.
*
*
********************************************************************************************************/
package ummisco.gama.opengl.scene;

Expand Down Expand Up @@ -117,7 +117,8 @@ public void draw(final OpenGL gl) {

gl.push(GLMatrixFunc.GL_MODELVIEW);
gl.setZIncrement(zIncrement);

// AD called here so that it is inside the keystone drawing. See #3285
gl.rotateModel();
layers.forEach((name, layer) -> {
if (layer != null && !layer.isInvalid()) {
try {
Expand Down

0 comments on commit d3f14ef

Please sign in to comment.