graphics
Class GLDisplay
java.lang.Object
graphics.GLDisplay
public class GLDisplay
- extends Object
Retranscription in java of the NeonHelium tutorialset.
Thourogh documentation is found at http://nehe.gamedev.net/
- Author:
- Pepijn Van Eeckhoudt, Neon Helium
Constructor Summary |
private |
GLDisplay(String title,
int width,
int height,
boolean fullscreen)
|
Method Summary |
void |
addGLEventListener(javax.media.opengl.GLEventListener glEventListener)
|
void |
addKeyListener(KeyListener l)
|
void |
addMouseListener(MouseListener l)
|
void |
addMouseMotionListener(MouseMotionListener l)
|
static GLDisplay |
createGLDisplay(String title,
boolean fullscreen,
Dimension dim)
|
private DisplayMode |
findDisplayMode(DisplayMode[] displayModes,
int requestedWidth,
int requestedHeight,
int requestedDepth,
int requestedRefreshRate)
|
private DisplayMode |
findDisplayModeInternal(DisplayMode[] displayModes,
int requestedWidth,
int requestedHeight,
int requestedDepth,
int requestedRefreshRate)
|
String |
getTitle()
|
void |
registerKeyStrokeForHelp(KeyStroke keyStroke,
String description)
|
void |
registerMouseEventForHelp(int id,
int modifiers,
String description)
|
void |
removeGLEventListener(javax.media.opengl.GLEventListener glEventListener)
|
void |
removeKeyListener(KeyListener l)
|
void |
removeMouseListener(MouseListener l)
|
void |
removeMouseMotionListener(MouseMotionListener l)
|
void |
setNetwork(ClientNetworkThread networkConnection)
|
void |
setTitle(String title)
|
void |
start()
|
void |
stop()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DONT_CARE
private static final int DONT_CARE
- See Also:
- Constant Field Values
frame
private JFrame frame
glCanvas
private javax.media.opengl.GLCanvas glCanvas
animator
private com.sun.opengl.util.FPSAnimator animator
fullscreen
private boolean fullscreen
width
private int width
height
private int height
usedDevice
private GraphicsDevice usedDevice
helpOverlayGLEventListener
private GLDisplay.MyHelpOverlayGLEventListener helpOverlayGLEventListener
exceptionHandler
private GLDisplay.MyExceptionHandler exceptionHandler
net
private ClientNetworkThread net
GLDisplay
private GLDisplay(String title,
int width,
int height,
boolean fullscreen)
createGLDisplay
public static GLDisplay createGLDisplay(String title,
boolean fullscreen,
Dimension dim)
start
public void start()
stop
public void stop()
findDisplayMode
private DisplayMode findDisplayMode(DisplayMode[] displayModes,
int requestedWidth,
int requestedHeight,
int requestedDepth,
int requestedRefreshRate)
findDisplayModeInternal
private DisplayMode findDisplayModeInternal(DisplayMode[] displayModes,
int requestedWidth,
int requestedHeight,
int requestedDepth,
int requestedRefreshRate)
addGLEventListener
public void addGLEventListener(javax.media.opengl.GLEventListener glEventListener)
removeGLEventListener
public void removeGLEventListener(javax.media.opengl.GLEventListener glEventListener)
addKeyListener
public void addKeyListener(KeyListener l)
addMouseListener
public void addMouseListener(MouseListener l)
addMouseMotionListener
public void addMouseMotionListener(MouseMotionListener l)
removeKeyListener
public void removeKeyListener(KeyListener l)
removeMouseListener
public void removeMouseListener(MouseListener l)
removeMouseMotionListener
public void removeMouseMotionListener(MouseMotionListener l)
registerKeyStrokeForHelp
public void registerKeyStrokeForHelp(KeyStroke keyStroke,
String description)
registerMouseEventForHelp
public void registerMouseEventForHelp(int id,
int modifiers,
String description)
getTitle
public String getTitle()
setTitle
public void setTitle(String title)
setNetwork
public void setNetwork(ClientNetworkThread networkConnection)