Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.newdawn.slick.opengl.renderer
Class ImmediateModeOGLRenderer

    java.lang.Object
      org.newdawn.slick.opengl.renderer.ImmediateModeOGLRenderer

All Implemented Interfaces:
  SGL

Direct Known Subclasses:
  VAOGLRenderer

    public class ImmediateModeOGLRenderer

extends java.lang.Object
implements SGL

The default OpenGL renderer, uses immediate mode for everything

Author:
  kevin

Field Summary
`protected float` | `alphaScale` The global colour scale

Fields inherited from interface org.newdawn.slick.opengl.renderer.SGL
`GL_ALWAYS, GL_BGRA, GL_BLEND, GL_CLAMP, GL_CLIP_PLANE0, GL_CLIP_PLANE1, GL_CLIP_PLANE2, GL_CLIP_PLANE3, GL_COLOR_BUFFER_BIT, GL_COLOR_CLEAR_VALUE, GL_COLOR_SUM_EXT, GL_COMPILE, GL_COMPILE_AND_EXECUTE, GL_DEPTH_BUFFER_BIT, GL_DEPTH_TEST, GL_DST_ALPHA, GL_EQUAL, GL_LINE_SMOOTH, GL_LINE_STRIP, GL_LINE_WIDTH, GL_LINEAR, GL_LINES, GL_MAX_TEXTURE_SIZE, GL_MIRROR_CLAMP_TO_EDGE_EXT, GL_MODELVIEW_MATRIX, GL_MODULATE, GL_NEAREST, GL_NOTEQUAL, GL_ONE, GL_ONE_MINUS_DST_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE_MINUS_SRC_COLOR, GL_POINT_SMOOTH, GL_POINTS, GL_POLYGON_SMOOTH, GL_QUADS, GL_RGB, GL_RGBA, GL_RGBA16, GL_RGBA8, GL_SCISSOR_TEST, GL_SRC_ALPHA, GL_SRC_COLOR, GL_TEXTURE_2D, GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_TEXTURE_MAG_FILTER, GL_TEXTURE_MIN_FILTER, GL_TEXTURE_WRAP_S, GL_TEXTURE_WRAP_T, GL_TRIANGLE_FAN, GL_TRIANGLES, GL_UNSIGNED_BYTE`

Constructor Summary
`ImmediateModeOGLRenderer()`

