Available Methods
- glBindBuffer ( )
- glBindTexture ( )
- glBindVertexArray ( )
- glDeleteBuffers ( )
- glUseProgram ( )
- glGenVertexArrays ( )
- glGenBuffers ( )
- glVertexAttribPointer ( )
- glDeleteProgram ( )
- glActiveTexture ( )
- glEnableVertexAttribArray ( )
- glDeleteVertexArrays ( )
- glGetUniformLocation ( )
- glViewport ( )
- glClearBufferfv ( )
- glBindFramebuffer ( )
- glBufferData ( )
- glGenTextures ( )
- glDeleteTextures ( )
- glTexImage2D ( )
- glUniform1i ( )
- glUnmapBuffer ( )
- glDrawArraysInstanced ( )
- glEnable ( )
- glUniformMatrix4fv ( )
- glBindAttribLocation ( )
- glPixelStorei ( )
- glBindFragDataLocation ( )
- glBindBufferBase ( )
- glGetIntegerv ( )
- glTexParameteri ( )
- glDisable ( )
- glUniformBlockBinding ( )
- glFramebufferTexture ( )
- glDrawElementsInstancedBaseVertex ( )
- glGenFramebuffers ( )
- glBeginQuery ( )
- glMapBufferRange ( )
- glScissor ( )
- glDeleteFramebuffers ( )
- glDepthFunc ( )
- GL_POINTS
- glUniform1f ( )
- glTexImage3D ( )
- glGetQueryiv ( )
- glDeleteRenderbuffers ( )
- glGenerateMipmap ( )
- glDeleteSamplers ( )
- glBlendFunc ( )
- glClearColor ( )
- glEndQuery ( )
- glDrawBuffer ( )
- glSamplerParameterfv ( )
- glClear ( )
- glDepthMask ( )
- GL_LINES
- glCreateShader ( )
- glSamplerParameteri ( )
- glGenRenderbuffers ( )
- glTexSubImage3D ( )
- glDrawElements ( )
- glBindSampler ( )
- glGetShaderInfoLog ( )
- glPointParameteri ( )
- glEndConditionalRender ( )
- glCompressedTexImage2D ( )
- glDeleteQueries ( )
Related Classes
- java.io.InputStream
- java.util.Iterator
- java.util.Locale
- java.nio.ByteBuffer
- java.util.logging.Logger
- java.util.Queue
- java.util.logging.Level
- java.awt.image.BufferedImage
- javax.imageio.ImageIO
- java.nio.ByteOrder
- java.awt.Dimension
- java.util.BitSet
- java.awt.Graphics2D
- java.awt.Component
- javax.swing.SwingUtilities
- java.nio.FloatBuffer
- java.nio.IntBuffer
- java.nio.Buffer
- java.nio.ShortBuffer
- org.openide.util.Utilities
- org.openide.DialogDisplayer
- org.openide.NotifyDescriptor
- com.jogamp.opengl.GLProfile
- com.jogamp.opengl.GL
- com.jogamp.opengl.GLCapabilities
Java Code Examples for com.jogamp.opengl.GL3#glDrawElements()
The following examples show how to use
com.jogamp.opengl.GL3#glDrawElements() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TriangleBatch.java From constellation with Apache License 2.0 | 5 votes |
/** * Draw the triangles. * <p> * Make sure you call glEnableClientState for these arrays. * * @param gl the current OpenGL context. */ public void draw(final GL3 gl) { gl.glBindVertexArray(vertexArrayBufferObject[0]); gl.glDrawElements(GL3.GL_TRIANGLES, nNumIndexes, GL3.GL_UNSIGNED_SHORT, 0); // Unbind to anybody // Should this be just plain 0? // gl.glBindVertexArray(vertexArrayBufferObject[0]); gl.glBindVertexArray(0); }
Example 2
Source File: Gl_320_draw_range_elements.java From jogl-samples with MIT License | 4 votes |
@Override protected boolean render(GL gl) { GL3 gl3 = (GL3) gl; { gl3.glBindBuffer(GL_UNIFORM_BUFFER, bufferName.get(Buffer.TRANSFORM)); ByteBuffer pointer = gl3.glMapBufferRange(GL_UNIFORM_BUFFER, 0, Mat4.SIZE, GL_MAP_WRITE_BIT | GL_MAP_INVALIDATE_BUFFER_BIT); Mat4 projection = glm.perspective_((float) Math.PI * 0.25f, windowSize.x / 3.0f / windowSize.y, 0.1f, 100.0f); Mat4 model = new Mat4(1.0f); pointer.asFloatBuffer().put(projection.mul(viewMat4()).mul(model).toFa_()); gl3.glUnmapBuffer(GL_UNIFORM_BUFFER); } gl3.glViewport(0, 0, windowSize.x, windowSize.y); float[] depth = {1.0f}; gl3.glClearBufferfv(GL_DEPTH, 0, depth, 0); gl3.glClearBufferfv(GL_COLOR, 0, new float[]{1.0f, 1.0f, 1.0f, 1.0f}, 0); gl3.glUseProgram(programName); gl3.glBindBufferBase(GL_UNIFORM_BUFFER, Semantic.Uniform.TRANSFORM0, bufferName.get(Buffer.TRANSFORM)); gl3.glBindVertexArray(vertexArrayName.get(0)); gl3.glViewport(windowSize.x * 0 / 3, 0, windowSize.x / 3, windowSize.y); gl3.glDrawElements(GL_TRIANGLES, elementCount / 2, GL_UNSIGNED_SHORT, 0); gl3.glViewport(windowSize.x * 1 / 3, 0, windowSize.x / 3, windowSize.y); gl3.glDrawElementsInstancedBaseVertex(GL_TRIANGLES, elementCount / 2, GL_UNSIGNED_SHORT, Short.BYTES * elementCount / 2, 1, 0); gl3.glViewport(windowSize.x * 2 / 3, 0, windowSize.x / 3, windowSize.y); gl3.glDrawElementsInstancedBaseVertex(GL_TRIANGLES, elementCount / 2, GL_UNSIGNED_SHORT, 0, 1, vertexCount / 2); return true; }