Class: Fox::FXGLContext
- Defined in:
- rdoc-sources/FXGLContext.rb
Overview
A GL context is an object representing the OpenGL state information. Multiple GL context may share display lists to conserve memory. When drawing multiple windows, it may be advantageous to share not only display lists, but also GL contexts. Since the GL context is created for a certain frame-buffer configuration, sharing of GL contexts is only possible if the windows sharing the GL context all have the same GL visual. However, display lists may be shared between different GL contexts.
Instance Attribute Summary collapse
-
#visual ⇒ Object
readonly
The visual FXGLVisual.
Attributes inherited from FXId
Instance Method Summary collapse
-
#begin(drawable) ⇒ Object
Make this OpenGL context current prior to performing OpenGL commands.
-
#end ⇒ Object
Make this OpenGL context non-current.
-
#initialize(app, visual, other = nil) ⇒ FXGLContext
constructor
Construct an OpenGL context.
-
#shared? ⇒ Boolean
Return
true
if it is sharing display lists. -
#swapBuffers ⇒ Object
Swap front and back buffer.
-
#swapSubBuffers(x, y, w, h) ⇒ Object
Copy part of backbuffer to front buffer [Mesa].
Methods inherited from FXId
#create, #created?, #destroy, #detach, #runOnUiThread
Methods inherited from FXObject
#bind, #handle, #load, #save, subclasses
Constructor Details
#initialize(app, visual, other = nil) ⇒ FXGLContext
Construct an OpenGL context. If other is a reference to an existing FXGLContext, this context will share display lists with that other context. Otherwise, this context will use its own private display list.
21 22 |
# File 'rdoc-sources/FXGLContext.rb', line 21 def initialize(app, visual, other=nil) # :yields: theGLContext end |
Instance Attribute Details
#visual ⇒ Object (readonly)
The visual Fox::FXGLVisual
15 16 17 |
# File 'rdoc-sources/FXGLContext.rb', line 15 def visual @visual end |
Instance Method Details
#begin(drawable) ⇒ Object
Make this OpenGL context current prior to performing OpenGL commands.
28 |
# File 'rdoc-sources/FXGLContext.rb', line 28 def begin(drawable); end |
#end ⇒ Object
Make this OpenGL context non-current.
31 |
# File 'rdoc-sources/FXGLContext.rb', line 31 def end(); end |
#shared? ⇒ Boolean
Return true
if it is sharing display lists.
25 |
# File 'rdoc-sources/FXGLContext.rb', line 25 def shared?; end |
#swapBuffers ⇒ Object
Swap front and back buffer
34 |
# File 'rdoc-sources/FXGLContext.rb', line 34 def swapBuffers(); end |
#swapSubBuffers(x, y, w, h) ⇒ Object
Copy part of backbuffer to front buffer [Mesa]
37 |
# File 'rdoc-sources/FXGLContext.rb', line 37 def swapSubBuffers(x, y, w, h); end |