Class PanamaGLPainter
java.lang.Object
org.jzy3d.painters.AbstractPainter
org.jzy3d.painters.PanamaGLPainter
- All Implemented Interfaces:
IPainter
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classRGBA pixels of an image (e.g. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected panamagl.offscreen.FBOThe canvas FBO bound byacquireGL()out of rendering, to unbind at release.protected ArenaNative memory for GL parameters.protected panamagl.opengl.GLContextprotected FloatBufferJava buffer given toglFeedbackBuffer(int, int, FloatBuffer), filled by glRenderMode.protected MemorySegmentprotected panamagl.opengl.GLstatic final intstatic final intprotected ThreadThe thread on which the GL context is current, i.e.protected intNumber of renderings in progress, which may be nested (e.g.protected IntBufferJava buffer given toglSelectBuffer(int, IntBuffer), filled by glRenderMode.protected MemorySegmentFields inherited from class AbstractPainter
camera, canvas, os, view -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionPanamaGL keeps its GL context current on the thread rendering the canvas (e.g.alloc(double[] value) alloc(float[] value) alloc(int[] value) alloc(DoubleBuffer value) Copy the buffer content, from 0 to its capacity, to native memory (heap or direct buffer).alloc(FloatBuffer value) Copy the buffer content, from 0 to its capacity, to native memory (heap or direct buffer).Copy the buffer content, from 0 to its capacity, to native memory (heap or direct buffer).voidIndicates the renderer starts rendering the canvas.intclipPlaneId(int id) Return the GL clip plane ID according to an ID in [0;5]voidconfigureGL(Quality quality) protected voidcopy(MemorySegment segment, int[] values, int offset, int n) Copy n ints of the native memory to the array, starting at offset.protected double[]dbl(float[] values) voiddrawImage(BufferedImage image, float x, float y) Draw an AWT image in the current viewport, with its bottom left corner at the given position in pixels from the bottom left corner of the viewport.voiddrawImage(ByteBuffer imageBuffer, int imageWidth, int imageHeight, Coord2d pixelZoom, Coord3d imagePosition) voidRender 2D text at the given 3D position, asdoes with JOGL's TextRenderer : the text is drawn with AWT in a texture mapped on a quad in screen coordinates, hence any AWT font can be used, text can be rotated, and text partially out of the viewport is partially drawn.invalid reference
NativeDesktopPainterprotected voiddrawTexture(PanamaGLPainter.TextImage image, float x, float y, float rotationD, float x0, float y0, int viewportWidth, int viewportHeight) Draw pixels as a texture mapped on a quad in screen coordinates.voidIndicates the renderer ends rendering the canvas.protected MemorySegmentfloats(float[] values, int offset, int n) Native memory holding n floats of the array, starting at offset.protected panamagl.offscreen.FBOThe offscreen buffer in which the canvas is rendered, or null if not available.panamagl.opengl.GLContextpanamagl.opengl.GLgetGL()double[]float[]double[]float[]intgetTextLengthInPixels(int font, String string) intgetTextLengthInPixels(Font font, String string) Text length processing based on AWTFontMetrics.int[]voidglActiveTexture(int texture) voidglAlphaFunc(int func, float ref) voidglAttachShader(int program, int shader) voidglBegin(int type) voidvoidvoidvoidvoidvoidvoidvoidglBeginQuery(int target, int id) voidglBindBuffer(int target, int buffer) voidglBindFramebuffer(int target, int framebuffer) voidglBindTexture(int target, int texture) voidglBitmap(int width, int height, float xorig, float yorig, float xmove, float ymove, byte[] bitmap, int bitmap_offset) voidglBlendEquation(int mode) voidglBlendFunc(int sfactor, int dfactor) voidglBlendFuncSeparate(int srcRGB, int dstRGB, int srcAlpha, int dstAlpha) voidglBufferData(int target, long size, Buffer data, int usage) voidglBufferSubData(int target, long offset, long size, Buffer data) voidglCallList(int list) intglCheckFramebufferStatus(int target) voidglClear(int mask) voidglClearColor(float red, float green, float blue, float alpha) voidvoidglClearDepth(double d) voidglClearStencil(int s) voidglClipPlane(int plane, double[] equation) voidglColor3f(float r, float g, float b) voidglColor4f(float r, float g, float b, float a) voidglColorPointer(int size, int type, int stride, long pointerOffset) voidglCompileShader(int shader) intintglCreateShader(int type) voidglCullFace(int mode) voidvoidglDeleteBuffers(int n, int[] buffers, int offset) voidglDeleteFramebuffers(int n, int[] framebuffers, int offset) voidglDeleteLists(int list, int range) voidglDeleteProgram(int program) voidglDeleteQueries(int n, int[] ids, int offset) voidglDeleteShader(int shader) voidglDeleteTextures(int n, int[] textures, int offset) voidglDepthFunc(int func) voidglDepthFunc(DepthFunc func) voidglDepthRangef(float near, float far) voidglDetachShader(int program, int shader) voidglDisable(int type) voidvoidglDisable_ClipPlane(int plane) voidvoidvoidglDisable_Light(int light) voidvoidvoidvoidvoidvoidglDisableClientState(int array) voidglDrawArrays(int mode, int first, int count) voidglDrawBuffer(int mode) voidglDrawBuffers(int n, int[] buffers, int offset) voidglDrawElements(int mode, int count, int type, long indicesOffset) voidglDrawPixels(int width, int height, int format, int type, Buffer pixels) Draw pixels of any buffer type.voidglEnable(int type) voidvoidglEnable_ClipPlane(int plane) voidvoidvoidvoidglEnable_Light(int light) voidvoidvoidvoidvoidvoidvoidglEnableClientState(int array) voidglEnd()voidvoidglEndQuery(int target) voidglEvalCoord2f(float u, float v) voidglFeedbackBuffer(int size, int type, FloatBuffer buffer) The buffer is filled when leaving theRenderMode.FEEDBACKmode withglRenderMode(int).voidglFlush()voidglFramebufferTexture2D(int target, int attachment, int textarget, int texture, int level) voidglFrontFace(int mode) voidvoidglFrustum(double left, double right, double bottom, double top, double zNear, double zFar) voidglGenBuffers(int n, int[] buffers, int offset) voidglGenFramebuffers(int n, int[] framebuffers, int offset) intglGenLists(int range) voidglGenQueries(int n, int[] ids, int offset) voidglGenTextures(int n, int[] textures, int offset) voidglGetDoublev(int pname, double[] params, int params_offset) intvoidglGetFloatv(int pname, float[] data, int data_offset) voidglGetIntegerv(int pname, int[] data, int data_offset) glGetProgramInfoLog(int program) voidglGetProgramiv(int program, int pname, int[] params, int offset) voidglGetQueryObjectuiv(int id, int pname, int[] params, int offset) glGetShaderInfoLog(int shader) voidglGetShaderiv(int shader, int pname, int[] params, int offset) glGetString(int stringID) intglGetUniformLocation(int program, String name) voidglHint(int target, int mode) voidvoidbooleanglIsList(int list) voidglLight_Ambiant(int lightId, Color ambiantColor) voidglLight_Diffuse(int lightId, Color diffuseColor) voidglLight_Position(int lightId, float[] positionZero) voidglLight_Shininess(int lightId, float value) voidglLight_Specular(int lightId, Color specularColor) voidglLightf(int light, int pname, float value) voidglLightf(int light, Attenuation.Type attenuationType, float value) voidglLightfv(int light, int pname, float[] params, int params_offset) voidglLightModel(LightModel model, boolean value) voidglLightModel(LightModel model, Color color) voidglLightModelfv(int mode, float[] value) voidglLightModeli(int mode, int value) voidglLineStipple(int factor, short pattern) voidglLineWidth(float width) voidglLinkProgram(int program) voidvoidglLoadName(int name) voidglMap2f(int target, float u1, float u2, int ustride, int uorder, float v1, float v2, int vstride, int vorder, FloatBuffer points) voidglMaterial(MaterialProperty material, float[] color, boolean isFront) voidglMaterial(MaterialProperty material, Color color, boolean isFront) voidglMaterialfv(int face, int pname, float[] params, int params_offset) voidglMatrixMode(int mode) voidvoidvoidglMultiDrawArrays(int mode, IntBuffer first, IntBuffer count, int drawcount) voidglMultiDrawElements(int mode, IntBuffer count, int type, LongBuffer indicesOffsets, int drawcount) voidglNewList(int list, int mode) voidvoidglNormal3f(float nx, float ny, float nz) voidglNormalPointer(int type, int stride, long pointerOffset) voidglOrtho(double left, double right, double bottom, double top, double near_val, double far_val) voidglPassThrough(float token) voidglPixelStore(PixelStore store, int param) voidglPixelStorei(int pname, int param) voidglPixelZoom(float xfactor, float yfactor) voidglPointSize(float width) voidglPolygonMode(int frontOrBack, int fill) voidglPolygonMode(PolygonMode mode, PolygonFill fill) voidglPolygonOffset(float factor, float units) voidvoidvoidglPrimitiveRestartIndex(int index) voidOPEN GL InterfacevoidglPushName(int name) voidglRasterPos3f(float x, float y, float z) voidglReadPixels(int x, int y, int width, int height, int format, int type, Buffer pixels) intglRenderMode(int mode) Change the render mode and copy the content written by GL in the select and feedback buffers to the Java buffers given toglSelectBuffer(int, IntBuffer)andglFeedbackBuffer(int, int, FloatBuffer).intglRenderMode(RenderMode mode) voidglRotatef(float angle, float x, float y, float z) voidglScalef(float x, float y, float z) voidglSelectBuffer(int size, IntBuffer buffer) The buffer is filled when leaving theRenderMode.SELECTmode withglRenderMode(int).voidglShadeModel(int mode) voidglShadeModel(ColorModel colorModel) voidvoidvoidglShaderSource(int shader, String[] sources) voidglStencilFunc(StencilFunc func, int ref, int mask) voidglStencilMask(int mask) voidvoidvoidglStencilOp(StencilOp fail, StencilOp zfail, StencilOp zpass) voidglTexCoord2f(float s, float t) voidglTexCoord3f(float s, float t, float r) voidglTexCoordPointer(int size, int type, int stride, long pointerOffset) voidglTexEnvf(int target, int pname, float param) voidglTexEnvi(int target, int pname, int param) voidglTexImage1D(int target, int level, int internalFormat, int width, int border, int format, int type, Buffer pixels) voidglTexImage2D(int target, int level, int internalFormat, int width, int height, int border, int format, int type, Buffer pixels) voidglTexImage3D(int target, int level, int internalFormat, int width, int height, int depth, int border, int format, int type, Buffer pixels) voidglTexParameteri(int target, int pname, int param) voidglTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, Buffer pixels) voidglTranslatef(float x, float y, float z) voidgluCylinder(double base, double top, double height, int slices, int stacks) voidgluDisk(double inner, double outer, int slices, int loops) voidgluLookAt(float eyeX, float eyeY, float eyeZ, float centerX, float centerY, float centerZ, float upX, float upY, float upZ) voidglUniform1f(int location, float v0) voidglUniform1fv(int location, int count, float[] value, int offset) voidglUniform1i(int location, int v0) voidglUniform2fv(int location, int count, float[] value, int offset) voidglUniform3fv(int location, int count, float[] value, int offset) voidglUniform4fv(int location, int count, float[] value, int offset) voidglUniformMatrix4fv(int location, int count, boolean transpose, float[] value, int offset) voidgluOrtho2D(double left, double right, double bottom, double top) voidgluPerspective(double fovy, double aspect, double zNear, double zFar) voidgluPickMatrix(double x, double y, double delX, double delY, int[] viewport, int viewport_offset) booleangluProject(float objX, float objY, float objZ, float[] model, int model_offset, float[] proj, int proj_offset, int[] view, int view_offset, float[] winPos, int winPos_offset) voidglUseProgram(int program) voidgluSphere(double radius, int slices, int stacks) intglutBitmapLength(int font, String string) Process the given font length to further process alignement.voidglutBitmapString(int font, String string) Draw a string at the current raster position with the current raster color, as GLUT does : the raster position is the left of the text baseline and is moved to the end of the text once drawn.voidglutBitmapString(Font axisFont, String label, Coord3d p, Color c) voidglutSolidCube(float size) voidglutSolidSphere(double radius, int slices, int stacks) voidglutSolidTeapot(float scale) voidglutWireTeapot(float scale) booleangluUnProject(float winX, float winY, float winZ, float[] model, int model_offset, float[] proj, int proj_offset, int[] view, int view_offset, float[] objPos, int objPos_offset) voidglValidateProgram(int program) voidglVertex3d(double x, double y, double z) voidglVertex3f(float x, float y, float z) voidglVertexPointer(int size, int type, int stride, long pointerOffset) voidglViewport(int x, int y, int width, int height) protected MemorySegmentints(int n) Native memory for n ints.protected MemorySegmentints(int[] values, int offset, int n) Native memory holding n ints of the array, starting at offset.booleanReturn true if the calling thread is the one on which the GL context is current.booleanReturn true while the renderer renders the canvas.protected intlightId(int id) protected intmaterialProperty(MaterialProperty material) protected MemorySegmentmatrix(float[] values, int offset) A 4x4 matrix of doubles, as expected by GLU, read from the float array at the offset.protected MemorySegmentoffset(long offset) An offset in a bound buffer object, given to GL as a pointer value.protected PanamaGLPainter.TextImagepixels(BufferedImage image) Convert an AWT image to RGBA pixels, bottom row first as expected by OpenGL.protected intpolygonFillValue(PolygonFill mode) protected intpolygonModeValue(PolygonMode mode) voidvoidUnbind the offscreen buffer bound byacquireGL().Return native memory holding the buffer content from its position to its limit.protected MemorySegmentsegmentOrNull(Buffer buffer) A buffer as native memory, or NULL if the buffer is null.voidsetContext(panamagl.opengl.GLContext context) voidsetGL(panamagl.opengl.GL gl) voidsetGLThread(Thread glThread) Register the thread on which the GL context is current.protected Stringstring(MemorySegment string) Read a C string returned by GL.protected PanamaGLPainter.TextImageprotected intprotected StringBufferversion()protected StringBufferversion(boolean showExtensions) protected MemorySegmentviewport(int[] values, int offset) A viewport of 4 ints read from the array at the offset.Methods inherited from class AbstractPainter
box, clearCache, clearColor, clip, clip, clipOff, clipOn, clipStatus, color, colorAlphaFactor, colorAlphaOverride, equation, getCamera, getCanvas, getOS, getQuality, getView, gluProject, gluUnProject, isJVMScaleLargerThanNativeScale, isJVMScaleLargerThanNativeScale, material, modelToScreen, modelToScreen, modelToScreen, modelToScreen, modelToScreen, modelToScreen, modelToScreen, modelToScreen, normal, raster, screenToModel, screenToModel, setCamera, setCanvas, setView, transform, vertex, vertex, vertex
-
Field Details
-
gl
protected panamagl.opengl.GL gl -
context
protected panamagl.opengl.GLContext context -
arena
Native memory for GL parameters. An automatic arena lets any thread allocate (rendering happens on the toolkit thread, not on the thread building the painter) and releases memory when segments are not referenced anymore. -
glThread
The thread on which the GL context is current, i.e. the thread rendering the canvas. -
rendering
protected int renderingNumber of renderings in progress, which may be nested (e.g. init triggering a display). -
acquiredFBO
protected panamagl.offscreen.FBO acquiredFBOThe canvas FBO bound byacquireGL()out of rendering, to unbind at release. -
selectBuffer
Java buffer given toglSelectBuffer(int, IntBuffer), filled by glRenderMode. -
selectSegment
-
feedbackBuffer
Java buffer given toglFeedbackBuffer(int, int, FloatBuffer), filled by glRenderMode. -
feedbackSegment
-
GL_RGBA
public static final int GL_RGBA- See Also:
-
GL_UNSIGNED_BYTE
public static final int GL_UNSIGNED_BYTE- See Also:
-
-
Constructor Details
-
PanamaGLPainter
public PanamaGLPainter()
-
-
Method Details
-
getGL
public panamagl.opengl.GL getGL() -
setGL
public void setGL(panamagl.opengl.GL gl) -
getContext
public panamagl.opengl.GLContext getContext() -
setContext
public void setContext(panamagl.opengl.GLContext context) -
alloc
-
alloc
-
alloc
-
alloc
Copy the buffer content, from 0 to its capacity, to native memory (heap or direct buffer). -
alloc
Copy the buffer content, from 0 to its capacity, to native memory (heap or direct buffer). -
alloc
Copy the buffer content, from 0 to its capacity, to native memory (heap or direct buffer). -
segment
Return native memory holding the buffer content from its position to its limit. Direct buffers are used without copy, heap buffers are copied. -
alloc
-
dbl
protected double[] dbl(float[] values) -
glGetString
-
glGetIntegerv
public void glGetIntegerv(int pname, int[] data, int data_offset) -
glGetDoublev
public void glGetDoublev(int pname, double[] params, int params_offset) -
glGetFloatv
public void glGetFloatv(int pname, float[] data, int data_offset) -
version
-
version
-
acquireGL
PanamaGL keeps its GL context current on the thread rendering the canvas (e.g. the AWT thread for Swing). The context can't be made current on another thread while the canvas is alive. Out of rendering, the offscreen buffer of the canvas is bound so that GL commands (e.g. picking) target the canvas framebuffer.- Returns:
- the GL instance if called from the rendering thread, null otherwise : callers must
then defer their GL work to the rendering thread (see
isGLThread()).
-
releaseGL
public void releaseGL()Unbind the offscreen buffer bound byacquireGL(). The GL context remains current on the rendering thread. -
getCanvasFBO
protected panamagl.offscreen.FBO getCanvasFBO()The offscreen buffer in which the canvas is rendered, or null if not available. -
isRendering
public boolean isRendering()Return true while the renderer renders the canvas. -
beginRendering
public void beginRendering()Indicates the renderer starts rendering the canvas. Invoked by the renderer. -
endRendering
public void endRendering()Indicates the renderer ends rendering the canvas. Invoked by the renderer. -
isGLThread
public boolean isGLThread()Return true if the calling thread is the one on which the GL context is current. -
getGLThread
-
setGLThread
Register the thread on which the GL context is current. Invoked by the renderer. -
getWindowingToolkit
- Specified by:
getWindowingToolkitin interfaceIPainter- Overrides:
getWindowingToolkitin classAbstractPainter
-
configureGL
-
getViewPortAsInt
public int[] getViewPortAsInt() -
getProjectionAsDouble
public double[] getProjectionAsDouble() -
getProjectionAsFloat
public float[] getProjectionAsFloat() -
getModelViewAsDouble
public double[] getModelViewAsDouble() -
getModelViewAsFloat
public float[] getModelViewAsFloat() -
glPushMatrix
public void glPushMatrix()OPEN GL Interface -
glPopMatrix
public void glPopMatrix() -
glMatrixMode
public void glMatrixMode(int mode) -
glLoadIdentity
public void glLoadIdentity() -
glScalef
public void glScalef(float x, float y, float z) -
glTranslatef
public void glTranslatef(float x, float y, float z) -
glRotatef
public void glRotatef(float angle, float x, float y, float z) -
glEnable
public void glEnable(int type) -
glDisable
public void glDisable(int type) -
glPointSize
public void glPointSize(float width) -
glLineWidth
public void glLineWidth(float width) -
glBegin
public void glBegin(int type) -
glColor3f
public void glColor3f(float r, float g, float b) -
glColor4f
public void glColor4f(float r, float g, float b, float a) -
glVertex3f
public void glVertex3f(float x, float y, float z) -
glVertex3d
public void glVertex3d(double x, double y, double z) -
glEnd
public void glEnd() -
glFrontFace
public void glFrontFace(int mode) -
glCullFace
public void glCullFace(int mode) -
glPolygonMode
-
polygonModeValue
-
polygonFillValue
-
glPolygonMode
public void glPolygonMode(int frontOrBack, int fill) -
glPolygonOffset
public void glPolygonOffset(float factor, float units) -
glLineStipple
public void glLineStipple(int factor, short pattern) -
glTexCoord2f
public void glTexCoord2f(float s, float t) -
glTexEnvf
public void glTexEnvf(int target, int pname, float param) -
glTexEnvi
public void glTexEnvi(int target, int pname, int param) -
glRasterPos3f
public void glRasterPos3f(float x, float y, float z) -
glDrawPixels
Draw pixels of any buffer type. Direct buffers are read without copy, heap buffers are copied to native memory. -
glPixelZoom
public void glPixelZoom(float xfactor, float yfactor) -
glPixelStorei
public void glPixelStorei(int pname, int param) -
glPixelStore
-
glBitmap
public void glBitmap(int width, int height, float xorig, float yorig, float xmove, float ymove, byte[] bitmap, int bitmap_offset) -
drawImage
public void drawImage(ByteBuffer imageBuffer, int imageWidth, int imageHeight, Coord2d pixelZoom, Coord3d imagePosition) -
glutBitmapLength
Process the given font length to further process alignement. Will only return a valid width for knownFont(Helevetica and Times Roman). Getting text width of any string can be donegetTextLengthInPixels(Font, String). -
getTextLengthInPixels
-
getTextLengthInPixels
Text length processing based on AWTFontMetrics. Prefers the liveGraphicsof the canvas when it is an AWTComponent(Swing backend) because it reflects the actual display's font rendering. Otherwise (JavaFX, SWT, ...) falls back to a headlessBufferedImagecontext that is still able to resolve the same AWTFontMetrics. -
glutBitmapString
Draw a string at the current raster position with the current raster color, as GLUT does : the raster position is the left of the text baseline and is moved to the end of the text once drawn. The text is drawn with AWT in an image, hence any AWT font may be used. -
textImage
-
pixels
Convert an AWT image to RGBA pixels, bottom row first as expected by OpenGL. -
drawText
Render 2D text at the given 3D position, asdoes with JOGL's TextRenderer : the text is drawn with AWT in a texture mapped on a quad in screen coordinates, hence any AWT font can be used, text can be rotated, and text partially out of the viewport is partially drawn. Rotation is in radian and is applied at the center of the text.invalid reference
NativeDesktopPainter -
drawImage
Draw an AWT image in the current viewport, with its bottom left corner at the given position in pixels from the bottom left corner of the viewport. The image is drawn as a textured quad, so that it can be partially out of the viewport. -
drawTexture
protected void drawTexture(PanamaGLPainter.TextImage image, float x, float y, float rotationD, float x0, float y0, int viewportWidth, int viewportHeight) Draw pixels as a texture mapped on a quad in screen coordinates.- Parameters:
x- , y the position where the quad origin is translated, in pixels.rotationD- a rotation around the quad origin, in degrees.x0- , y0 the position of the bottom left corner of the quad, relative to its origin.
-
glutBitmapString
-
glGenLists
public int glGenLists(int range) -
glNewList
public void glNewList(int list, int mode) -
glNewList
-
glEndList
public void glEndList() -
glCallList
public void glCallList(int list) -
glIsList
public boolean glIsList(int list) -
glDeleteLists
public void glDeleteLists(int list, int range) -
gluDisk
public void gluDisk(double inner, double outer, int slices, int loops) -
glutSolidSphere
public void glutSolidSphere(double radius, int slices, int stacks) -
glutSolidTeapot
public void glutSolidTeapot(float scale) -
glutWireTeapot
public void glutWireTeapot(float scale) -
gluSphere
public void gluSphere(double radius, int slices, int stacks) -
gluCylinder
public void gluCylinder(double base, double top, double height, int slices, int stacks) -
glutSolidCube
public void glutSolidCube(float size) -
glFeedbackBuffer
The buffer is filled when leaving theRenderMode.FEEDBACKmode withglRenderMode(int). -
glRenderMode
public int glRenderMode(int mode) Change the render mode and copy the content written by GL in the select and feedback buffers to the Java buffers given toglSelectBuffer(int, IntBuffer)andglFeedbackBuffer(int, int, FloatBuffer). -
glRenderMode
-
glPassThrough
public void glPassThrough(float token) -
glStencilFunc
-
glStencilMask
public void glStencilMask(int mask) -
glStencilMask_True
public void glStencilMask_True() -
glStencilMask_False
public void glStencilMask_False() -
glStencilOp
-
glClearStencil
public void glClearStencil(int s) -
toInt
-
glOrtho
public void glOrtho(double left, double right, double bottom, double top, double near_val, double far_val) -
gluOrtho2D
public void gluOrtho2D(double left, double right, double bottom, double top) -
gluPerspective
public void gluPerspective(double fovy, double aspect, double zNear, double zFar) -
glFrustum
public void glFrustum(double left, double right, double bottom, double top, double zNear, double zFar) -
gluLookAt
public void gluLookAt(float eyeX, float eyeY, float eyeZ, float centerX, float centerY, float centerZ, float upX, float upY, float upZ) -
glViewport
public void glViewport(int x, int y, int width, int height) -
glClipPlane
public void glClipPlane(int plane, double[] equation) - Parameters:
plane- the GL plane id, e.g. GL_CLIP_PLANE0, as given byclipPlaneId(int)
-
glEnable_ClipPlane
public void glEnable_ClipPlane(int plane) -
glDisable_ClipPlane
public void glDisable_ClipPlane(int plane) -
clipPlaneId
public int clipPlaneId(int id) Return the GL clip plane ID according to an ID in [0;5] -
gluUnProject
public boolean gluUnProject(float winX, float winY, float winZ, float[] model, int model_offset, float[] proj, int proj_offset, int[] view, int view_offset, float[] objPos, int objPos_offset) -
gluProject
public boolean gluProject(float objX, float objY, float objZ, float[] model, int model_offset, float[] proj, int proj_offset, int[] view, int view_offset, float[] winPos, int winPos_offset) -
matrix
A 4x4 matrix of doubles, as expected by GLU, read from the float array at the offset. -
viewport
A viewport of 4 ints read from the array at the offset. -
glDepthFunc
public void glDepthFunc(int func) -
glDepthRangef
public void glDepthRangef(float near, float far) -
printGLDepthRange
public void printGLDepthRange() -
glBlendFunc
public void glBlendFunc(int sfactor, int dfactor) -
glHint
public void glHint(int target, int mode) -
glShadeModel
-
glShadeModel
public void glShadeModel(int mode) -
glShadeModel_Smooth
public void glShadeModel_Smooth() -
glShadeModel_Flat
public void glShadeModel_Flat() -
glMaterialfv
public void glMaterialfv(int face, int pname, float[] params, int params_offset) -
glNormal3f
public void glNormal3f(float nx, float ny, float nz) -
glLightf
-
glLightf
public void glLightf(int light, int pname, float value) -
glLightfv
public void glLightfv(int light, int pname, float[] params, int params_offset) -
glLight_Position
public void glLight_Position(int lightId, float[] positionZero) -
glLight_Ambiant
-
glLight_Diffuse
-
glLight_Specular
-
glLight_Shininess
public void glLight_Shininess(int lightId, float value) -
glEnable_Light
public void glEnable_Light(int light) -
glDisable_Light
public void glDisable_Light(int light) -
lightId
protected int lightId(int id) -
glLightModeli
public void glLightModeli(int mode, int value) -
glLightModelfv
public void glLightModelfv(int mode, float[] value) -
glLightModel
-
glLightModel
-
glClearColor
public void glClearColor(float red, float green, float blue, float alpha) -
glClearDepth
public void glClearDepth(double d) -
glClear
public void glClear(int mask) -
glClearColorAndDepthBuffers
public void glClearColorAndDepthBuffers() -
glInitNames
public void glInitNames() -
glLoadName
public void glLoadName(int name) -
glPushName
public void glPushName(int name) -
glPopName
public void glPopName() -
glSelectBuffer
The buffer is filled when leaving theRenderMode.SELECTmode withglRenderMode(int). -
gluPickMatrix
public void gluPickMatrix(double x, double y, double delX, double delY, int[] viewport, int viewport_offset) -
glFlush
public void glFlush() -
glEvalCoord2f
public void glEvalCoord2f(float u, float v) -
glMap2f
public void glMap2f(int target, float u1, float u2, int ustride, int uorder, float v1, float v2, int vstride, int vorder, FloatBuffer points) -
glEnable_PolygonOffsetFill
public void glEnable_PolygonOffsetFill() -
glDisable_PolygonOffsetFill
public void glDisable_PolygonOffsetFill() -
glEnable_PolygonOffsetLine
public void glEnable_PolygonOffsetLine() -
glDisable_PolygonOffsetLine
public void glDisable_PolygonOffsetLine() -
glDisable_Lighting
public void glDisable_Lighting() -
glEnable_Lighting
public void glEnable_Lighting() -
glEnable_LineStipple
public void glEnable_LineStipple() -
glDisable_LineStipple
public void glDisable_LineStipple() -
glEnable_Blend
public void glEnable_Blend() -
glDisable_Blend
public void glDisable_Blend() -
glMatrixMode_ModelView
public void glMatrixMode_ModelView() -
glMatrixMode_Projection
public void glMatrixMode_Projection() -
glBegin_Polygon
public void glBegin_Polygon() -
glBegin_Quad
public void glBegin_Quad() -
glBegin_Triangle
public void glBegin_Triangle() -
glBegin_Point
public void glBegin_Point() -
glBegin_LineStrip
public void glBegin_LineStrip() -
glBegin_LineLoop
public void glBegin_LineLoop() -
glBegin_Line
public void glBegin_Line() -
glEnable_CullFace
public void glEnable_CullFace() -
glDisable_CullFace
public void glDisable_CullFace() -
glFrontFace_ClockWise
public void glFrontFace_ClockWise() -
glCullFace_Front
public void glCullFace_Front() -
glEnable_ColorMaterial
public void glEnable_ColorMaterial() -
glMaterial
-
glMaterial
-
materialProperty
-
glEnable_PointSmooth
public void glEnable_PointSmooth() -
glHint_PointSmooth_Nicest
public void glHint_PointSmooth_Nicest() -
glDepthFunc
-
glEnable_DepthTest
public void glEnable_DepthTest() -
glDisable_DepthTest
public void glDisable_DepthTest() -
glEnable_Stencil
public void glEnable_Stencil() -
glDisable_Stencil
public void glDisable_Stencil() -
ints
Native memory for n ints. -
ints
Native memory holding n ints of the array, starting at offset. -
copy
Copy n ints of the native memory to the array, starting at offset. -
floats
Native memory holding n floats of the array, starting at offset. -
segmentOrNull
A buffer as native memory, or NULL if the buffer is null. -
offset
An offset in a bound buffer object, given to GL as a pointer value. -
string
Read a C string returned by GL. -
glGenBuffers
public void glGenBuffers(int n, int[] buffers, int offset) -
glDeleteBuffers
public void glDeleteBuffers(int n, int[] buffers, int offset) -
glBindBuffer
public void glBindBuffer(int target, int buffer) -
glBufferData
-
glBufferSubData
-
glEnableClientState
public void glEnableClientState(int array) -
glDisableClientState
public void glDisableClientState(int array) -
glVertexPointer
public void glVertexPointer(int size, int type, int stride, long pointerOffset) -
glNormalPointer
public void glNormalPointer(int type, int stride, long pointerOffset) -
glColorPointer
public void glColorPointer(int size, int type, int stride, long pointerOffset) -
glTexCoordPointer
public void glTexCoordPointer(int size, int type, int stride, long pointerOffset) -
glDrawArrays
public void glDrawArrays(int mode, int first, int count) -
glDrawElements
public void glDrawElements(int mode, int count, int type, long indicesOffset) -
glMultiDrawArrays
-
glMultiDrawElements
public void glMultiDrawElements(int mode, IntBuffer count, int type, LongBuffer indicesOffsets, int drawcount) -
glPrimitiveRestartIndex
public void glPrimitiveRestartIndex(int index) -
glCreateShader
public int glCreateShader(int type) -
glShaderSource
-
glCompileShader
public void glCompileShader(int shader) -
glGetShaderiv
public void glGetShaderiv(int shader, int pname, int[] params, int offset) -
glGetShaderInfoLog
-
glDeleteShader
public void glDeleteShader(int shader) -
glCreateProgram
public int glCreateProgram() -
glAttachShader
public void glAttachShader(int program, int shader) -
glDetachShader
public void glDetachShader(int program, int shader) -
glLinkProgram
public void glLinkProgram(int program) -
glValidateProgram
public void glValidateProgram(int program) -
glGetProgramiv
public void glGetProgramiv(int program, int pname, int[] params, int offset) -
glGetProgramInfoLog
-
glUseProgram
public void glUseProgram(int program) -
glDeleteProgram
public void glDeleteProgram(int program) -
glGetUniformLocation
-
glUniform1i
public void glUniform1i(int location, int v0) -
glUniform1f
public void glUniform1f(int location, float v0) -
glUniform1fv
public void glUniform1fv(int location, int count, float[] value, int offset) -
glUniform2fv
public void glUniform2fv(int location, int count, float[] value, int offset) -
glUniform3fv
public void glUniform3fv(int location, int count, float[] value, int offset) -
glUniform4fv
public void glUniform4fv(int location, int count, float[] value, int offset) -
glUniformMatrix4fv
public void glUniformMatrix4fv(int location, int count, boolean transpose, float[] value, int offset) -
glGenTextures
public void glGenTextures(int n, int[] textures, int offset) -
glDeleteTextures
public void glDeleteTextures(int n, int[] textures, int offset) -
glBindTexture
public void glBindTexture(int target, int texture) -
glActiveTexture
public void glActiveTexture(int texture) -
glTexParameteri
public void glTexParameteri(int target, int pname, int param) -
glTexImage1D
public void glTexImage1D(int target, int level, int internalFormat, int width, int border, int format, int type, Buffer pixels) -
glTexImage2D
public void glTexImage2D(int target, int level, int internalFormat, int width, int height, int border, int format, int type, Buffer pixels) -
glTexImage3D
public void glTexImage3D(int target, int level, int internalFormat, int width, int height, int depth, int border, int format, int type, Buffer pixels) -
glTexSubImage3D
public void glTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, Buffer pixels) -
glTexCoord3f
public void glTexCoord3f(float s, float t, float r) -
glGenFramebuffers
public void glGenFramebuffers(int n, int[] framebuffers, int offset) -
glDeleteFramebuffers
public void glDeleteFramebuffers(int n, int[] framebuffers, int offset) -
glBindFramebuffer
public void glBindFramebuffer(int target, int framebuffer) -
glFramebufferTexture2D
public void glFramebufferTexture2D(int target, int attachment, int textarget, int texture, int level) -
glCheckFramebufferStatus
public int glCheckFramebufferStatus(int target) -
glDrawBuffer
public void glDrawBuffer(int mode) -
glDrawBuffers
public void glDrawBuffers(int n, int[] buffers, int offset) -
glGenQueries
public void glGenQueries(int n, int[] ids, int offset) -
glDeleteQueries
public void glDeleteQueries(int n, int[] ids, int offset) -
glBeginQuery
public void glBeginQuery(int target, int id) -
glEndQuery
public void glEndQuery(int target) -
glGetQueryObjectuiv
public void glGetQueryObjectuiv(int id, int pname, int[] params, int offset) -
glAlphaFunc
public void glAlphaFunc(int func, float ref) -
glBlendEquation
public void glBlendEquation(int mode) -
glBlendFuncSeparate
public void glBlendFuncSeparate(int srcRGB, int dstRGB, int srcAlpha, int dstAlpha) -
glGetError
public int glGetError() -
glReadPixels
-