|
Aviatrix3D 2.1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.j3d.aviatrix3d.output.graphics.BaseBufferDescriptor
public abstract class BaseBufferDescriptor
Common basic descriptor for all the different types of buffer implementations.
A descriptor at this level abstracts away most of the basic interactions that rendering code needs to perform. Not all the methods need to do something, as the different types of buffers will have varying implementation requirements.
GLContext usage
Buffers have two GLContext scopes. The first is the GLContext instance that this buffer is created under. The second GLContext is the local context that renders within that buffer. For example, you have a main scene with the parent context and then a Pbuffer will have its own separate local context. However, the lines can become blurred when looking at other buffer types, such as FBOs. In that case, the local and parent context are the same reference. However, at the conceptual level, the buffer descriptor makes this distinction.
Most methods will use the parent context as that is needed to operate buffer control. Where needed, the end user code can extract the local context.
Field Summary | |
---|---|
protected int |
bufferHeight
The current height of the buffer in pixels |
protected int |
bufferWidth
The current width of the buffer in pixels |
protected boolean |
initComplete
Flag indicating the current initialisation state |
protected OffscreenBufferRenderable |
ownerRenderable
The renderable object that we are representing as a buffer |
Constructor Summary | |
---|---|
protected |
BaseBufferDescriptor(OffscreenBufferRenderable owner)
Construct an instance of this class that will contain a buffer with the requested capabilties. |
Method Summary | |
---|---|
void |
bindBuffer(javax.media.opengl.GLContext parentContext)
Bind the current buffer to this context now. |
abstract void |
delete(javax.media.opengl.GLContext context)
Remove this buffer object from existance. |
abstract void |
disable(javax.media.opengl.GLContext context)
This buffer is no longer eligable for rendering to now. |
abstract EnableState |
enable(javax.media.opengl.GLContext context)
Enable this buffer for rendering to now. |
abstract javax.media.opengl.GLContext |
getLocalContext()
Fetch the local context for this buffer. |
abstract boolean |
initialise(javax.media.opengl.GLContext parentContext)
Initialise an instance of this buffer now within the given parent context. |
boolean |
isInitialised()
Check to see if this buffer has been initialised yet. |
abstract void |
reinitialize()
Reinitialise this descriptor because the GL context has changed. |
abstract void |
resize(javax.media.opengl.GLContext context)
Resize the underlying textures, leaving the buffer ID intact. |
abstract void |
swapBuffers(javax.media.opengl.GLContext context)
Finish rendering this buffer and copy it in to the destination texture. |
void |
unbindBuffer(javax.media.opengl.GLContext parentContext)
Unbind the current buffer from this context now. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected boolean initComplete
protected OffscreenBufferRenderable ownerRenderable
protected int bufferWidth
protected int bufferHeight
Constructor Detail |
---|
protected BaseBufferDescriptor(OffscreenBufferRenderable owner)
owner
- The renderable that we are wrappingMethod Detail |
---|
public boolean isInitialised()
public abstract boolean initialise(javax.media.opengl.GLContext parentContext)
parentContext
- The parent context to create the buffer in
public abstract void reinitialize()
public abstract javax.media.opengl.GLContext getLocalContext()
public abstract EnableState enable(javax.media.opengl.GLContext context) throws javax.media.opengl.GLException
context
- The GL context this buffer comes from
javax.media.opengl.GLException
- Exception when something at the low-level went
wrong.public abstract void disable(javax.media.opengl.GLContext context) throws javax.media.opengl.GLException
context
- The GL context this buffer comes from
javax.media.opengl.GLException
- Exception when something at the low-level went
wrong.public void bindBuffer(javax.media.opengl.GLContext parentContext)
public void unbindBuffer(javax.media.opengl.GLContext parentContext)
public abstract void swapBuffers(javax.media.opengl.GLContext context)
context
- The GL context this buffer comes frompublic abstract void resize(javax.media.opengl.GLContext context)
context
- The GL context this buffer comes frompublic abstract void delete(javax.media.opengl.GLContext context)
context
- The GL context this buffer comes from
|
Aviatrix3D 2.1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |