Login  Register

Re: JOGL 2.0 (OpenGL/OpenGL-ES) backend for LibGDX

Posted by krishnak on Feb 27, 2013; 2:37am
URL: https://forum.jogamp.org/JOGL-2-0-OpenGL-OpenGL-ES-backend-for-LibGDX-tp4027689p4028398.html

Dardzull has helped me to get the JMonkeycode working on the Pi - the working snippet is as below

                  wall_mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");; -- this doesn't seem to work

    changed to  >>>  wall_mat = new Material((MaterialDef) assetManager.loadAsset(new AssetKey("Common/MatDefs/Misc/Unshaded.j3md")));
        wall_mat.setTexture("ColorMap", assetManager.loadTexture(new TextureKey("Textures/blue.png", false)));
        wall_mat.getAdditionalRenderState().setBlendMode(RenderState.BlendMode.Alpha);  <<< I didn't have this line before
        wall_mat.setColor("Color", ColorRGBA.Blue);

However I have another issue which is minor as of now

When I quit the application - currently using CTRL C - there is a error message from AL Library - ALC (2) Devices not closed and then it hangs there - i.e I am not able to get to the prompt. I have to change to another terminal to log in again and reboot (re-running the code after this error message doesn't run the code.

I get this error both with my code as well as  with Pax Britannica - in case of Pax Britannica the error appears but the code quits and I get the prompt. But I am unable to start the same app with out restarting.

I run the code with out starting X.