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

public Class FullScreenWindowedTest

extends Object
Class Inheritance
Imports
org.lwjgl.BufferUtils, .LWJGLException, org.lwjgl.input.Keyboard, org.lwjgl.opengl.Display, .DisplayMode, org.lwjgl.opengles.PixelFormat, .PowerManagementEventException, org.lwjgl.util.vector.Vector2f, java.nio.FloatBuffer, .IntBuffer

Tests switching between windowed and fullscreen
Author
Brian Matzon
Version
$Revision: 3172 $ $Id: FullScreenWindowedTest.java 3172 2008-12-28 19:30:43Z elias_naur $

Field Summary

Modifier and TypeField and Description
private float
angle

angle of quad

private float
angleRotation

degrees to rotate per frame

private static int
private static int
private static final float
MAX_SPEED

Max speed of all changable attributes

private DisplayMode
mode

Intended deiplay mode

private Vector2f
quadPosition

our quad moving around

private Vector2f
quadVelocity

our quadVelocity

private QuadRenderer

Constructor Summary

AccessConstructor and Description
public
FullScreenWindowedTest()

Creates a FullScreenWindowedTest

Method Summary

Modifier and TypeMethod and Description
private void
cleanup()

Cleans up the test

public void
execute()

Executes the test

private static 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
initialize()

Initializes the test

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
private void
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

buffer_idback to summary
private static int buffer_id
indices_buffer_idback to summary
private static int indices_buffer_id
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

quadPositionback to summary
private Vector2f quadPosition

our quad moving around

quadVelocityback to summary
private Vector2f quadVelocity

our quadVelocity

rendererback to summary
private QuadRenderer renderer

Constructor Detail

FullScreenWindowedTestback to summary
public FullScreenWindowedTest()

Creates a FullScreenWindowedTest

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 static 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

initializeback to summary
private void initialize()

Initializes the test

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

reinitback to summary
private void reinit() throws LWJGLException
renderback to summary
private void render()
switchModeback to summary
private void switchMode() throws LWJGLException