/** * Sets the OpenGL multi-floating-point texture parameter for the * texture's target. Causes this texture to be bound to the current * texture state. * * @throws GLException if any OpenGL-related errors occurred */ public void setTexParameterfv(final GL gl, final int parameterName, final float[] params, final int params_offset) { bind(gl); gl.glTexParameterfv(target, parameterName, params, params_offset); }
/** * Sets the OpenGL multi-integer texture parameter for the texture's * target. Causes this texture to be bound to the current texture * state. * * @throws GLException if any OpenGL-related errors occurred */ public void setTexParameteriv(final GL gl, final int parameterName, final int[] params, final int params_offset) { bind(gl); gl.glTexParameteriv(target, parameterName, params, params_offset); }
/** * Sets the OpenGL multi-floating-point texture parameter for the * texture's target. Causes this texture to be bound to the current * texture state. * * @throws GLException if any OpenGL-related errors occurred */ public void setTexParameterfv(final GL gl, final int parameterName, final FloatBuffer params) { bind(gl); gl.glTexParameterfv(target, parameterName, params); }
/** * Sets the OpenGL multi-integer texture parameter for the texture's * target. Causes this texture to be bound to the current texture * state. * * @throws GLException if any OpenGL-related errors occurred */ public void setTexParameteriv(final GL gl, final int parameterName, final IntBuffer params) { bind(gl); gl.glTexParameteriv(target, parameterName, params); }
/** * Sets the OpenGL multi-floating-point texture parameter for the * texture's target. Causes this texture to be bound to the current * texture state. * * @throws GLException if any OpenGL-related errors occurred */ public void setTexParameterfv(final GL gl, final int parameterName, final float[] params, final int params_offset) { bind(gl); gl.glTexParameterfv(target, parameterName, params, params_offset); }
/** * Sets the OpenGL multi-integer texture parameter for the texture's * target. Causes this texture to be bound to the current texture * state. * * @throws GLException if any OpenGL-related errors occurred */ public void setTexParameteriv(final GL gl, final int parameterName, final IntBuffer params) { bind(gl); gl.glTexParameteriv(target, parameterName, params); }
/** * Sets the OpenGL multi-floating-point texture parameter for the * texture's target. Causes this texture to be bound to the current * texture state. * * @throws GLException if any OpenGL-related errors occurred */ public void setTexParameterfv(final GL gl, final int parameterName, final FloatBuffer params) { bind(gl); gl.glTexParameterfv(target, parameterName, params); }
/** * Sets the OpenGL multi-integer texture parameter for the texture's * target. Causes this texture to be bound to the current texture * state. * * @throws GLException if any OpenGL-related errors occurred */ public void setTexParameteriv(final GL gl, final int parameterName, final int[] params, final int params_offset) { bind(gl); gl.glTexParameteriv(target, parameterName, params, params_offset); }
/** * Sets the OpenGL floating-point texture parameter for the * texture's target. This gives control over parameters such as * GL_TEXTURE_MAX_ANISOTROPY_EXT. Causes this texture to be bound to * the current texture state. * * @throws GLException if no OpenGL context was current or if any * OpenGL-related errors occurred */ public void setTexParameterf(final GL gl, final int parameterName, final float value) { bind(gl); gl.glTexParameterf(target, parameterName, value); }
/** * Sets the OpenGL floating-point texture parameter for the * texture's target. This gives control over parameters such as * GL_TEXTURE_MAX_ANISOTROPY_EXT. Causes this texture to be bound to * the current texture state. * * @throws GLException if no OpenGL context was current or if any * OpenGL-related errors occurred */ public void setTexParameterf(final GL gl, final int parameterName, final float value) { bind(gl); gl.glTexParameterf(target, parameterName, value); }
/** * Sets the OpenGL integer texture parameter for the texture's * target. This gives control over parameters such as * GL_TEXTURE_WRAP_S and GL_TEXTURE_WRAP_T, which by default are set * to GL_CLAMP_TO_EDGE if OpenGL 1.2 is supported on the current * platform and GL_CLAMP if not. Causes this texture to be bound to * the current texture state. * * @throws GLException if any OpenGL-related errors occurred */ public void setTexParameteri(final GL gl, final int parameterName, final int value) { bind(gl); gl.glTexParameteri(target, parameterName, value); }
/** * Sets the OpenGL integer texture parameter for the texture's * target. This gives control over parameters such as * GL_TEXTURE_WRAP_S and GL_TEXTURE_WRAP_T, which by default are set * to GL_CLAMP_TO_EDGE if OpenGL 1.2 is supported on the current * platform and GL_CLAMP if not. Causes this texture to be bound to * the current texture state. * * @throws GLException if any OpenGL-related errors occurred */ public void setTexParameteri(final GL gl, final int parameterName, final int value) { bind(gl); gl.glTexParameteri(target, parameterName, value); }
/** * Falls das Color_Attachment0 eine Textur nutzt wird diese an den GL * Context gebunden. */ public void bindColorAtt0Texture() { assert (id != 0); Texture tex = getColorAttachmentTexture(0); if (tex != null) { tex.bind(gc.getGL()); } }
public void bindTexture(Texture tex) { GL gl = gc.getGL(); gl.glActiveTexture(textureUnit); if (!isActive() || tex == null) { gl.glBindTexture(GL.GL_TEXTURE_2D, 0); } else { tex.bind(gl); } }
gl2.glHint(GL2.GL_FOG_HINT, GL.GL_FASTEST); texYantra.bind(gl2); texYantra.enable(gl2); float lastVal = 0f;
public final void addFrame(final GL gl, final Texture tex) { final TextureSequence.TextureFrame frame = new TextureSequence.TextureFrame(tex); frames.add(frame); tex.bind(gl); gl.glTexParameteri(getTextureTarget(), GL.GL_TEXTURE_MIN_FILTER, texMinMagFilter[0]); gl.glTexParameteri(getTextureTarget(), GL.GL_TEXTURE_MAG_FILTER, texMinMagFilter[1]); gl.glTexParameteri(getTextureTarget(), GL.GL_TEXTURE_WRAP_S, texWrapST[0]); gl.glTexParameteri(getTextureTarget(), GL.GL_TEXTURE_WRAP_T, texWrapST[1]); }
public final void addFrame(final GL gl, final Texture tex) { final TextureSequence.TextureFrame frame = new TextureSequence.TextureFrame(tex); frames.add(frame); tex.bind(gl); gl.glTexParameteri(getTextureTarget(), GL.GL_TEXTURE_MIN_FILTER, texMinMagFilter[0]); gl.glTexParameteri(getTextureTarget(), GL.GL_TEXTURE_MAG_FILTER, texMinMagFilter[1]); gl.glTexParameteri(getTextureTarget(), GL.GL_TEXTURE_WRAP_S, texWrapST[0]); gl.glTexParameteri(getTextureTarget(), GL.GL_TEXTURE_WRAP_T, texWrapST[1]); }
private Texture setupTexture(GL2 gl, Texture texture, Group group) { if (group.getMaterial() != null) { texture = loadTexture(group); } if (texture != null && drawTexture) { gl.glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); // Use linear filter for texture if image is smaller than the original texture gl.glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); gl.glTexEnvi(GL2.GL_TEXTURE_ENV, GL2.GL_TEXTURE_ENV_MODE, GL2.GL_DECAL); texture.enable(gl); texture.bind(gl); } else { setupColor(gl); } return texture; }
public void draw( GL2ES3 gl, Texture texture, GLEditableBuffer stBuffer, GLEditableBuffer xyBuffer, int first, int count ) { if ( texture.getTarget( ) != GL_TEXTURE_2D ) { throw new RuntimeException( "Texture has wrong target: required = GL_TEXTURE_2D, found = " + texture.getTarget( ) ); } gl.glActiveTexture( GL_TEXTURE0 ); texture.bind( gl ); gl.glUniform1i( this.handles.IMAGE, 0 ); gl.glBindBuffer( GL_ARRAY_BUFFER, stBuffer.deviceBuffer( gl ) ); gl.glVertexAttribPointer( this.handles.inSt, 2, GL_FLOAT, false, 0, 0 ); gl.glBindBuffer( GL_ARRAY_BUFFER, xyBuffer.deviceBuffer( gl ) ); gl.glVertexAttribPointer( this.handles.inXy, 2, GL_FLOAT, false, 0, 0 ); gl.glDrawArrays( GL_TRIANGLE_STRIP, first, count ); }