Top Description Fields Constructors Methods
org.lwjgl.test.opengl

public Class SwingFocusTest

extends Object
Class Inheritance
Static Imports
org.lwjgl.opengl.GL11.GL_COLOR_BUFFER_BIT, .GL11.glClear, .GL11.glClearColor

Author
Brian Matzon

Field Summary

Modifier and TypeField and Description
pack-priv Canvas
display_parent

The Canvas where the LWJGL Display is added

private JFrame
pack-priv Thread
gameThread

Thread which runs the main game loop

private final JPanel
private final JPanel
pack-priv boolean
running

is the game loop running

private final JTextPane

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private void
protected void
protected void
private void
public static void
main(String[] args)

public void
startLWJGL()

Once the Canvas is created its add notify method will call this method to start the LWJGL Display and game loop in another thread.

private void
stopLWJGL()

Tell game loop to stop running, after which the LWJGL Display will be destoryed.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

display_parentback to summary
pack-priv Canvas display_parent

The Canvas where the LWJGL Display is added

frameback to summary
private JFrame frame
gameThreadback to summary
pack-priv Thread gameThread

Thread which runs the main game loop

panel1back to summary
private final JPanel panel1
panel2back to summary
private final JPanel panel2
runningback to summary
pack-priv boolean running

is the game loop running

textPaneback to summary
private final JTextPane textPane

Constructor Detail

SwingFocusTestback to summary
public SwingFocusTest()

Method Detail

executeback to summary
private void execute()
gameLoopback to summary
protected void gameLoop()
initGLback to summary
protected void initGL()
initializeback to summary
private void initialize()
mainback to summary
public static void main(String[] args)
startLWJGLback to summary
public void startLWJGL()

Once the Canvas is created its add notify method will call this method to start the LWJGL Display and game loop in another thread.

stopLWJGLback to summary
private void stopLWJGL()

Tell game loop to stop running, after which the LWJGL Display will be destoryed. The main thread will wait for the Display.destroy() to complete