IOpenGLContext interface.
More...
|
| virtual bool | initialize ()=0 |
| | Create a new OpenGL context.
|
| virtual bool | isInitialized () const =0 |
| | Get initialized status.
|
| virtual bool | makeCurrent ()=0 |
| | Make this context the current OpenGL rendering context.
|
| virtual bool | doneCurrent ()=0 |
| | Make no OpenGL context the current context.
|
| virtual void | needsRender ()=0 |
| | OpenGL context owner render request.
|
| virtual int | getDpi () const =0 |
| | Get context attached display DPI in physical pixels / inch.
|
| virtual float | getPixelRatio () const |
| | Get context attached physical / logical pixel ratio.
|
| virtual EDisplayType | getDisplayType () const |
| | Get context attached display type.
|
| virtual std::pair< float, bool > | getFontModifiers () const |
| | Get the font modifiers.
|
| virtual float | getTextureScaleFactor () const |
| | Get the texture scale factor.
|
| virtual bool | isDelayedInitializationRequired () const |
| | Check if delayed initialization is required.
|
| virtual Rect const & | safeArea () const |
| | Get the safe area rectangle (iPhones specific).
|
| virtual bool | getCapability (const ECapability qCap) const |
| | Check if the requested capability is supported or not.
|
| virtual bool | getVerticalFlip () const |
| | Get the vertical flip status.
|
| virtual bool | doAction (const EAction act) |
| | The function is called when the SDK requests an operation on the context.
|
|
virtual void | attached (Screen &) |
| | Notify context when is attached to a screen.
|
|
virtual void | detached (Screen &) |
| | Notify context when is detached from a screen.
|
| virtual EImagePixelFormat | encoding () const =0 |
| | Get the encoding.
|
| virtual Rect const & | viewport () const =0 |
| | Get the viewport rectangle associated with this rendering context.
|
| virtual const void * | getSystemContext () const |
| | Get the system rendering context (platform-dependent).
|
◆ EAction
Action enumeration.
| Enumerator |
|---|
| FBODownSample | Force context to do a down sampling (merging of multi-sampling buffers) e.g.
glReadPixels - does not work for FAA with FBO
|
| FBOMultiSample | The enumeration is the reverse of previous enumeration.
|
◆ ECapability
Capabilities enumeration.
| Enumerator |
|---|
| MSAA_PixelFormat | The anti-aliasing effect is obtained using pixel format query.
|
| MSAA_FBO | The anti-aliasing effect is obtained using FBO (frame buffer object) technology.
|
◆ doAction()
| virtual bool gem::IOpenGLContext::doAction |
( |
const EAction | act | ) |
|
|
inlinevirtual |
The function is called when the SDK requests an operation on the context.
- Parameters
-
| act | The action to perform. |
- Returns
- True if the action is performed successfully, false otherwise.
◆ doneCurrent()
| virtual bool gem::IOpenGLContext::doneCurrent |
( |
| ) |
|
|
pure virtual |
Make no OpenGL context the current context.
After this method, no OpenGL functions will be called by the engine.
- Returns
- True if the current context is unset successfully, false otherwise.
◆ encoding()
Get the encoding.
- Returns
- The image pixel format.
◆ getCapability()
| virtual bool gem::IOpenGLContext::getCapability |
( |
const ECapability | qCap | ) |
const |
|
inlinevirtual |
Check if the requested capability is supported or not.
- Parameters
-
| qCap | The capability to check. |
- Returns
- True if the capability is supported, false otherwise.
◆ getDisplayType()
| virtual EDisplayType gem::IOpenGLContext::getDisplayType |
( |
| ) |
const |
|
inlinevirtual |
Get context attached display type.
- Returns
- The display type.
◆ getDpi()
| virtual int gem::IOpenGLContext::getDpi |
( |
| ) |
const |
|
pure virtual |
Get context attached display DPI in physical pixels / inch.
- Returns
- The DPI value.
◆ getFontModifiers()
| virtual std::pair< float, bool > gem::IOpenGLContext::getFontModifiers |
( |
| ) |
const |
|
inlinevirtual |
Get the font modifiers.
The modifiers apply to all fonts on the screen to improve their visibility & readability.
- Returns
- Pair <scale factor, bold style>.
◆ getPixelRatio()
| virtual float gem::IOpenGLContext::getPixelRatio |
( |
| ) |
const |
|
inlinevirtual |
Get context attached physical / logical pixel ratio.
- Returns
- The pixel ratio.
◆ getSystemContext()
| virtual const void * gem::IRenderContext::getSystemContext |
( |
| ) |
const |
|
inlinevirtualinherited |
Get the system rendering context (platform-dependent).
- Returns
- The system rendering context.
◆ getTextureScaleFactor()
| virtual float gem::IOpenGLContext::getTextureScaleFactor |
( |
| ) |
const |
|
inlinevirtual |
Get the texture scale factor.
The scale factor applies to all textures rendered on the screen to improve their visibility & readability.
- Returns
- The texture scale factor.
◆ getVerticalFlip()
| virtual bool gem::IOpenGLContext::getVerticalFlip |
( |
| ) |
const |
|
inlinevirtual |
Get the vertical flip status.
- Returns
- True if vertical flip is enabled, false otherwise.
◆ initialize()
| virtual bool gem::IOpenGLContext::initialize |
( |
| ) |
|
|
pure virtual |
Create a new OpenGL context.
- Returns
- True if the context creation succeeds, false otherwise.
◆ isDelayedInitializationRequired()
| virtual bool gem::IOpenGLContext::isDelayedInitializationRequired |
( |
| ) |
const |
|
inlinevirtual |
Check if delayed initialization is required.
By returning true, all OpenGL context dependent objects (screens, canvases, views) will be initialized on the first Screen::render call. The delay initialization can be used when OpenGL context dependent objects are created before the context is ready to use.
- Returns
- True if delayed initialization is required, false otherwise.
◆ isInitialized()
| virtual bool gem::IOpenGLContext::isInitialized |
( |
| ) |
const |
|
pure virtual |
Get initialized status.
- Returns
- True if the context is initialized, false otherwise.
◆ makeCurrent()
| virtual bool gem::IOpenGLContext::makeCurrent |
( |
| ) |
|
|
pure virtual |
Make this context the current OpenGL rendering context.
All OpenGL functions that are called operate on this context until another context is made current.
- Returns
- True if the context is made current successfully, false otherwise.
◆ needsRender()
| virtual void gem::IOpenGLContext::needsRender |
( |
| ) |
|
|
pure virtual |
OpenGL context owner render request.
This notification is sent only when a screen render rule is set to RR_OnDemand.
◆ safeArea()
| virtual Rect const & gem::IOpenGLContext::safeArea |
( |
| ) |
const |
|
inlinevirtual |
Get the safe area rectangle (iPhones specific).
- Returns
- The safe area rectangle.
◆ viewport()
| virtual Rect const & gem::IRenderContext::viewport |
( |
| ) |
const |
|
pure virtualinherited |
Get the viewport rectangle associated with this rendering context.
- Returns
- The viewport rectangle.