@Override public final void glGetIntegerv(final int pname, final int[] params, final int params_offset) { if(pname==GL_MATRIX_MODE) { params[params_offset]=matrixMode; } else { throw new GLException("unsupported pname: "+pname); } }
/** Entry point to C language function: <code> void {@native glExtGetFramebuffersQCOM}(GLuint * framebuffers, GLint maxFramebuffers, GLint * numFramebuffers) </code> <br>Part of <code>GL_QCOM_extended_get</code> */ public void glExtGetFramebuffersQCOM(int[] framebuffers, int framebuffers_offset, int maxFramebuffers, int[] numFramebuffers, int numFramebuffers_offset) { if(framebuffers != null && framebuffers.length <= framebuffers_offset) throw new GLException("array offset argument \"framebuffers_offset\" (" + framebuffers_offset + ") equals or exceeds array length (" + framebuffers.length + ")"); if(numFramebuffers != null && numFramebuffers.length <= numFramebuffers_offset) throw new GLException("array offset argument \"numFramebuffers_offset\" (" + numFramebuffers_offset + ") equals or exceeds array length (" + numFramebuffers.length + ")"); final long __addr_ = ((GLES3ProcAddressTable)_context.getGLProcAddressTable())._addressof_glExtGetFramebuffersQCOM; if (__addr_ == 0) { throw new GLException(String.format("Method \"%s\" not available", "glExtGetFramebuffersQCOM")); } dispatch_glExtGetFramebuffersQCOM1(framebuffers, Buffers.SIZEOF_INT * framebuffers_offset, false, maxFramebuffers, numFramebuffers, Buffers.SIZEOF_INT * numFramebuffers_offset, false, __addr_); }
@Override public final GLContext createContext(final GLContext shareWith) { if(null != shareWith) { throw new GLException("J2DOGLBackend cannot create context w/ additional shared context, since it already needs to share the context w/ J2D."); } return (null != joglDrawable && null != j2dContext) ? joglDrawable.createContext(j2dContext) : null; }
/** Entry point to C language function: <code> void {@native glGetFramebufferAttachmentParameteriv}(GLenum target, GLenum attachment, GLenum pname, GLint * params) </code> <br>Part of <code>GL_ES_VERSION_2_0</code>, <code>GL_ARB_framebuffer_object</code>, <code>GL_VERSION_3_0</code>; <code>GL_OES_framebuffer_object</code> */ public void glGetFramebufferAttachmentParameteriv(int target, int attachment, int pname, int[] params, int params_offset) { if(params != null && params.length <= params_offset) throw new GLException("array offset argument \"params_offset\" (" + params_offset + ") equals or exceeds array length (" + params.length + ")"); final long __addr_ = ((GLES3ProcAddressTable)_context.getGLProcAddressTable())._addressof_glGetFramebufferAttachmentParameteriv; if (__addr_ == 0) { throw new GLException(String.format("Method \"%s\" not available", "glGetFramebufferAttachmentParameteriv")); } dispatch_glGetFramebufferAttachmentParameteriv1(target, attachment, pname, params, Buffers.SIZEOF_INT * params_offset, false, __addr_); }
/** Entry point to C language function: <code> void {@native glGetVertexAttribIuiv}(GLuint index, GLenum pname, GLuint * params) </code> <br>Part of <code>GL_ES_VERSION_3_0</code>, <code>GL_VERSION_3_0</code> */ public void glGetVertexAttribIuiv(int index, int pname, int[] params, int params_offset) { if(params != null && params.length <= params_offset) throw new GLException("array offset argument \"params_offset\" (" + params_offset + ") equals or exceeds array length (" + params.length + ")"); final long __addr_ = ((GLES3ProcAddressTable)_context.getGLProcAddressTable())._addressof_glGetVertexAttribIuiv; if (__addr_ == 0) { throw new GLException(String.format("Method \"%s\" not available", "glGetVertexAttribIuiv")); } dispatch_glGetVertexAttribIuiv1(index, pname, params, Buffers.SIZEOF_INT * params_offset, false, __addr_); }
/** Entry point to C language function: <code> void {@native glColor4f}(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) </code> <br>Part of <code>GL_VERSION_ES_CM</code>, <code>GL_VERSION_1_0</code> */ public void glColor4f(float red, float green, float blue, float alpha) { final long __addr_ = ((GLES1ProcAddressTable)_context.getGLProcAddressTable())._addressof_glColor4f; if (__addr_ == 0) { throw new GLException(String.format("Method \"%s\" not available", "glColor4f")); } dispatch_glColor4f1(red, green, blue, alpha, __addr_); }
/** Entry point to C language function: <code> void {@native glResolveMultisampleFramebufferAPPLE}(void) </code> <br>Part of <code>GL_APPLE_framebuffer_multisample</code> */ public void glResolveMultisampleFramebufferAPPLE() { final long __addr_ = ((GLES1ProcAddressTable)_context.getGLProcAddressTable())._addressof_glResolveMultisampleFramebufferAPPLE; if (__addr_ == 0) { throw new GLException(String.format("Method \"%s\" not available", "glResolveMultisampleFramebufferAPPLE")); } dispatch_glResolveMultisampleFramebufferAPPLE1(__addr_); }
/** Entry point to C language function: <code> void {@native glBindTexture}(GLenum target, GLuint texture) </code> <br>Part of <code>GL_ES_VERSION_2_0</code>, <code>GL_VERSION_ES_CL_CM</code>, <code>GL_VERSION_1_1</code> */ public void glBindTexture(int target, int texture) { final long __addr_ = ((GLES3ProcAddressTable)_context.getGLProcAddressTable())._addressof_glBindTexture; if (__addr_ == 0) { throw new GLException(String.format("Method \"%s\" not available", "glBindTexture")); } dispatch_glBindTexture1(target, texture, __addr_); }
/** Entry point to C language function: <code> void {@native glDepthFunc}(GLenum func) </code> <br>Part of <code>GL_ES_VERSION_2_0</code>, <code>GL_VERSION_ES_CL_CM</code>, <code>GL_VERSION_1_0</code> */ public void glDepthFunc(int func) { final long __addr_ = ((GLES3ProcAddressTable)_context.getGLProcAddressTable())._addressof_glDepthFunc; if (__addr_ == 0) { throw new GLException(String.format("Method \"%s\" not available", "glDepthFunc")); } dispatch_glDepthFunc1(func, __addr_); }
/** Entry point to C language function: <code> void {@native glDrawArraysInstanced}(GLenum mode, GLint first, GLsizei count, GLsizei instanceCount) </code> <br>Part of <code>GL_ES_VERSION_3_0</code>, <code>GL_VERSION_3_1</code>; <code>GL_ARB_draw_instanced</code> */ public void glDrawArraysInstanced(int mode, int first, int count, int instanceCount) { final long __addr_ = ((GLES3ProcAddressTable)_context.getGLProcAddressTable())._addressof_glDrawArraysInstanced; if (__addr_ == 0) { throw new GLException(String.format("Method \"%s\" not available", "glDrawArraysInstanced")); } dispatch_glDrawArraysInstanced1(mode, first, count, instanceCount, __addr_); }
/** Entry point to C language function: <code> void {@native glFramebufferTexture3D}(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset) </code> <br>Part of <code>GL_ARB_framebuffer_object</code>, <code>GL_VERSION_3_0</code>; <code>GL_OES_texture_3D</code> */ public void glFramebufferTexture3D(int target, int attachment, int textarget, int texture, int level, int zoffset) { final long __addr_ = ((GLES3ProcAddressTable)_context.getGLProcAddressTable())._addressof_glFramebufferTexture3D; if (__addr_ == 0) { throw new GLException(String.format("Method \"%s\" not available", "glFramebufferTexture3D")); } dispatch_glFramebufferTexture3D1(target, attachment, textarget, texture, level, zoffset, __addr_); }
/** Entry point to C language function: <code> GLboolean {@native glIsRenderbuffer}(GLuint renderbuffer) </code> <br>Part of <code>GL_ES_VERSION_2_0</code>, <code>GL_ARB_framebuffer_object</code>, <code>GL_VERSION_3_0</code>; <code>GL_OES_framebuffer_object</code> */ public boolean glIsRenderbuffer(int renderbuffer) { final long __addr_ = ((GLES3ProcAddressTable)_context.getGLProcAddressTable())._addressof_glIsRenderbuffer; if (__addr_ == 0) { throw new GLException(String.format("Method \"%s\" not available", "glIsRenderbuffer")); } return dispatch_glIsRenderbuffer1(renderbuffer, __addr_); }
/** Entry point to C language function: <code> GLboolean {@native glIsSampler}(GLuint sampler) </code> <br>Part of <code>GL_ARB_sampler_objects</code>, <code>GL_VERSION_3_3</code>, <code>GL_ES_VERSION_3_0</code> */ public boolean glIsSampler(int sampler) { final long __addr_ = ((GLES3ProcAddressTable)_context.getGLProcAddressTable())._addressof_glIsSampler; if (__addr_ == 0) { throw new GLException(String.format("Method \"%s\" not available", "glIsSampler")); } return dispatch_glIsSampler1(sampler, __addr_); }
public static final GL getCurrentGL() throws GLException { GLContext curContext = GLContext.getCurrent(); if (curContext == null) { throw new GLException("No OpenGL context current on this thread"); } return curContext.getGL(); }
public static final GL2 getCurrentGL2() throws GLException { GLContext curContext = GLContext.getCurrent(); if (curContext == null) { throw new GLException("No OpenGL context current on this thread"); } return curContext.getGL().getGL2(); }
/** Entry point to C language function: <code> GLint {@native gluBuild3DMipmapLevelsC}(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data) </code> <br>Part of <code>GLU_VERSION_1_X</code> @param data a direct or array-backed {@link java.nio.Buffer} */ public int gluBuild3DMipmapLevelsC(int target, int internalFormat, int width, int height, int depth, int format, int type, int level, int base, int max, Buffer data) { final boolean data_is_direct = Buffers.isDirect(data); final long __addr_ = getGLUProcAddressTable()._addressof_gluBuild3DMipmapLevelsC; if (__addr_ == 0) { throw new GLException(String.format("Method \"%s\" not available", "gluBuild3DMipmapLevelsC")); } return dispatch_gluBuild3DMipmapLevelsC1(target, internalFormat, width, height, depth, format, type, level, base, max, data_is_direct ? data : Buffers.getArray(data), data_is_direct ? Buffers.getDirectBufferByteOffset(data) : Buffers.getIndirectBufferByteOffset(data), data_is_direct, __addr_); }
/** Entry point to C language function: <code> void {@native glDeleteRenderbuffers}(GLsizei n, const GLuint * renderbuffers) </code> <br>Part of <code>GL_ES_VERSION_2_0</code>, <code>GL_ARB_framebuffer_object</code>, <code>GL_VERSION_3_0</code>; <code>GL_OES_framebuffer_object</code> @param renderbuffers a direct or array-backed {@link java.nio.IntBuffer} */ public void glDeleteRenderbuffers(int n, IntBuffer renderbuffers) { final boolean renderbuffers_is_direct = Buffers.isDirect(renderbuffers); final long __addr_ = ((GLES3ProcAddressTable)_context.getGLProcAddressTable())._addressof_glDeleteRenderbuffers; if (__addr_ == 0) { throw new GLException(String.format("Method \"%s\" not available", "glDeleteRenderbuffers")); } dispatch_glDeleteRenderbuffers1(n, renderbuffers_is_direct ? renderbuffers : Buffers.getArray(renderbuffers), renderbuffers_is_direct ? Buffers.getDirectBufferByteOffset(renderbuffers) : Buffers.getIndirectBufferByteOffset(renderbuffers), renderbuffers_is_direct, __addr_); }
/** Entry point to C language function: <code> void {@native glGenRenderbuffers}(GLsizei n, GLuint * renderbuffers) </code> <br>Part of <code>GL_ES_VERSION_2_0</code>, <code>GL_ARB_framebuffer_object</code>, <code>GL_VERSION_3_0</code>; <code>GL_OES_framebuffer_object</code> @param renderbuffers a direct or array-backed {@link java.nio.IntBuffer} */ public void glGenRenderbuffers(int n, IntBuffer renderbuffers) { final boolean renderbuffers_is_direct = Buffers.isDirect(renderbuffers); final long __addr_ = ((GLES3ProcAddressTable)_context.getGLProcAddressTable())._addressof_glGenRenderbuffers; if (__addr_ == 0) { throw new GLException(String.format("Method \"%s\" not available", "glGenRenderbuffers")); } dispatch_glGenRenderbuffers1(n, renderbuffers_is_direct ? renderbuffers : Buffers.getArray(renderbuffers), renderbuffers_is_direct ? Buffers.getDirectBufferByteOffset(renderbuffers) : Buffers.getIndirectBufferByteOffset(renderbuffers), renderbuffers_is_direct, __addr_); }
/** Entry point to C language function: <code> void {@native glCompressedTexImage3D}(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid * data) </code> <br>Part of <code>GL_ES_VERSION_3_0</code>, <code>GL_VERSION_1_3</code>; <code>GL_OES_texture_3D</code> @param data a direct or array-backed {@link java.nio.Buffer} */ public void glCompressedTexImage3D(int target, int level, int internalformat, int width, int height, int depth, int border, int imageSize, Buffer data) { checkUnpackPBOUnbound(true); final boolean data_is_direct = Buffers.isDirect(data); final long __addr_ = ((GLES3ProcAddressTable)_context.getGLProcAddressTable())._addressof_glCompressedTexImage3D; if (__addr_ == 0) { throw new GLException(String.format("Method \"%s\" not available", "glCompressedTexImage3D")); } dispatch_glCompressedTexImage3D1(target, level, internalformat, width, height, depth, border, imageSize, data_is_direct ? data : Buffers.getArray(data), data_is_direct ? Buffers.getDirectBufferByteOffset(data) : Buffers.getIndirectBufferByteOffset(data), data_is_direct, __addr_); }
/** Entry point to C language function: <code> void {@native glReadPixels}(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid * pixels) </code> <br>Part of <code>GL_ES_VERSION_2_0</code>, <code>GL_VERSION_ES_CL_CM</code>, <code>GL_VERSION_1_0</code> @param pixels a direct or array-backed {@link java.nio.Buffer} */ public void glReadPixels(int x, int y, int width, int height, int format, int type, Buffer pixels) { checkPackPBOUnbound(true); Buffers.rangeCheckBytes(pixels, imageSizeInBytes(format, type, width , height , 1 , true)); final boolean pixels_is_direct = Buffers.isDirect(pixels); final long __addr_ = ((GLES1ProcAddressTable)_context.getGLProcAddressTable())._addressof_glReadPixels; if (__addr_ == 0) { throw new GLException(String.format("Method \"%s\" not available", "glReadPixels")); } dispatch_glReadPixels1(x, y, width, height, format, type, pixels_is_direct ? pixels : Buffers.getArray(pixels), pixels_is_direct ? Buffers.getDirectBufferByteOffset(pixels) : Buffers.getIndirectBufferByteOffset(pixels), pixels_is_direct, __addr_); }