GL20Context

An OpenGL 2.0 implementation of {@link org.spout.renderer.api.gl.Context}.

@see org.spout.renderer.api.gl.Context

Members

Functions

clearCurrentBuffer
void clearCurrentBuffer()
Undocumented in source. Be warned that the author may not have intended to support it.
create
void create()
Undocumented in source. Be warned that the author may not have intended to support it.
destroy
void destroy()
Undocumented in source. Be warned that the author may not have intended to support it.
disableCapability
void disableCapability(Capability capability)
Undocumented in source. Be warned that the author may not have intended to support it.
enableCapability
void enableCapability(Capability capability)
Undocumented in source. Be warned that the author may not have intended to support it.
enableVsync
void enableVsync(bool useVsync)
Undocumented in source. Be warned that the author may not have intended to support it.
getActualWindowSize
void getActualWindowSize(int* width, int* height)
Undocumented in source. Be warned that the author may not have intended to support it.
getGLVersion
gbaid.render.gl.GLVersion getGLVersion()
Undocumented in source. Be warned that the author may not have intended to support it.
getWindowHeight
uint getWindowHeight()
Undocumented in source. Be warned that the author may not have intended to support it.
getWindowSize
void getWindowSize(int* width, int* height)
Undocumented in source. Be warned that the author may not have intended to support it.
getWindowTitle
string getWindowTitle()
Undocumented in source. Be warned that the author may not have intended to support it.
getWindowWidth
uint getWindowWidth()
Undocumented in source. Be warned that the author may not have intended to support it.
isWindowCloseRequested
bool isWindowCloseRequested()
Undocumented in source. Be warned that the author may not have intended to support it.
newFrameBuffer
FrameBuffer newFrameBuffer()
Undocumented in source. Be warned that the author may not have intended to support it.
newProgram
Program newProgram()
Undocumented in source. Be warned that the author may not have intended to support it.
newRenderBuffer
RenderBuffer newRenderBuffer()
Undocumented in source. Be warned that the author may not have intended to support it.
newShader
Shader newShader()
Undocumented in source. Be warned that the author may not have intended to support it.
newTexture
Texture newTexture()
Undocumented in source. Be warned that the author may not have intended to support it.
newVertexArray
VertexArray newVertexArray()
Undocumented in source. Be warned that the author may not have intended to support it.
readFrame
ubyte[] readFrame(uint x, uint y, uint width, uint height, InternalFormat format)
Undocumented in source. Be warned that the author may not have intended to support it.
setBlendingFunctions
void setBlendingFunctions(int bufferIndex, BlendFunction source, BlendFunction destination)
Undocumented in source. Be warned that the author may not have intended to support it.
setClearColor
void setClearColor(float red, float green, float blue, float alpha)
Undocumented in source. Be warned that the author may not have intended to support it.
setContextAttributes
void setContextAttributes()

Created new context attributes for the version.

setDepthMask
void setDepthMask(bool enabled)
Undocumented in source. Be warned that the author may not have intended to support it.
setFullScreen
void setFullScreen(bool fullScreen)
Undocumented in source. Be warned that the author may not have intended to support it.
setResizable
void setResizable(bool resizable)
Undocumented in source. Be warned that the author may not have intended to support it.
setViewPort
void setViewPort(uint x, uint y, uint width, uint height)
Undocumented in source. Be warned that the author may not have intended to support it.
setWindowSize
void setWindowSize(uint width, uint height)
Undocumented in source. Be warned that the author may not have intended to support it.
setWindowTitle
void setWindowTitle(string title)
Undocumented in source. Be warned that the author may not have intended to support it.
updateDisplay
void updateDisplay()
Undocumented in source. Be warned that the author may not have intended to support it.

Inherited Members

From Context

destroy
void destroy()
Undocumented in source. Be warned that the author may not have intended to support it.
newFrameBuffer
FrameBuffer newFrameBuffer()

Creates a new frame buffer.

newProgram
Program newProgram()

Creates a new program.

newRenderBuffer
RenderBuffer newRenderBuffer()

Creates a new render buffer.

newShader
Shader newShader()

Creates a new shader.

newTexture
Texture newTexture()

Creates a new texture.

newVertexArray
VertexArray newVertexArray()

Creates a new vertex array.

getWindowTitle
string getWindowTitle()

Returns the window title.

setWindowTitle
void setWindowTitle(string title)

Sets the window title to the desired one.

setWindowSize
void setWindowSize(uint width, uint height)

Sets the window size. Will be limited to the desktop size.

setResizable
void setResizable(bool resizable)

Sets the user resizability of this window. This doesn't do anything if the window is in full screen mode.

setFullScreen
void setFullScreen(bool fullscreen)

Enable or disable full screen mode. The window size will be changed to the desktop size when enabled, and back to the original size when disabled.

enableVsync
void enableVsync(bool enable)

Enable or disable VSYNC. If enabled, updating the display will cause the calling thread to hang until a new frame starts. In other words, it will lock the updating rate to the display refresh rate.

getWindowSize
void getWindowSize(int* width, int* height)

Gets the window size.

getActualWindowSize
void getActualWindowSize(int* width, int* height)

Gets the window size actually being used. This can be different from the one that was set when running in full screen mode, or if it was bigger than the display.

getWindowWidth
uint getWindowWidth()

Returns the window width.

getWindowHeight
uint getWindowHeight()

Returns the window height.

updateDisplay
void updateDisplay()

Updates the display with the current front (screen) buffer.

setClearColor
void setClearColor(float red, float green, float blue, float alpha)

Sets the renderer buffer clear color. This can be interpreted as the background color.

clearCurrentBuffer
void clearCurrentBuffer()

Clears the currently bound buffer (either a frame buffer, or the front (screen) buffer if none are bound).

disableCapability
void disableCapability(Capability capability)

Disables the capability.

enableCapability
void enableCapability(Capability capability)

Enables the capability.

setDepthMask
void setDepthMask(bool enabled)

Enables or disables writing into the depth buffer.

setBlendingFunctions
void setBlendingFunctions(BlendFunction source, BlendFunction destination)

Sets the blending functions for the source and destination buffers, for all buffers. Blending must be enabled with {@link #enableCapability(org.spout.renderer.api.gl.Context.Capability)}.

setBlendingFunctions
void setBlendingFunctions(int bufferIndex, BlendFunction source, BlendFunction destination)

Sets the blending functions for the source and destination buffer at the index. Blending must be enabled with {@link #enableCapability(org.spout.renderer.api.gl.Context.Capability)}. <p/> Support for specifying the buffer index is only available in GL40.

setViewPort
void setViewPort(uint x, uint y, uint width, uint height)

Sets the render view port, which is the dimensions and position of the frame inside the window.

readFrame
ubyte[] readFrame(uint x, uint y, uint width, uint height, InternalFormat format)

Reads the current frame pixels and returns it as a byte buffer of the desired format. The size of the returned image data is the same as the current window dimensions.

isWindowCloseRequested
bool isWindowCloseRequested()

Returns true if an external process (such as the user) is requesting for the window to be closed. This value is reset once this method has been called.

Meta