org.newdawn.slick.opengl.renderer
Class DefaultLineStripRenderer

java.lang.Object
  extended by org.newdawn.slick.opengl.renderer.DefaultLineStripRenderer
All Implemented Interfaces:
LineStripRenderer

public class DefaultLineStripRenderer
extends java.lang.Object
implements LineStripRenderer

The default version of the renderer relies of GL calls to do everything. Unfortunately this is driver dependent and often implemented inconsistantly

Author:
kevin

Constructor Summary
DefaultLineStripRenderer()
           
 
Method Summary
 boolean applyGLLineFixes()
          Check if we should apply default line fixes
 void color(float r, float g, float b, float a)
          Apply a colour to the next vertex
 void end()
          End the line strips
 void setAntiAlias(boolean antialias)
          Indicate whether antialiasing should be applied
 void setLineCaps(boolean caps)
          Indicate if we should render end caps
 void setWidth(float width)
          Set the width of the lines to be drawn
 void start()
          Start the line strips
 void vertex(float x, float y)
          Add a vertex
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultLineStripRenderer

public DefaultLineStripRenderer()
Method Detail

end

public void end()
Description copied from interface: LineStripRenderer
End the line strips

Specified by:
end in interface LineStripRenderer
See Also:
LineStripRenderer.end()

setAntiAlias

public void setAntiAlias(boolean antialias)
Description copied from interface: LineStripRenderer
Indicate whether antialiasing should be applied

Specified by:
setAntiAlias in interface LineStripRenderer
Parameters:
antialias - True if antialiasing should be applied
See Also:
LineStripRenderer.setAntiAlias(boolean)

setWidth

public void setWidth(float width)
Description copied from interface: LineStripRenderer
Set the width of the lines to be drawn

Specified by:
setWidth in interface LineStripRenderer
Parameters:
width - The width of the lines to be drawn
See Also:
LineStripRenderer.setWidth(float)

start

public void start()
Description copied from interface: LineStripRenderer
Start the line strips

Specified by:
start in interface LineStripRenderer
See Also:
LineStripRenderer.start()

vertex

public void vertex(float x,
                   float y)
Description copied from interface: LineStripRenderer
Add a vertex

Specified by:
vertex in interface LineStripRenderer
Parameters:
x - The x coordinate of the vertex
y - The y coordinate of the vertex
See Also:
LineStripRenderer.vertex(float, float)

color

public void color(float r,
                  float g,
                  float b,
                  float a)
Description copied from interface: LineStripRenderer
Apply a colour to the next vertex

Specified by:
color in interface LineStripRenderer
Parameters:
r - The red component of the colour
g - The green component of the colour
b - The blue component of the colour
a - The alpha component of the colour
See Also:
LineStripRenderer.color(float, float, float, float)

setLineCaps

public void setLineCaps(boolean caps)
Description copied from interface: LineStripRenderer
Indicate if we should render end caps

Specified by:
setLineCaps in interface LineStripRenderer
Parameters:
caps - True if we should render end caps
See Also:
LineStripRenderer.setLineCaps(boolean)

applyGLLineFixes

public boolean applyGLLineFixes()
Description copied from interface: LineStripRenderer
Check if we should apply default line fixes

Specified by:
applyGLLineFixes in interface LineStripRenderer
Returns:
True if we should apply GL fixes
See Also:
LineStripRenderer.applyGLLineFixes()


Copyright © 2006 New Dawn Software. All Rights Reserved.