Method Summary
`boolean` | `canSecondaryColor()`
`boolean` | `canTextureMirrorClamp()` Check if the mirror clamp extension is available
`void` | `enterOrtho(int xsize, int ysize)` Enter orthographic mode
`void` | `flush()` Flush the current state of the renderer down to GL
`float[]` | `getCurrentColor()` Get the current colour being rendered
`void` | `glBegin(int geomType)` OpenGL Method - @url http://www.opengl.org/documentation/
`void` | `glBindTexture(int target, int id)` OpenGL Method - @url http://www.opengl.org/documentation/
`void` | `glBlendFunc(int src, int dest)` OpenGL Method - @url http://www.opengl.org/documentation/
`void` | `glCallList(int id)` OpenGL Method - @url http://www.opengl.org/documentation/
`void` | `glClear(int value)` OpenGL Method - @url http://www.opengl.org/documentation/
`void` | `glClearColor(float red, float green, float blue, float alpha)` OpenGL Method - @url http://www.opengl.org/documentation/
`void` | `glClearDepth(float value)` OpenGL Method - @url http://www.opengl.org/documentation/
`void` | `glClipPlane(int plane, java.nio.DoubleBuffer buffer)` OpenGL Method - @url http://www.opengl.org/documentation/
`void` | `glColor4f(float r, float g, float b, float a)` OpenGL Method - @url http://www.opengl.org/documentation/
`void` | `glColorMask(boolean red, boolean green, boolean blue, boolean alpha)` OpenGL Method - @url http://www.opengl.org/documentation/
`void` | `glCopyTexImage2D(int target, int level, int internalFormat, int x, int y, int width, int height, int border)` OpenGL Method - @url http://www.opengl.org/documentation/
`void` | `glDeleteLists(int list, int count)` OpenGL Method - @url http://www.opengl.org/documentation/
`void` | `glDeleteTextures(java.nio.IntBuffer buffer)` OpenGL Method - @url http://www.opengl.org/documentation/
`void` | `glDepthFunc(int func)` OpenGL Method - @url http://www.opengl.org/documentation/
`void` | `glDepthMask(boolean mask)` OpenGL Method - @url http://www.opengl.org/documentation/
`void` | `glDisable(int item)` OpenGL Method - @url http://www.opengl.org/documentation/
`void` | `glEnable(int item)` OpenGL Method - @url http://www.opengl.org/documentation/
`void` | `glEnd()` OpenGL Method - @url http://www.opengl.org/documentation/
`void` | `glEndList()` OpenGL Method - @url http://www.opengl.org/documentation/
`int` | `glGenLists(int count)` OpenGL Method - @url http://www.opengl.org/documentation/
`void` | `glGenTextures(java.nio.IntBuffer ids)` OpenGL Method - @url http://www.opengl.org/documentation/
`void` | `glGetError()` OpenGL Method - @url http://www.opengl.org/documentation/
`void` | `glGetFloat(int id, java.nio.FloatBuffer ret)` OpenGL Method - @url http://www.opengl.org/documentation/
`void` | `glGetInteger(int id, java.nio.IntBuffer ret)` OpenGL Method - @url http://www.opengl.org/documentation/
`void` | `glGetTexImage(int target, int level, int format, int type, java.nio.ByteBuffer pixels)` OpenGL Method - @url http://www.opengl.org/documentation/
`void` | `glLineWidth(float width)` OpenGL Method - @url http://www.opengl.org/documentation/
`void` | `glLoadIdentity()` OpenGL Method - @url http://www.opengl.org/documentation/
`void` | `glLoadMatrix(java.nio.FloatBuffer buffer)` OpenGL Method - @url http://www.opengl.org/documentation/
`void` | `glNewList(int id, int option)` OpenGL Method - @url http://www.opengl.org/documentation/
`void` | `glPointSize(float size)` OpenGL Method - @url http://www.opengl.org/documentation/
`void` | `glPopMatrix()` OpenGL Method - @url http://www.opengl.org/documentation/
`void` | `glPushMatrix()` OpenGL Method - @url http://www.opengl.org/documentation/
`void` | `glReadPixels(int x, int y, int width, int height, int format, int type, java.nio.ByteBuffer pixels)` OpenGL Method - @url http://www.opengl.org/documentation/
`void` | `glRotatef(float angle, float x, float y, float z)` OpenGL Method - @url http://www.opengl.org/documentation/
`void` | `glScalef(float x, float y, float z)` OpenGL Method - @url http://www.opengl.org/documentation/
`void` | `glScissor(int x, int y, int width, int height)` OpenGL Method - @url http://www.opengl.org/documentation/
`void` | `glSecondaryColor3ubEXT(byte b, byte c, byte d)`
`void` | `glTexCoord2f(float u, float v)` OpenGL Method - @url http://www.opengl.org/documentation/
`void` | `glTexEnvi(int target, int mode, int value)` OpenGL Method - @url http://www.opengl.org/documentation/
`void` | `glTexImage2D(int target, int i, int dstPixelFormat, int width, int height, int j, int srcPixelFormat, int glUnsignedByte, java.nio.ByteBuffer textureBuffer)` OpenGL Method - @url http://www.opengl.org/documentation/
`void` | `glTexParameteri(int target, int param, int value)` OpenGL Method - @url http://www.opengl.org/documentation/
`void` | `glTexSubImage2D(int glTexture2d, int i, int pageX, int pageY, int width, int height, int glBgra, int glUnsignedByte, java.nio.ByteBuffer scratchByteBuffer)` OpenGL Method - @url http://www.opengl.org/documentation/
`void` | `glTranslatef(float x, float y, float z)` OpenGL Method - @url http://www.opengl.org/documentation/
`void` | `glVertex2f(float x, float y)` OpenGL Method - @url http://www.opengl.org/documentation/
`void` | `glVertex3f(float x, float y, float z)` OpenGL Method - @url http://www.opengl.org/documentation/
`void` | `initDisplay(int width, int height)` Initialise the display
`void` | `setGlobalAlphaScale(float alphaScale)` Set the scaling we'll apply to any colour binds in this renderer

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### alphaScale

    protected float alphaScale

  The global colour scale

