Pbuffer encapsulates an OpenGL pbuffer.
This class is thread-safe.
| Modifier and Type | Field and Description |
|---|---|
| public static final int | BACK_LEFT_BUFFER
The Pbuffer back left buffer. |
| public static final int | BACK_RIGHT_BUFFER
The Pbuffer back right buffer. |
| public static final int | CUBE_MAP_FACE
The render-to-texture cube map face attribute. |
| public static final int | DEPTH_BUFFER
The Pbuffer depth buffer. |
| public static final int | FRONT_LEFT_BUFFER
The Pbuffer front left buffer. |
| public static final int | FRONT_RIGHT_BUFFER
The Pbuffer front right buffer. |
| private final int | height
Height |
| public static final int | MIPMAP_LEVEL
The render-to-texture mipmap level attribute. |
| public static final int | PBUFFER_SUPPORTED
Indicates that Pbuffers can be created. |
| public static final int | RENDER_DEPTH_TEXTURE_SUPPORTED
Indicates that Pbuffers can be used as depth render-textures. |
| public static final int | RENDER_TEXTURE_RECTANGLE_SUPPORTED
Indicates that Pbuffers can be used as non-power-of-two render-textures. |
| public static final int | RENDER_TEXTURE_SUPPORTED
Indicates that Pbuffers can be used as render-textures. |
| public static final int | TEXTURE_CUBE_MAP_NEGATIVE_X
The render-to-texture cube map negative X face value. |
| public static final int | TEXTURE_CUBE_MAP_NEGATIVE_Y
The render-to-texture cube map negative Y face value. |
| public static final int | TEXTURE_CUBE_MAP_NEGATIVE_Z
The render-to-texture cube map negative Z face value. |
| public static final int | TEXTURE_CUBE_MAP_POSITIVE_X
The render-to-texture cube map positive X face value. |
| public static final int | TEXTURE_CUBE_MAP_POSITIVE_Y
The render-to-texture cube map positive Y face value. |
| public static final int | TEXTURE_CUBE_MAP_POSITIVE_Z
The render-to-texture cube map positive Z face value. |
| private final int | width
Width |
| Access | Constructor and Description |
|---|---|
| public | Pbuffer(int
Pbuffer width width, int Pbuffer height height, PixelFormat Minimum Pbuffer context properties pixel_format, Drawable If non-null the Pbuffer will share display lists and textures with it. Otherwise, the Pbuffer will share
with the Display context (if created). shared_drawable)Create an instance of a Pbuffer with a unique OpenGL context. |
| public | Pbuffer(int
Pbuffer width width, int Pbuffer height height, PixelFormat Minimum Pbuffer context properties pixel_format, RenderTexture renderTexture, Drawable If non-null the Pbuffer will share display lists and textures with it. Otherwise, the Pbuffer will share
with the Display context (if created). shared_drawable)Create an instance of a Pbuffer with a unique OpenGL context. |
| public | Pbuffer(int
Pbuffer width width, int Pbuffer height height, PixelFormat Minimum Pbuffer context properties pixel_format, RenderTexture renderTexture, Drawable If non-null the Pbuffer will share display lists and textures with it. Otherwise, the Pbuffer will share
with the Display context (if created). shared_drawable, ContextAttribs The ContextAttribs to use when creating the context. (optional, may be null) attribs)Create an instance of a Pbuffer with a unique OpenGL context. |
| Modifier and Type | Method and Description |
|---|---|
| public synchronized void | |
| private static PeerInfo | createPbuffer(int width, int height, PixelFormat pixel_format, ContextAttribs attribs, RenderTexture renderTexture)
|
| public static int | |
| public synchronized int | |
| public synchronized int | |
| public synchronized boolean | Returns: true if the buffer is lost and destroyed, false if the buffer is valid.Method to test for validity of the buffer. |
| public synchronized void | |
| public synchronized void |
| BACK_LEFT_BUFFER | back to summary |
|---|---|
| public static final int BACK_LEFT_BUFFER The Pbuffer back left buffer. | |
| BACK_RIGHT_BUFFER | back to summary |
|---|---|
| public static final int BACK_RIGHT_BUFFER The Pbuffer back right buffer. | |
| CUBE_MAP_FACE | back to summary |
|---|---|
| public static final int CUBE_MAP_FACE The render-to-texture cube map face attribute. | |
| DEPTH_BUFFER | back to summary |
|---|---|
| public static final int DEPTH_BUFFER The Pbuffer depth buffer. | |
| FRONT_LEFT_BUFFER | back to summary |
|---|---|
| public static final int FRONT_LEFT_BUFFER The Pbuffer front left buffer. | |
| FRONT_RIGHT_BUFFER | back to summary |
|---|---|
| public static final int FRONT_RIGHT_BUFFER The Pbuffer front right buffer. | |
| height | back to summary |
|---|---|
| private final int height Height | |
| MIPMAP_LEVEL | back to summary |
|---|---|
| public static final int MIPMAP_LEVEL The render-to-texture mipmap level attribute. | |
| PBUFFER_SUPPORTED | back to summary |
|---|---|
| public static final int PBUFFER_SUPPORTED Indicates that Pbuffers can be created. | |
| RENDER_DEPTH_TEXTURE_SUPPORTED | back to summary |
|---|---|
| public static final int RENDER_DEPTH_TEXTURE_SUPPORTED Indicates that Pbuffers can be used as depth render-textures. | |
| RENDER_TEXTURE_RECTANGLE_SUPPORTED | back to summary |
|---|---|
| public static final int RENDER_TEXTURE_RECTANGLE_SUPPORTED Indicates that Pbuffers can be used as non-power-of-two render-textures. | |
| RENDER_TEXTURE_SUPPORTED | back to summary |
|---|---|
| public static final int RENDER_TEXTURE_SUPPORTED Indicates that Pbuffers can be used as render-textures. | |
| TEXTURE_CUBE_MAP_NEGATIVE_X | back to summary |
|---|---|
| public static final int TEXTURE_CUBE_MAP_NEGATIVE_X The render-to-texture cube map negative X face value. | |
| TEXTURE_CUBE_MAP_NEGATIVE_Y | back to summary |
|---|---|
| public static final int TEXTURE_CUBE_MAP_NEGATIVE_Y The render-to-texture cube map negative Y face value. | |
| TEXTURE_CUBE_MAP_NEGATIVE_Z | back to summary |
|---|---|
| public static final int TEXTURE_CUBE_MAP_NEGATIVE_Z The render-to-texture cube map negative Z face value. | |
| TEXTURE_CUBE_MAP_POSITIVE_X | back to summary |
|---|---|
| public static final int TEXTURE_CUBE_MAP_POSITIVE_X The render-to-texture cube map positive X face value. | |
| TEXTURE_CUBE_MAP_POSITIVE_Y | back to summary |
|---|---|
| public static final int TEXTURE_CUBE_MAP_POSITIVE_Y The render-to-texture cube map positive Y face value. | |
| TEXTURE_CUBE_MAP_POSITIVE_Z | back to summary |
|---|---|
| public static final int TEXTURE_CUBE_MAP_POSITIVE_Z The render-to-texture cube map positive Z face value. | |
| width | back to summary |
|---|---|
| private final int width Width | |
| Pbuffer | back to summary |
|---|---|
| public Pbuffer(int width, int height, PixelFormat pixel_format, Drawable shared_drawable) throws LWJGLException Create an instance of a Pbuffer with a unique OpenGL context. The buffer is single-buffered. Note The Pbuffer will have its own context that shares display lists and textures with
| |
| Pbuffer | back to summary |
|---|---|
| public Pbuffer(int width, int height, PixelFormat pixel_format, RenderTexture renderTexture, Drawable shared_drawable) throws LWJGLException Create an instance of a Pbuffer with a unique OpenGL context. The buffer is single-buffered. Note The Pbuffer will have its own context that shares display lists and textures with The renderTexture parameter defines the necessary state for enabling render-to-texture. When this parameter is null, render-to-texture is not available. Before using render-to-texture, the Pbuffer capabilities must be queried to ensure that it is supported. Currently only windows platform can support this feature, so it is recommended that EXT_framebuffer_object or similar is used if available, for maximum portability.
| |
| Pbuffer | back to summary |
|---|---|
| public Pbuffer(int width, int height, PixelFormat pixel_format, RenderTexture renderTexture, Drawable shared_drawable, ContextAttribs attribs) throws LWJGLException Create an instance of a Pbuffer with a unique OpenGL context. The buffer is single-buffered. Note The Pbuffer will have its own context that shares display lists and textures with The renderTexture parameter defines the necessary state for enabling render-to-texture. When this parameter is null, render-to-texture is not available. Before using render-to-texture, the Pbuffer capabilities must be queried to ensure that it is supported. Currently only windows platform can support this feature, so it is recommended that EXT_framebuffer_object or similar is used if available, for maximum portability.
| |
| bindTexImage | back to summary |
|---|---|
| public synchronized void bindTexImage(int buffer) Binds the currently bound texture to the buffer specified. The buffer can be one of the following: FRONT_LEFT_BUFFER FRONT_RIGHT_BUFFER BACK_LEFT_BUFFER BACK_RIGHT_BUFFER DEPTH_BUFFER | |
| createPbuffer | back to summary |
|---|---|
| private static PeerInfo createPbuffer(int width, int height, PixelFormat pixel_format, ContextAttribs attribs, RenderTexture renderTexture) throws LWJGLException | |
| getCapabilities | back to summary |
|---|---|
| public static int getCapabilities() Gets the Pbuffer capabilities.
| |
| getHeight | back to summary |
|---|---|
public synchronized int getHeight()
| |
| getWidth | back to summary |
|---|---|
public synchronized int getWidth()
| |
| isBufferLost | back to summary |
|---|---|
| public synchronized boolean isBufferLost() Method to test for validity of the buffer. If this function returns true, the buffer contents is lost. The buffer can still be used, but the results are undefined. The application is expected to release the buffer if needed, destroy it and recreate a new buffer.
| |
| releaseTexImage | back to summary |
|---|---|
| public synchronized void releaseTexImage(int buffer) Releases the currently bound texture from the buffer specified. | |
| setAttrib | back to summary |
|---|---|
| public synchronized void setAttrib(int attrib, int value) Sets a render-to-texture attribute. The attrib parameter can be one of MIPMAP_LEVEL and CUBE_MAP_FACE. When the attrib parameter is CUBE_MAP_FACE then the value parameter can be on of the following: TEXTURE_CUBE_MAP_POSITIVE_X TEXTURE_CUBE_MAP_NEGATIVE_X TEXTURE_CUBE_MAP_POSITIVE_Y TEXTURE_CUBE_MAP_NEGATIVE_Y TEXTURE_CUBE_MAP_POSITIVE_Z TEXTURE_CUBE_MAP_NEGATIVE_Z | |