@Override public void glGenTextures(IntBuffer param1) { checkLimit(param1); GLContext.getCurrentGL().glGenTextures(param1.limit(), param1); }
@Override public void genTextures(int n, IntBuffer textures) { gl.glGenTextures(n, textures); }
@Override public void glGenTextures(int n, IntBuffer textures) { GLContext.getCurrentGL().glGenTextures(n, textures); }
@Override int generateTexID(Context ctx) { if (VERBOSE) System.err.println("JoglPipeline.generateTexID()"); GL gl = context(ctx).getGL(); int[] tmp = new int[] { -1 }; gl.glGenTextures(1, tmp, 0); if (tmp[0] < 1) return -1; return tmp[0]; }
private int createTextureID() { IntBuffer tmp = createIntBuffer(1); final GL gl = GLContext.getCurrentGL(); gl.glGenTextures(1, tmp); checkGLError(); return tmp.get(0); }
protected TextureFrame[] createTexFrames(final GL gl, final int count) { final int[] texNames = new int[count]; gl.glGenTextures(count, texNames, 0); final int err = gl.glGetError(); if( GL.GL_NO_ERROR != err ) { throw new RuntimeException("TextureNames creation failed (num: "+count+"): err "+toHexString(err)); } final TextureFrame[] texFrames = new TextureFrame[count]; for(int i=0; i<count; i++) { texFrames[i] = createTexImage(gl, texNames[i]); } return texFrames; } protected abstract TextureFrame createTexImage(GL gl, int texName);
private boolean validateTexID(final GL gl, final boolean throwException) { if( 0 == texID ) { if( null != gl ) { final int[] tmp = new int[1]; gl.glGenTextures(1, tmp, 0); texID = tmp[0]; if ( 0 == texID && throwException ) { throw new GLException("Create texture ID invalid: texID "+texID+", glerr 0x"+Integer.toHexString(gl.glGetError())); } } else if ( throwException ) { throw new GLException("No GL context given, can't create texture ID"); } } return 0 != texID; }
@Override public void glGenTextures(IntBuffer param1) { checkLimit(param1); GLContext.getCurrentGL().glGenTextures(param1.limit(), param1); }
private boolean validateTexID(final GL gl, final boolean throwException) { if (name != null) { gl.glActiveTexture(GL.GL_TEXTURE1); gl.glEnable(GL2.GL_TEXTURE_1D); int id = gl.getGL2().glGetUniformLocation(this.id, name); if ( id >= 0) { texID = id; } } else if( 0 == texID ) { if( null != gl ) { final int[] tmp = new int[1]; gl.glGenTextures(1, tmp, 0); texID = tmp[0]; if ( 0 == texID && throwException ) { throw new GLException("Create texture ID invalid: texID "+texID+", glerr 0x"+Integer.toHexString(gl.glGetError())); } } else if ( throwException ) { throw new GLException("No GL context given, can't create texture ID"); } } return 0 != texID; }
mGL.glGenTextures(1, uiTexture, 0); mGL.glBindTexture(GL.GL_TEXTURE_2D, uiTexture[0]);
gl.glGenTextures(1, name, 0); if(0 == name[0]) { throw new GLException("null texture, "+this);
gl.glGenTextures(1, name, 0); if(0 == name[0]) { throw new GLException("null texture, "+this);