Constructor Detail

### ImmediateModeOGLRenderer

    public ImmediateModeOGLRenderer()

Method Detail

### initDisplay

    public void initDisplay(int width,
                            int height)

  Description copied from interface: `SGL`
  Initialise the display

  Specified by:
    `initDisplay` in interface `SGL`
  Parameters:
    `width` - The width of the display
    `height` - The height of the display
  See Also:
    `SGL.initDisplay(int, int)`

### enterOrtho

    public void enterOrtho(int xsize,
                           int ysize)

  Description copied from interface: `SGL`
  Enter orthographic mode

  Specified by:
    `enterOrtho` in interface `SGL`
  Parameters:
    `xsize` - The size of the ortho display
    `ysize` - The size of the ortho display
  See Also:
    `SGL.enterOrtho(int, int)`

### glBegin

    public void glBegin(int geomType)

  Description copied from interface: `SGL`
  OpenGL Method - @url http://www.opengl.org/documentation/

  Specified by:
    `glBegin` in interface `SGL`
  See Also:
    `SGL.glBegin(int)`

### glBindTexture

    public void glBindTexture(int target,
                              int id)

  Description copied from interface: `SGL`
  OpenGL Method - @url http://www.opengl.org/documentation/

  Specified by:
    `glBindTexture` in interface `SGL`
  See Also:
    `SGL.glBindTexture(int, int)`

### glBlendFunc

    public void glBlendFunc(int src,
                            int dest)

  Description copied from interface: `SGL`
  OpenGL Method - @url http://www.opengl.org/documentation/

  Specified by:
    `glBlendFunc` in interface `SGL`
  See Also:
    `SGL.glBlendFunc(int, int)`

### glCallList

    public void glCallList(int id)

  Description copied from interface: `SGL`
  OpenGL Method - @url http://www.opengl.org/documentation/

  Specified by:
    `glCallList` in interface `SGL`
  See Also:
    `SGL.glCallList(int)`

### glClear

    public void glClear(int value)

  Description copied from interface: `SGL`
  OpenGL Method - @url http://www.opengl.org/documentation/

  Specified by:
    `glClear` in interface `SGL`
  See Also:
    `SGL.glClear(int)`

### glClearColor

    public void glClearColor(float red,
                             float green,
                             float blue,
                             float alpha)

  Description copied from interface: `SGL`
  OpenGL Method - @url http://www.opengl.org/documentation/

  Specified by:
    `glClearColor` in interface `SGL`
  See Also:
    `SGL.glClearColor(float, float, float, float)`

### glClipPlane

    public void glClipPlane(int plane,
                            java.nio.DoubleBuffer buffer)

  Description copied from interface: `SGL`
  OpenGL Method - @url http://www.opengl.org/documentation/

  Specified by:
    `glClipPlane` in interface `SGL`
  See Also:
    `SGL.glClipPlane(int, java.nio.DoubleBuffer)`

### glColor4f

    public void glColor4f(float r,
                          float g,
                          float b,
                          float a)

  Description copied from interface: `SGL`
  OpenGL Method - @url http://www.opengl.org/documentation/

  Specified by:
    `glColor4f` in interface `SGL`
  See Also:
    `SGL.glColor4f(float, float, float, float)`

### glColorMask

    public void glColorMask(boolean red,
                            boolean green,
                            boolean blue,
                            boolean alpha)

  Description copied from interface: `SGL`
  OpenGL Method - @url http://www.opengl.org/documentation/

  Specified by:
    `glColorMask` in interface `SGL`
  See Also:
    `SGL.glColorMask(boolean, boolean, boolean, boolean)`

### glCopyTexImage2D

    public void glCopyTexImage2D(int target,
                                 int level,
                                 int internalFormat,
                                 int x,
                                 int y,
                                 int width,
                                 int height,
                                 int border)

  Description copied from interface: `SGL`
  OpenGL Method - @url http://www.opengl.org/documentation/

  Specified by:
    `glCopyTexImage2D` in interface `SGL`
  See Also:
    `SGL.glCopyTexImage2D(int, int, int, int, int, int, int, int)`

