Login  Register

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

Posted by dardzull@yahoo.com on Jan 30, 2013; 11:46pm
URL: https://forum.jogamp.org/JOGL-2-0-OpenGL-OpenGL-ES-backend-for-LibGDX-tp4027689p4028077.html

I got the unified renderer working.  When I use a solid color with basic Geometry everything works fine.  However when i try to use a texture nothing is visible.  I have tried Unshaded and ColorTextured materials with no avail.  Is there anything working? Or am I just doing something wrong?  I know its loading the pic on the RPi using some test output, so I know thats not it.  Code below is used on the RPi, all the code blocks work on PC machine.

Any help would be appreciated and thanks ahead of time.  =)


Works:

         Quad q = new Quad(14f, 8.75f);
         Geometry g = new Geometry("quad", q);
         g.setLocalTranslation(-7f, -4.375f, -0.0001f);
         Material mat = new Material(assetManager, "Common/MatDefs/Misc/ColoredTextured.j3md");
         mat.setColor("Color", ColorRGBA.Blue);
         g.setMaterial(mat);
         rootNode.attachChild(g);

Works:

         Quad q = new Quad(14f, 8.75f);
         Geometry g = new Geometry("quad", q);
         g.setLocalTranslation(-7f, -4.375f, -0.0001f);
         Material mat_stl = assetManager.loadMaterial("Common/Materials/RedColor.j3m");
         g.setMaterial(mat);
         rootNode.attachChild(g);

Does Not Work:

         Quad q = new Quad(14f, 8.75f);
         Geometry g = new Geometry("quad", q);
         g.setLocalTranslation(-7f, -4.375f, -0.0001f);
         Material mat = new Material(assetManager, "Common/MatDefs/Misc/ColoredTextured.j3md");
         Texture tex = assetManager.loadTexture("Textures/background.png");
         mat.setTexture("ColorMap", tex);
         g.setMaterial(mat);
         rootNode.attachChild(g);