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

public Class PbufferTest

extends Object
Class Inheritance
Imports
java.nio.ByteBuffer, .ByteOrder, .IntBuffer, org.lwjgl.LWJGLException, org.lwjgl.input.Keyboard, org.lwjgl.opengl.Display, .DisplayMode, .Pbuffer, .PixelFormat, org.lwjgl.util.vector.Vector2f

Tests Pbuffers
Author
elias_naur
Version
$Revision$ $Id$

Field Summary

Modifier and TypeField and Description
private float
angle

angle of quad

private float
angleRotation

degrees to rotate per frame

private static final float
MAX_SPEED

Max speed of all changable attributes

private DisplayMode
mode

Intended deiplay mode

private static Pbuffer
pbuffer

Pbuffer instance

private Vector2f
quadPosition

our quad moving around

private Vector2f
quadVelocity

our quadVelocity

private static int
tex_handle

The shared texture

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private void
cleanup()

Cleans up the test

private void
public void
execute()

Executes the test

private DisplayMode
findDisplayMode(int
Required width
width
,
int
Required height
height
,
int
Minimum required bits per pixel
bpp
)

Retrieves a displaymode, if one such is available

private void
glInit()

Initializes OGL

private void
initGLState(int width, int height, float color)

private void
initialize()

Initializes the test

private void
private void
logic()

Performs the logic

public static void
main(String[] args)

Test entry point

private void
mainLoop()

Runs the main loop of the "test"

private void
processKeyboard()

Processes keyboard input

private void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

angleback to summary
private float angle

angle of quad

angleRotationback to summary
private float angleRotation

degrees to rotate per frame

MAX_SPEEDback to summary
private static final float MAX_SPEED

Max speed of all changable attributes

modeback to summary
private DisplayMode mode

Intended deiplay mode

pbufferback to summary
private static Pbuffer pbuffer

Pbuffer instance

quadPositionback to summary
private Vector2f quadPosition

our quad moving around

quadVelocityback to summary
private Vector2f quadVelocity

our quadVelocity

tex_handleback to summary
private static int tex_handle

The shared texture

Constructor Detail

PbufferTestback to summary
public PbufferTest()

Method Detail

cleanupback to summary
private void cleanup()

Cleans up the test

destroyTextureback to summary
private void destroyTexture()
executeback to summary
public void execute()

Executes the test

findDisplayModeback to summary
private DisplayMode findDisplayMode(int width, int height, int bpp) throws LWJGLException

Retrieves a displaymode, if one such is available

Parameters
width:int

Required width

height:int

Required height

bpp:int

Minimum required bits per pixel

glInitback to summary
private void glInit()

Initializes OGL

initGLStateback to summary
private void initGLState(int width, int height, float color)
initializeback to summary
private void initialize()

Initializes the test

initPbufferback to summary
private void initPbuffer()
logicback to summary
private void logic()

Performs the logic

mainback to summary
public static void main(String[] args)

Test entry point

mainLoopback to summary
private void mainLoop()

Runs the main loop of the "test"

processKeyboardback to summary
private void processKeyboard()

Processes keyboard input

renderback to summary
private void render()