### glDeleteTextures

    public void glDeleteTextures(java.nio.IntBuffer buffer)

  Description copied from interface: `SGL`
  OpenGL Method - @url http://www.opengl.org/documentation/

  Specified by:
    `glDeleteTextures` in interface `SGL`
  See Also:
    `SGL.glDeleteTextures(java.nio.IntBuffer)`

### glDisable

    public void glDisable(int item)

  Description copied from interface: `SGL`
  OpenGL Method - @url http://www.opengl.org/documentation/

  Specified by:
    `glDisable` in interface `SGL`
  See Also:
    `SGL.glDisable(int)`

### glEnable

    public void glEnable(int item)

  Description copied from interface: `SGL`
  OpenGL Method - @url http://www.opengl.org/documentation/

  Specified by:
    `glEnable` in interface `SGL`
  See Also:
    `SGL.glEnable(int)`

### glEnd

    public void glEnd()

  Description copied from interface: `SGL`
  OpenGL Method - @url http://www.opengl.org/documentation/

  Specified by:
    `glEnd` in interface `SGL`
  See Also:
    `SGL.glEnd()`

### glEndList

    public void glEndList()

  Description copied from interface: `SGL`
  OpenGL Method - @url http://www.opengl.org/documentation/

  Specified by:
    `glEndList` in interface `SGL`
  See Also:
    `SGL.glEndList()`

### glGenLists

    public int glGenLists(int count)

  Description copied from interface: `SGL`
  OpenGL Method - @url http://www.opengl.org/documentation/

  Specified by:
    `glGenLists` in interface `SGL`
  Returns:
    The index of the lists
  See Also:
    `SGL.glGenLists(int)`

### glGetFloat

    public void glGetFloat(int id,
                           java.nio.FloatBuffer ret)

  Description copied from interface: `SGL`
  OpenGL Method - @url http://www.opengl.org/documentation/

  Specified by:
    `glGetFloat` in interface `SGL`
  See Also:
    `SGL.glGetFloat(int, java.nio.FloatBuffer)`

### glGetInteger

    public void glGetInteger(int id,
                             java.nio.IntBuffer ret)

  Description copied from interface: `SGL`
  OpenGL Method - @url http://www.opengl.org/documentation/

  Specified by:
    `glGetInteger` in interface `SGL`
  See Also:
    `SGL.glGetInteger(int, java.nio.IntBuffer)`

### glGetTexImage

    public void glGetTexImage(int target,
                              int level,
                              int format,
                              int type,
                              java.nio.ByteBuffer pixels)

  Description copied from interface: `SGL`
  OpenGL Method - @url http://www.opengl.org/documentation/

  Specified by:
    `glGetTexImage` in interface `SGL`
  See Also:
    `SGL.glGetTexImage(int, int, int, int, java.nio.ByteBuffer)`

### glLineWidth

    public void glLineWidth(float width)

  Description copied from interface: `SGL`
  OpenGL Method - @url http://www.opengl.org/documentation/

  Specified by:
    `glLineWidth` in interface `SGL`
  See Also:
    `SGL.glLineWidth(float)`

### glLoadIdentity

    public void glLoadIdentity()

  Description copied from interface: `SGL`
  OpenGL Method - @url http://www.opengl.org/documentation/

  Specified by:
    `glLoadIdentity` in interface `SGL`
  See Also:
    `SGL.glLoadIdentity()`

### glNewList

    public void glNewList(int id,
                          int option)

  Description copied from interface: `SGL`
  OpenGL Method - @url http://www.opengl.org/documentation/

  Specified by:
    `glNewList` in interface `SGL`
  See Also:
    `SGL.glNewList(int, int)`

### glPointSize

    public void glPointSize(float size)

  Description copied from interface: `SGL`
  OpenGL Method - @url http://www.opengl.org/documentation/

  Specified by:
    `glPointSize` in interface `SGL`
  See Also:
    `SGL.glPointSize(float)`

