public void end( GL2ES3 gl ) { gl.glDisableVertexAttribArray( this.handles.inSt ); gl.glDisableVertexAttribArray( this.handles.inXy ); gl.glUseProgram( 0 ); gl.glBindVertexArray( 0 ); }
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 ); }
public void begin( GL2ES3 gl ) { if ( this.handles == null ) { this.handles = new CursorLabelProgramHandles( gl ); } gl.glBindVertexArray( defaultVertexAttributeArray( gl ) ); gl.glUseProgram( this.handles.program ); gl.glEnableVertexAttribArray( this.handles.inSt ); gl.glEnableVertexAttribArray( this.handles.inXy ); }
if(gl.isGL2ES3()) { final GL2ES3 gl2es3 = gl.getGL2ES3(); gl2es3.glPixelStorei(GL2ES3.GL_PACK_ROW_LENGTH, width); gl2es3.glReadBuffer(gl2es3.getDefaultReadBuffer());
if( rootGL.isGL2ES3() ) { // FIXME remove if ES2 == ES3 later final GL2ES3 gl2es3 = rootGL.getGL2ES3(); gl2es3.glGenVertexArrays(1, tmp, 0); defaultVAO = tmp[0]; gl2es3.glBindVertexArray(defaultVAO);
final int[] tmp = new int[] { defaultVAO }; final GL2ES3 gl2es3 = gl.getRootGL().getGL2ES3(); gl2es3.glBindVertexArray(0); gl2es3.glDeleteVertexArrays(1, tmp, 0); defaultVAO = 0;
if( gl.isGL2ES3() ) { gl2es3 = gl.getGL2ES3(); readBuffer = gl2es3.getDefaultReadBuffer(); gl2es3.glReadBuffer(readBuffer); } else { gl2es3 = null;
((GL2ES3)gl).glBlitFramebuffer(0, 0, width, height, 0, 0, width, height, // since MSAA is supported, casting to GL2ES3 is OK GL.GL_COLOR_BUFFER_BIT, GL.GL_NEAREST); checkNoError(null, gl.glGetError(), "FBObject syncSampleSink"); // throws GLException if error
TextureData textureData = newTextureData( gl.getGLProfile( ), image, false ); this.texture.updateImage( gl, textureData );
if(gl.isGL2ES3()) { final GL2ES3 gl2es3 = gl.getGL2ES3(); gl2es3.glPixelStorei(GL2ES3.GL_PACK_ROW_LENGTH, panelWidth); gl2es3.glReadBuffer(gl2es3.getDefaultReadBuffer());
if( gl.isGL2ES3() ) { gl2es3 = gl.getGL2ES3(); readBuffer = gl2es3.getDefaultReadBuffer(); gl2es3.glReadBuffer(readBuffer); } else { gl2es3 = null;