public class GLCanvas extends Canvas
GLData
,
OpenGL snippets,
Sample code and further informationConstructor 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 |
---|---|
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, 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, computeSize, dragDetect, dragDetect, forceFocus, getAccessible, getBackground, getBackgroundImage, getBorderWidth, getBounds, getCursor, getDragDetect, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getOrientation, getParent, getRegion, getShell, getSize, getTextDirection, getToolTipText, getTouchEnabled, getVisible, internal_dispose_GC, internal_new_GC, isAutoScalable, 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, requestLayout, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, setEnabled, setForeground, setLayoutData, setLocation, setLocation, setMenu, setOrientation, setParent, setRedraw, setRegion, setSize, setSize, setTextDirection, setToolTipText, setTouchEnabled, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, traverse, traverse, update
addDisposeListener, addListener, checkWidget, dispose, getData, getData, getDisplay, getListeners, getStyle, isAutoDirection, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, reskin, setData, setData, toString
public GLCanvas(Composite parent, int style, GLData data)
parent
- a composite widgetstyle
- the bitwise OR'ing of widget stylesdata
- the requested attributes of the GLCanvasIllegalArgumentException
- public GLData getGLData()
SWTException
- public boolean isCurrent()
SWTException
- public void setCurrent()
SWTException
- public void swapBuffers()
SWTException
- Copyright © 2017. All Rights Reserved.