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

public final Class BackgroundLoadTest

extends Object
Class Inheritance
Imports
org.lwjgl.BufferUtils, .LWJGLException, org.lwjgl.input.Keyboard, .Mouse, org.lwjgl.opengl.*, org.lwjgl.util.glu.Sphere, java.nio.FloatBuffer

A test of loading textures in a background thread. This can be achieved in 2 ways:
a) A dummy Pbuffer is created and its context shares the rendering context.
b) A SharedDrawable is used.

When the test starts, there's no texture created and rendering is done with texturing disabled. 2 seconds later a "dummy" texture is created in the background thread and texturing is enabled. This dummy texture can by anything the developer wants to have as a placeholder while textures are being loaded. Finally, 5 seconds later the "true" texture is loaded and displayed. This texture will change every 5 seconds after that, until the test is terminated (ESC key).
Author
Spasi

Field Summary

Modifier and TypeField and Description
private static BackgroundLoader
private static boolean
private static Sphere

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
private static void
private static DisplayMode
chooseMode(DisplayMode[] modes, int width, int height)

private static void
private static void
private static void
pack-priv static void
kill(String reason)

pack-priv static void
kill(String reason, Throwable t)

public static void
main(String[] args)

pack-priv static void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

backgroundLoaderback to summary
private static BackgroundLoader backgroundLoader
runback to summary
private static boolean run
sphereback to summary
private static Sphere sphere

Constructor Detail

BackgroundLoadTestback to summary
private BackgroundLoadTest()

Method Detail

argsErrorback to summary
private static void argsError()
chooseModeback to summary
private static DisplayMode chooseMode(DisplayMode[] modes, int width, int height)
cleanupback to summary
private static void cleanup()
handleIOback to summary
private static void handleIO()
initializeback to summary
private static void initialize(String[] args)
killback to summary
pack-priv static void kill(String reason)
killback to summary
pack-priv static void kill(String reason, Throwable t)
mainback to summary
public static void main(String[] args)
renderObjectback to summary
pack-priv static void renderObject()