yusuke11 / box2dlights

Automatically exported from code.google.com/p/box2dlights
0 stars 0 forks source link

RayHandler rayHandler = new RayHandler(world) fails on lates LibGdx #15

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. RayHandler rayHandler = new RayHandler(world);

What is the expected output? What do you see instead?

Expected output is a RayHandler.
I get an exception instead: 

Exception in thread "LWJGL Application" java.lang.IllegalArgumentException: no 
position attribute was specified
    at com.badlogic.gdx.graphics.VertexAttributes.checkValidity(VertexAttributes.java:114)
    at com.badlogic.gdx.graphics.VertexAttributes.<init>(VertexAttributes.java:55)
    at com.badlogic.gdx.graphics.glutils.VertexBufferObject.<init>(VertexBufferObject.java:73)
    at com.badlogic.gdx.graphics.Mesh.<init>(Mesh.java:96)
    at box2dLight.LightMap.createLightMapMesh(LightMap.java:164)
    at box2dLight.LightMap.<init>(LightMap.java:117)
    at box2dLight.RayHandler.<init>(RayHandler.java:112)
    at box2dLight.RayHandler.<init>(RayHandler.java:88)

What version of the product are you using? On what operating system?

Latest version on Windows 7.

Please provide any additional information below.

Latest version og libgdx-nightlies.

Original issue reported on code.google.com by dag.kod...@gmail.com on 22 May 2013 at 8:06

GoogleCodeExporter commented 9 years ago
I get the same :(

Original comment by wookoouk on 23 May 2013 at 7:48

GoogleCodeExporter commented 9 years ago
OP here. I managed to resolve my issue by downloading nightlies from LibGDX, 
and also building Box2DLights from source. It now works perfectly again. :-)

Original comment by dag.kod...@gmail.com on 23 May 2013 at 9:42

GoogleCodeExporter commented 9 years ago
Same problem here. According to the debugging I did the problem comes from the 
Usage class inside the class VertexAttributes in the package 
com.badlogic.gdx.graphics. The constant values were changed and therefore 
Box2dLights could not find the position attribute (and other attributes) in the 
attributes array. Building Box2DLights from source with the  same libgdx 
version you use in your game (the latest nightly in this case) should fix the 
problem.

Original comment by yaron....@gmail.com on 23 May 2013 at 6:11

GoogleCodeExporter commented 9 years ago
Thanks for the 'build from source' suggestion, I will keep the source checked 
out in eclipse for future use.

Original comment by wookoouk on 25 May 2013 at 5:32

GoogleCodeExporter commented 9 years ago
Some thing. Only i've got a different exception:

Exception in thread "LWJGL Application" 
com.badlogic.gdx.utils.GdxRuntimeException: java.lang.IllegalArgumentException: 
color attribute must have 4 components
    at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:113)
Caused by: java.lang.IllegalArgumentException: color attribute must have 4 
components
    at com.badlogic.gdx.graphics.VertexAttributes.checkValidity(VertexAttributes.java:104)
    at com.badlogic.gdx.graphics.VertexAttributes.<init>(VertexAttributes.java:52)
    at com.badlogic.gdx.graphics.glutils.VertexBufferObject.<init>(VertexBufferObject.java:73)
    at com.badlogic.gdx.graphics.Mesh.<init>(Mesh.java:95)
    at box2dLight.RayHandler.<init>(RayHandler.java:120)
    at box2dLight.RayHandler.<init>(RayHandler.java:87)
    at stable.house15.TestingStableVersion.level.<init>(level.java:54)

Version box2dlights from 29 may. Error in a same place:
RayHandler rayHandler = new RayHandler(world);

Original comment by Terran20...@gmail.com on 13 Jul 2013 at 11:10

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
This is a duplicate to issue #18.
As stated the issue occurs when box2dlights is not run with latest nightlies 
from libGdx. The current nightly version of the Usage enum differs from the one 
in the latest release.

Original comment by ber.go...@gmail.com on 26 Aug 2013 at 9:06