Gius-Lio / min3d

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

Bad FPS on scene with skybox #64

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
After i've added skybox to empty scene, fps value go down from 60 to 5.
I make some investigation, and found that problem in drawObject() method of 
Rendered class.
In this lines:

            int pos, len;

            if (! $o.faces().renderSubsetEnabled()) {
                pos = 0;
                len = $o.faces().size();
            }
            else {
                pos = $o.faces().renderSubsetStartIndex() * FacesBufferedList.PROPERTIES_PER_ELEMENT;
                len = $o.faces().renderSubsetLength();
            }

            $o.faces().buffer().position(pos);

            _gl.glDrawElements(
                    $o.renderType().glValue(),
                    len * FacesBufferedList.PROPERTIES_PER_ELEMENT, 
                    GL10.GL_UNSIGNED_SHORT, 
                    $o.faces().buffer());

I don't know where to dig deeper. Could someone help me?

Original issue reported on code.google.com by isa...@i20.biz on 7 Dec 2011 at 4:51