libgdx / box2dlights

Fork of box2dlights by Kalle Hamalainen
Apache License 2.0
255 stars 82 forks source link

Compatible with latest libgdx nightly? #57

Closed ghost closed 9 years ago

ghost commented 9 years ago

I just updated my game from a very old box2dlights version and a very old libgdx version to the latest. Those were probably 2013 versions. First I only updated box2Dlights, which worked fine; Then I updated libgdx and now I am getting

org.lwjgl.opengl.OpenGLException: Cannot use Buffers when Array Buffer Object is enabled upon at box2dLight.RayHandler.updateAndRender(RayHandler.java:263)

I could be doing something wrong but seeing as this code worked perfectly before, I am not sure. It would appear that a VBO is bound or not and conflicting... or something

ghost commented 9 years ago

Actually those were mid 2014 version apparently. So box2dlights 1.3 and a libgdx nightly from around that time

ghost commented 9 years ago

Alright. So I took a very simple and old game of mine just to keep the code minimal. And I incrementally tested all the libgdx version to find out which ones do what. Using the releases: http://libgdx.badlogicgames.com/releases/ This test always used the latest box2dlights 1.4

libgdx versions until 1.2 work as I expect. starting with 1.3 I get a black screen, no errors. starting with 1.5.5 I get the aforementioned error

Nevertheless I could be doing something "wrong" or suboptimal, but in this case its just using a spriteBtach and then rayHandler.updateAndRender() after spriteBatch.end(), so it would seem there is really not much to screw up here

ghost commented 9 years ago

Ah yes, also, I am using PC Desktop with LWJGL exclusively

ghost commented 9 years ago

Just tried switching to JGLFW, everything works fine with all the versions. Oh boy.

ghost commented 9 years ago

So yeah this can be closed. Just crashed because I used the OpenGL ES 3 flag. Which isn't supported with box2dlights