### glPopMatrix

    public void glPopMatrix()

  Description copied from interface: `SGL`
  OpenGL Method - @url http://www.opengl.org/documentation/

  Specified by:
    `glPopMatrix` in interface `SGL`
  See Also:
    `SGL.glPopMatrix()`

### glPushMatrix

    public void glPushMatrix()

  Description copied from interface: `SGL`
  OpenGL Method - @url http://www.opengl.org/documentation/

  Specified by:
    `glPushMatrix` in interface `SGL`
  See Also:
    `SGL.glPushMatrix()`

### glReadPixels

    public void glReadPixels(int x,
                             int y,
                             int width,
                             int height,
                             int format,
                             int type,
                             java.nio.ByteBuffer pixels)

  Description copied from interface: `SGL`
  OpenGL Method - @url http://www.opengl.org/documentation/

  Specified by:
    `glReadPixels` in interface `SGL`
  See Also:
    `SGL.glReadPixels(int, int, int, int, int, int, java.nio.ByteBuffer)`

### glRotatef

    public void glRotatef(float angle,
                          float x,
                          float y,
                          float z)

  Description copied from interface: `SGL`
  OpenGL Method - @url http://www.opengl.org/documentation/

  Specified by:
    `glRotatef` in interface `SGL`
  See Also:
    `SGL.glRotatef(float, float, float, float)`

### glScalef

    public void glScalef(float x,
                         float y,
                         float z)

  Description copied from interface: `SGL`
  OpenGL Method - @url http://www.opengl.org/documentation/

  Specified by:
    `glScalef` in interface `SGL`
  See Also:
    `SGL.glScalef(float, float, float)`

### glScissor

    public void glScissor(int x,
                          int y,
                          int width,
                          int height)

  Description copied from interface: `SGL`
  OpenGL Method - @url http://www.opengl.org/documentation/

  Specified by:
    `glScissor` in interface `SGL`
  See Also:
    `SGL.glScissor(int, int, int, int)`

### glTexCoord2f

    public void glTexCoord2f(float u,
                             float v)

  Description copied from interface: `SGL`
  OpenGL Method - @url http://www.opengl.org/documentation/

  Specified by:
    `glTexCoord2f` in interface `SGL`
  See Also:
    `SGL.glTexCoord2f(float, float)`

### glTexEnvi

    public void glTexEnvi(int target,
                          int mode,
                          int value)

  Description copied from interface: `SGL`
  OpenGL Method - @url http://www.opengl.org/documentation/

  Specified by:
    `glTexEnvi` in interface `SGL`
  See Also:
    `SGL.glTexEnvi(int, int, int)`

### glTranslatef

    public void glTranslatef(float x,
                             float y,
                             float z)

  Description copied from interface: `SGL`
  OpenGL Method - @url http://www.opengl.org/documentation/

  Specified by:
    `glTranslatef` in interface `SGL`
  See Also:
    `SGL.glTranslatef(float, float, float)`

### glVertex2f

    public void glVertex2f(float x,
                           float y)

  Description copied from interface: `SGL`
  OpenGL Method - @url http://www.opengl.org/documentation/

  Specified by:
    `glVertex2f` in interface `SGL`
  See Also:
    `SGL.glVertex2f(float, float)`

### glVertex3f

    public void glVertex3f(float x,
                           float y,
                           float z)

  Description copied from interface: `SGL`
  OpenGL Method - @url http://www.opengl.org/documentation/

  Specified by:
    `glVertex3f` in interface `SGL`
  See Also:
    `SGL.glVertex3f(float, float, float)`

### flush

    public void flush()

  Description copied from interface: `SGL`
  Flush the current state of the renderer down to GL

  Specified by:
    `flush` in interface `SGL`
  See Also:
    `SGL.flush()`

### glTexParameteri

    public void glTexParameteri(int target,
                                int param,
                                int value)

  Description copied from interface: `SGL`
  OpenGL Method - @url http://www.opengl.org/documentation/

  Specified by:
    `glTexParameteri` in interface `SGL`
  See Also:
    `SGL.glTexParameteri(int, int, int)`

