StillModel with GL20

Any community contributions to libgdx go here! Some may get included in the core API when permission is granted.

StillModel with GL20

Postby OutputStream » Sun Jun 19, 2011 11:59 am

Noticed that the StillModel class didn't have a render method for GL20, so I created one. Seems to be rendering fine.

Code: Select all
@Override
   public void render(ShaderProgram program) {
            int len = subMeshes.length;
            for (int i = 0; i < len; i++) {
                StillSubMesh subMesh = subMeshes[i];
                if (i == 0) {            
                    subMesh.material.bind(program);
                } else if (!subMeshes[i - 1].material.equals(subMesh.material)) {
                    subMesh.material.bind(program);
                }
                subMesh.mesh.render(program, subMesh.primitiveType);
            }
   }
OutputStream
 
Posts: 10
Joined: Sun Jun 05, 2011 10:47 pm

Re: StillModel with GL20

Postby mzechner » Sun Jun 19, 2011 5:56 pm

The 3D API extension is still a WIP and not ready for production yet. I see you figured things out :) However, i can't guarantee things will stay like this. Sorry, i'm really low on available time at the moment, i try to get everything except the revised SkeletonModel done over the next few weekends.
mzechner
Site Admin
 
Posts: 4879
Joined: Sat Jul 10, 2010 3:50 pm

Re: StillModel with GL20

Postby OutputStream » Sun Jun 19, 2011 6:31 pm

Yeah, I kinda figured that out when I was skimming through the source. You guys have done a great job with libgdx though, thanks. :)
OutputStream
 
Posts: 10
Joined: Sun Jun 05, 2011 10:47 pm


Return to Libgdx Contributions

Who is online

Users browsing this forum: No registered users and 1 guest