public class GLCanvas extends Canvas
GLData
,
OpenGL snippets,
Sample code and further informationModifier and Type | Field and Description |
---|---|
(package private) int |
context |
(package private) int |
pixelFormat |
(package private) static java.lang.String |
USE_OWNDC_KEY |
Constructor and Description |
---|
GLCanvas(Composite parent,
int style,
GLData data)
Create a GLCanvas widget using the attributes described in the GLData
object provided.
|
Modifier and Type | Method and Description |
---|---|
(package private) static int |
checkStyle(Composite parent,
int style) |
GLData |
getGLData()
Returns a GLData object describing the created context.
|
boolean |
isCurrent()
Returns a boolean indicating whether the receiver's OpenGL context
is the current context.
|
void |
setCurrent()
Sets the OpenGL context associated with this GLCanvas to be the
current GL context.
|
void |
swapBuffers()
Swaps the front and back color buffers.
|
drawBackground, getCaret, getIME, scroll, setCaret, setFont, setIME
changed, checkSubclass, computeSize, drawBackground, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList
computeTrim, getClientArea, getHorizontalBar, getScrollbarsMode, getVerticalBar
addControlListener, addDragDetectListener, addFocusListener, addGestureListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTouchListener, addTraverseListener, computeSize, dragDetect, dragDetect, forceFocus, getAccessible, getBackground, getBackgroundImage, getBorderWidth, getBounds, getCursor, getDragDetect, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getOrientation, getParent, getRegion, getShell, getSize, getToolTipText, getTouchEnabled, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, print, redraw, redraw, removeControlListener, removeDragDetectListener, removeFocusListener, removeGestureListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTouchListener, removeTraverseListener, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, setEnabled, setForeground, setLayoutData, setLocation, setLocation, setMenu, setOrientation, setParent, setRedraw, setRegion, setSize, setSize, setToolTipText, setTouchEnabled, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, traverse, traverse, update
addDisposeListener, addListener, checkWidget, dispose, getData, getData, getDisplay, getListeners, getStyle, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, reskin, setData, setData, toString
int context
int pixelFormat
static final java.lang.String USE_OWNDC_KEY
public GLCanvas(Composite parent, int style, GLData data)
parent
- a composite widgetstyle
- the bitwise OR'ing of widget stylesdata
- the requested attributes of the GLCanvasjava.lang.IllegalArgumentException
- static int checkStyle(Composite parent, int style)
public GLData getGLData()
SWTException
- public boolean isCurrent()
SWTException
- public void setCurrent()
SWTException
- public void swapBuffers()
SWTException
-