Top Methods
org.lwjgl.opengl

pack-priv Interface DisplayImplementation

extends InputImplementation
Known Direct Implementers
org.lwjgl.opengl.LinuxDisplay, org.lwjgl.opengl.MacOSXDisplay, org.lwjgl.opengl.WindowsDisplay
Imports
java.nio.ByteBuffer, .FloatBuffer, .IntBuffer, java.awt.Canvas, org.lwjgl.LWJGLException

Method Summary

Modifier and TypeMethod and Description
public void
bindTexImageToPbuffer(PeerInfo handle, int buffer)

public PeerInfo
createPbuffer(int width, int height, PixelFormat pixel_format, ContextAttribs attribs, IntBuffer pixelFormatCaps, IntBuffer pBufferAttribs)

Method to create a Pbuffer

public PeerInfo
createPeerInfo(PixelFormat pixel_format, ContextAttribs attribs)

Create the native PeerInfo.

public void
createWindow(DrawableLWJGL drawable, DisplayMode mode, Canvas parent, int x, int y)

public void
public String

Returns:

a String
getAdapter
()

Get the driver adapter string.

public DisplayMode[]
getAvailableDisplayModes()

Method for getting displaymodes

public int

Returns:

the length of each gamma ramp array, or 0 if gamma settings are unsupported.
getGammaRampLength
()

Return the length of the gamma ramp arrays.

public int

Returns:

this method will return the height of the Display window.
getHeight
()

Redeclares org.lwjgl.opengl.InputImplementation.getHeight.

public int
public float

Returns:

this method will return the pixel scale factor of the Display window useful for high resolution modes.
getPixelScaleFactor
()

public String

Returns:

a String
getVersion
()

Get the driver version.

public int

Returns:

this method will return the width of the Display window.
getWidth
()

Redeclares org.lwjgl.opengl.InputImplementation.getWidth.

public int

Returns:

this method will return the top-left x position of the Display window.
getX
()

public int

Returns:

this method will return the top-left y position of the Display window.
getY
()

public DisplayMode
init()

Initialize and return the current display mode.

public boolean
public boolean
isBufferLost(PeerInfo handle)

Method to test for buffer integrity

public boolean
public boolean
public boolean
public void
public void
resetDisplayMode()

Reset the display mode to whatever it was when LWJGL was initialized.

public void
reshape(int x, int y, int width, int height)

public void
setGammaRamp(FloatBuffer gammaRamp)

Method to set the gamma ramp.

public int

Returns:

number of icons used.
setIcon
(ByteBuffer[]
Array of icons in RGBA mode
icons
)

Sets one or more icons for the Display.

public void
setPbufferAttrib(PeerInfo handle, int attrib, int value)

public void
setResizable(boolean
set to true to make the Display window resizable; false to disable resizing on the Display window.
resizable
)

Enable or disable the Display window to be resized.

public void
setTitle(String title)

Implementation of setTitle().

public void
public void
update()

Updates the windows internal state.

public boolean

Returns:

true if the Display window has been resized since this method was last called.
wasResized
()

Inherited from org.lwjgl.opengl.InputImplementation:
createCursorcreateKeyboardcreateMousedestroyCursordestroyKeyboarddestroyMousegetButtonCountgetMaxCursorSizegetMinCursorSizegetNativeCursorCapabilitiesgrabMousehasWheelisInsideWindowpollKeyboardpollMousereadKeyboardreadMousesetCursorPositionsetNativeCursor

Method Detail

bindTexImageToPbufferback to summary
public void bindTexImageToPbuffer(PeerInfo handle, int buffer)
createPbufferback to summary
public PeerInfo createPbuffer(int width, int height, PixelFormat pixel_format, ContextAttribs attribs, IntBuffer pixelFormatCaps, IntBuffer pBufferAttribs) throws LWJGLException

Method to create a Pbuffer

createPeerInfoback to summary
public PeerInfo createPeerInfo(PixelFormat pixel_format, ContextAttribs attribs) throws LWJGLException