### getCurrentColor

    public float[] getCurrentColor()

  Description copied from interface: `SGL`
  Get the current colour being rendered

  Specified by:
    `getCurrentColor` in interface `SGL`
  Returns:
    The current colour being rendered
  See Also:
    `SGL.getCurrentColor()`

### glDeleteLists

    public void glDeleteLists(int list,
                              int count)

  Description copied from interface: `SGL`
  OpenGL Method - @url http://www.opengl.org/documentation/

  Specified by:
    `glDeleteLists` in interface `SGL`
  See Also:
    `SGL.glDeleteLists(int, int)`

### glClearDepth

    public void glClearDepth(float value)

  Description copied from interface: `SGL`
  OpenGL Method - @url http://www.opengl.org/documentation/

  Specified by:
    `glClearDepth` in interface `SGL`
  See Also:
    `SGL.glClearDepth(float)`

### glDepthFunc

    public void glDepthFunc(int func)

  Description copied from interface: `SGL`
  OpenGL Method - @url http://www.opengl.org/documentation/

  Specified by:
    `glDepthFunc` in interface `SGL`
  See Also:
    `SGL.glDepthFunc(int)`

### glDepthMask

    public void glDepthMask(boolean mask)

  Description copied from interface: `SGL`
  OpenGL Method - @url http://www.opengl.org/documentation/

  Specified by:
    `glDepthMask` in interface `SGL`
  See Also:
    `SGL.glDepthMask(boolean)`

### setGlobalAlphaScale

    public void setGlobalAlphaScale(float alphaScale)

  Description copied from interface: `SGL`
  Set the scaling we'll apply to any colour binds in this renderer

  Specified by:
    `setGlobalAlphaScale` in interface `SGL`
  Parameters:
    `alphaScale` - The scale to apply to any colour binds
  See Also:
    `SGL.setGlobalAlphaScale(float)`

### glLoadMatrix

    public void glLoadMatrix(java.nio.FloatBuffer buffer)

  Description copied from interface: `SGL`
  OpenGL Method - @url http://www.opengl.org/documentation/

  Specified by:
    `glLoadMatrix` in interface `SGL`
  See Also:
    `SGL.glLoadMatrix(java.nio.FloatBuffer)`

### glGenTextures

    public void glGenTextures(java.nio.IntBuffer ids)

  Description copied from interface: `SGL`
  OpenGL Method - @url http://www.opengl.org/documentation/

  Specified by:
    `glGenTextures` in interface `SGL`

### glGetError

    public void glGetError()

  Description copied from interface: `SGL`
  OpenGL Method - @url http://www.opengl.org/documentation/

  Specified by:
    `glGetError` in interface `SGL`

### glTexImage2D

    public void glTexImage2D(int target,
                             int i,
                             int dstPixelFormat,
                             int width,
                             int height,
                             int j,
                             int srcPixelFormat,
                             int glUnsignedByte,
                             java.nio.ByteBuffer textureBuffer)

  Description copied from interface: `SGL`
  OpenGL Method - @url http://www.opengl.org/documentation/

  Specified by:
    `glTexImage2D` in interface `SGL`

### glTexSubImage2D

    public void glTexSubImage2D(int glTexture2d,
                                int i,
                                int pageX,
                                int pageY,
                                int width,
                                int height,
                                int glBgra,
                                int glUnsignedByte,
                                java.nio.ByteBuffer scratchByteBuffer)

  Description copied from interface: `SGL`
  OpenGL Method - @url http://www.opengl.org/documentation/

  Specified by:
    `glTexSubImage2D` in interface `SGL`

### canTextureMirrorClamp

    public boolean canTextureMirrorClamp()

  Description copied from interface: `SGL`
  Check if the mirror clamp extension is available

  Specified by:
    `canTextureMirrorClamp` in interface `SGL`
  Returns:
    True if the mirro clamp extension is available

### canSecondaryColor

    public boolean canSecondaryColor()

  Specified by:
    `canSecondaryColor` in interface `SGL`

### glSecondaryColor3ubEXT

    public void glSecondaryColor3ubEXT(byte b,
                                       byte c,
                                       byte d)

  Specified by:
    `glSecondaryColor3ubEXT` in interface `SGL`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006 New Dawn Software. All Rights Reserved.