package demos.es2.perftst; import java.io.IOException; import java.io.InputStream; import java.net.URLConnection; import java.nio.FloatBuffer; import com.jogamp.common.util.IOUtil; import com.jogamp.opengl.GL; import com.jogamp.opengl.GL2ES2; import com.jogamp.opengl.GLAutoDrawable; import com.jogamp.opengl.GLException; import com.jogamp.opengl.GLUniformData; import com.jogamp.opengl.util.GLArrayDataServer; import com.jogamp.opengl.util.glsl.ShaderState; import com.jogamp.opengl.util.texture.Texture; import com.jogamp.opengl.util.texture.TextureData; import com.jogamp.opengl.util.texture.TextureIO; public class PerfTextLoad extends PerfModule { static final int MAX_TEXTURE_ENGINES = 8; public PerfTextLoad() { } @Override public ShaderState initShaderState(final GL2ES2 gl) { return initShaderState(gl, "vbo-vert-text", "ftext"); } Texture[] textures = null; TextureData[] textDatas = null; protected void runOneSet(final GLAutoDrawable drawable, final String textBaseName, final int numObjs, final int numTextures, final int loops) { final GL2ES2 gl = drawable.getGL().getGL2ES2(); if(numTextures>MAX_TEXTURE_ENGINES) { throw new GLException("numTextures must be within 1.."+MAX_TEXTURE_ENGINES); } String textName = null; textDatas = new TextureData[numObjs]; textures = new Texture[numTextures]; try { for(int i=0; i