Create the native PeerInfo.

createWindowback to summary
public void createWindow(DrawableLWJGL drawable, DisplayMode mode, Canvas parent, int x, int y) throws LWJGLException
destroyWindowback to summary
public void destroyWindow()
getAdapterback to summary
public String getAdapter()

Get the driver adapter string. This is a unique string describing the actual card's hardware, eg. "Geforce2", "PS2", "Radeon9700". If the adapter cannot be determined, this function returns null.

Returns:String

a String

getAvailableDisplayModesback to summary
public DisplayMode[] getAvailableDisplayModes() throws LWJGLException

Method for getting displaymodes

getGammaRampLengthback to summary
public int getGammaRampLength()

Return the length of the gamma ramp arrays. Returns 0 if gamma settings are unsupported.

Returns:int

the length of each gamma ramp array, or 0 if gamma settings are unsupported.

getHeightback to summary
public int getHeight()

Redeclares org.lwjgl.opengl.InputImplementation.getHeight.

Returns:int

this method will return the height of the Display window.

getPbufferCapabilitiesback to summary
public int getPbufferCapabilities()
getPixelScaleFactorback to summary
public float getPixelScaleFactor()
Returns:float

this method will return the pixel scale factor of the Display window useful for high resolution modes.

getVersionback to summary
public String getVersion()

Get the driver version. This is a vendor/adapter specific version string. If the version cannot be determined, this function returns null.

Returns:String

a String

getWidthback to summary
public int getWidth()

Redeclares org.lwjgl.opengl.InputImplementation.getWidth.

Returns:int

this method will return the width of the Display window.

getXback to summary
public int getX()
Returns:int

this method will return the top-left x position of the Display window.

getYback to summary
public int getY()
Returns:int

this method will return the top-left y position of the Display window.

initback to summary
public DisplayMode init() throws LWJGLException

Initialize and return the current display mode.

isActiveback to summary
public boolean isActive()
isBufferLostback to summary
public boolean isBufferLost(PeerInfo handle)

Method to test for buffer integrity

isCloseRequestedback to summary
public boolean isCloseRequested()
isDirtyback to summary
public boolean isDirty()
isVisibleback to summary
public boolean isVisible()
releaseTexImageFromPbufferback to summary
public void releaseTexImageFromPbuffer(PeerInfo handle, int buffer)
resetDisplayModeback to summary
public void resetDisplayMode()

Reset the display mode to whatever it was when LWJGL was initialized. Fails silently.

reshapeback to summary
public void reshape(int x, int y, int width, int height)
setGammaRampback to summary
public void setGammaRamp(FloatBuffer gammaRamp) throws LWJGLException

Method to set the gamma ramp.

setIconback to summary
public int setIcon(ByteBuffer[] icons)

Sets one or more icons for the Display.

  • On Windows you should supply at least one 16x16 icon and one 32x32.
  • Linux (and similar platforms) expect one 32x32 icon.
  • Mac OS X should be supplied one 128x128 icon
The implementation will use the supplied ByteBuffers with image data in RGBA and perform any conversions nescesarry for the specific platform.
Parameters
icons:ByteBuffer[]

Array of icons in RGBA mode

Returns:int

number of icons used.

setPbufferAttribback to summary
public void setPbufferAttrib(PeerInfo handle, int attrib, int value)
setResizableback to summary
public void setResizable(boolean resizable)

Enable or disable the Display window to be resized.

Parameters
resizable:boolean

set to true to make the Display window resizable; false to disable resizing on the Display window.

setTitleback to summary
public void setTitle(String title)

Implementation of setTitle(). This will read the window's title member and stash it in the native title of the window.

switchDisplayModeback to summary
public void switchDisplayMode(DisplayMode mode) throws LWJGLException
updateback to summary
public void update()

Updates the windows internal state. This must be called at least once per video frame to handle window close requests, moves, paints, etc.

wasResizedback to summary
public boolean wasResized()
Returns:boolean

true if the Display window has been resized since this method was last called.