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

public final Class PbufferTest

extends Object
Class Inheritance
Imports
java.nio.IntBuffer, org.lwjgl.BufferUtils, .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 final int
QUAD_SIZE

Size of the animated quad

private Vector2f
quadPosition

our quad moving around

private Vector2f
quadVelocity

our quadVelocity

private static int
texID

The shared texture

private TextureRenderer
texRenderer

The renderer to use when rendering to texture.

private float
texScaleX

For positioning our quad in the texture

private float
texScaleY

For positioning our quad in the texture

private static final int
TEXTURE_SIZE

Texture and pbuffer size

Constructor Summary

AccessConstructor and Description
public
PbufferTest(final int renderMode)

Method Summary

Modifier and TypeMethod and Description
private void
cleanup()

Cleans up the test

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

pack-priv static void
initGLState(int width, int height, float color)

private static void
kill(final String msg)

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

QUAD_SIZEback to summary
private static final int QUAD_SIZE

Size of the animated quad

quadPositionback to summary
private Vector2f quadPosition

our quad moving around

quadVelocityback to summary
private Vector2f quadVelocity

our quadVelocity

texIDback to summary
private static int texID

The shared texture

texRendererback to summary
private TextureRenderer texRenderer

The renderer to use when rendering to texture.

texScaleXback to summary
private float texScaleX

For positioning our quad in the texture

texScaleYback to summary
private float texScaleY

For positioning our quad in the texture

TEXTURE_SIZEback to summary
private static final int TEXTURE_SIZE

Texture and pbuffer size

Constructor Detail

PbufferTestback to summary
public PbufferTest(final int renderMode)

Method Detail

cleanupback to summary
private void cleanup()

Cleans up the test

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
pack-priv static void initGLState(int width, int height, float color)
killback to summary
private static void kill(final String msg)
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()