package demos.es2.perftst; import com.jogamp.common.util.IOUtil; import java.nio.*; import java.io.*; import java.net.*; import com.jogamp.opengl.*; import com.jogamp.opengl.util.*; import com.jogamp.opengl.util.glsl.ShaderState; import com.jogamp.opengl.util.texture.*; public class PerfTextLoad extends PerfModule { static final int MAX_TEXTURE_ENGINES = 8; public PerfTextLoad() { } public ShaderState initShaderState(GL2ES2 gl) { return initShaderState(gl, "vbo-vert-text", "ftext"); } Texture[] textures = null; TextureData[] textDatas = null; protected void runOneSet(GLAutoDrawable drawable, String textBaseName, int numObjs, int numTextures, int loops) { 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