Closed i-make-robots closed 1 year ago
I'm afraid not.
Wait, what? Did test 3 work before this PR?
With master:
I'm afraid not.
I was wrong. A clean build actually fixed it.
Renderer never becomes unresponsive.
Huzzah! Does that mean a clean build of Robot Overlord works?!
Nope, tried that. But I also did a bisect, and whatever you did in "more attempt to fix 151" (70db3cfd94acc6fbf42f3d0404ac235a1560558f) made all the difference for for OpenGLTestOrthographic.
Running RobotOverlord on that commit still gets me black background.
What about OpenGLTestPerspective
?
Once again, my fault. On https://github.com/MarginallyClever/Robot-Overlord-App/commit/70db3cfd94acc6fbf42f3d0404ac235a1560558f everything works, both and OpenGLTestPerspective and RobotOverlord (congrats!).
On 7c23a1b3d43e705034f7ba60206df7eb895d9a69 RobotOverlord has the black background issue, and tests from 2 to 5 don't pass.
Huh. the change in 7c23a1b is technically more correct...
This time I'm confident in my assessment, as reverting https://github.com/MarginallyClever/Robot-Overlord-App/commit/7c23a1b3d43e705034f7ba60206df7eb895d9a69 fixes both tests and main app.
Huh. the change in https://github.com/MarginallyClever/Robot-Overlord-App/commit/7c23a1b3d43e705034f7ba60206df7eb895d9a69 is technically more correct...
Do you really need to unbind the VAOs? E.g. https://stackoverflow.com/questions/25412767/opengl-glbindbuffer0-outside-vao
Because commenting https://github.com/MarginallyClever/Robot-Overlord-App/blob/f9fb5396caf675a78a05f3325ebf56d2acbfaac0/src/main/java/com/marginallyclever/robotoverlord/systems/render/mesh/Mesh.java#L186 and https://github.com/MarginallyClever/Robot-Overlord-App/blob/f9fb5396caf675a78a05f3325ebf56d2acbfaac0/src/main/java/com/marginallyclever/robotoverlord/renderpanel/OpenGLTestOrthographic.java#L166 seems to fix my problem.
in Compass3d, cube.getModel().setDirty(true);
needs to be called before cube.render();
or the cube disappears after a preferences change. I don't know why this happens, it shouldn't disappear. it gets completely rebuilt when the OpenglRenderPanel is created.
I confirm that building on the last commit fixes the issues with the renderer. I suggest merging as this closes #151 now.
Last commit fixes #167
If that's the case then we can consider #151 and #167 closed.
@Jackymancs4 does this help at all? I think the problem is related to vertex array object (VAOs).