| java.lang.Object org.eclipse.swt.opengl.GLContext
GLContext | public class GLContext (Code) | | Instances of GLContext are used to draw on swt Drawable s
through invocations of provided OpenGL functions.
Application code must explicitly invoke the GLContext.dispose ()
method to release the operating system resources managed by each instance
when those instances are no longer required. This is particularly
important on Windows95 and Windows98 where the operating system has a limited
number of device contexts available.
|
Constructor Summary | |
public | GLContext(Drawable drawable) Constructs a new instance of this class which has been
configured to draw on the specified drawable.
You must dispose the GLContext when it is no longer required. |
Method Summary | |
public ImageData | convertImageData(ImageData source) | public void | dispose() Disposes of the operating system resources associated with
the receiver. | public int[] | getSelectBuffer(int selectBufferPtr, int[] selectBuffer) | public int | getSelectBufferPtr(int[] selectBuffer) | public boolean | isCurrent() Returns a boolean indicating whether the receiver is the current
GLContext . | public boolean | isDisposed() Returns a boolean indicating whether the GLContext has been
disposed. | public void | loadBitmapFont(FontData fdata, Device device, int base, int startIndex, int length) Loads the specified bitmap font. | public void | loadOutlineFont(FontData fdata, Device device, int base, int first, int count, float deviation, float extrusion, int format, GLYPHMETRICSFLOAT[] lpgmf) Loads the specified outline font. | public void | resize(int x, int y, int width, int height) Resizes the receiver. | public void | setCurrent() Sets the receiver to be the current GLContext . | public void | swapBuffers() Swaps the receiver's buffers. |
LSB_FIRST | final static int LSB_FIRST(Code) | | |
MSB_FIRST | final static int MSB_FIRST(Code) | | |
selectBufferPtr | int selectBufferPtr(Code) | | |
GLContext | public GLContext(Drawable drawable)(Code) | | Constructs a new instance of this class which has been
configured to draw on the specified drawable.
You must dispose the GLContext when it is no longer required.
Parameters: drawable - the drawable to draw on exception: IllegalArgumentException - - ERROR_NULL_ARGUMENT - if the drawable is null
exception: SWTError - - ERROR_NO_HANDLES if a handle could not be obtained for gc creation
- ERROR_UNSUPPORTED_DEPTH - if the current display depth is not supported
|
dispose | public void dispose()(Code) | | Disposes of the operating system resources associated with
the receiver. Applications must dispose of all GLContext s
that they allocate.
|
getSelectBuffer | public int[] getSelectBuffer(int selectBufferPtr, int[] selectBuffer)(Code) | | |
getSelectBufferPtr | public int getSelectBufferPtr(int[] selectBuffer)(Code) | | |
isCurrent | public boolean isCurrent()(Code) | | Returns a boolean indicating whether the receiver is the current
GLContext .
true if the receiver is the current GLContext ,false otherwise exception: SWTError - - ERROR_GRAPHIC_DISPOSED if the receiver is disposed
|
isDisposed | public boolean isDisposed()(Code) | | Returns a boolean indicating whether the GLContext has been
disposed.
This method gets the dispose state for the GLContext .
When a GLContext has been disposed, it is an error to
invoke any other method using the GLContext .
true if the GLContext is disposed, false otherwise |
loadBitmapFont | public void loadBitmapFont(FontData fdata, Device device, int base, int startIndex, int length)(Code) | | Loads the specified bitmap font.
Parameters: fdata - Parameters: device - Parameters: base - Parameters: first - Parameters: count - |
loadOutlineFont | public void loadOutlineFont(FontData fdata, Device device, int base, int first, int count, float deviation, float extrusion, int format, GLYPHMETRICSFLOAT[] lpgmf)(Code) | | Loads the specified outline font.
Parameters: fdata - Parameters: device - Parameters: base - Parameters: first - Parameters: count - Parameters: deviation - Parameters: extrusion - Parameters: format - Parameters: lpgmf - |
resize | public void resize(int x, int y, int width, int height)(Code) | | Resizes the receiver.
Parameters: x - Parameters: y - Parameters: width - Parameters: height - |
setCurrent | public void setCurrent()(Code) | | Sets the receiver to be the current GLContext .
exception: SWTError - - ERROR_GRAPHIC_DISPOSED if the receiver is disposed
|
swapBuffers | public void swapBuffers()(Code) | | Swaps the receiver's buffers.
exception: SWTError - - ERROR_GRAPHIC_DISPOSED if the receiver is disposed
|
|
|