| GL Studio C++ Runtime API

Public Types | Public Member Functions | Public Attributes | Protected Member Functions | List of all members
EmbeddedDisplayFrame Class Reference

`#include <embedded_display_frame.h>`

Inheritance diagram for EmbeddedDisplayFrame:

## Public Types
enum | iDeviceOrientation { ORIENTATION_UNKNOWN = 0 , ORIENTATION_PORTRAIT = 1 , ORIENTATION_PORTRAIT_UPSIDE_DOWN = 2 , ORIENTATION_LANDSCAPE_LEFT = 3 , ORIENTATION_LANDSCAPE_RIGHT = 4 , ORIENTATION_FACE_UP = 5 , ORIENTATION_FACE_DOWN = 6 }
| < Unused, remains for backward compatibility.

## Public Member Functions
| EmbeddedDisplayFrame (const char *name, int width, int height)
virtual void | RemoveSplash ()
virtual void | CreateSplash ()
virtual void | SetProjection (GlsMatrixType &projMatrix, GlsMatrixType &model)
void | Paint () override
void | SetRedraw () override
virtual void | Redraw ()
Public Member Functions inherited from RuntimeDisplayFrame
| RuntimeDisplayFrame (const char *name, int width, int height)
virtual | ~RuntimeDisplayFrame ()
virtual void | Clear ()
virtual GlsEyePoint * | CurrentEyePoint ()
virtual void | CurrentEyePoint (GlsEyePoint *eye)
virtual void | Scale (float scale)
virtual float | Scale () override
virtual DisplayObject * | handle (DisplayEvent *ev)
virtual void | BackgroundColor (unsigned char r, unsigned char g, unsigned char b, unsigned char a)
virtual void | GetBackgroundColor (unsigned char &r, unsigned char &g, unsigned char &b, unsigned char &a)
virtual void | BackgroundColor (const GlsColor &color)
const char * | Name ()
void | Name (char *name)
virtual GlsColor | BackgroundColor ()
virtual int | FrameInterval ()
virtual void | FrameInterval (int interval)
virtual Statistics * | Stats ()
virtual void | RecordCalculateStart ()
virtual void | RecordCalculateEnd ()
virtual void | ClearDragAndFocus () override
virtual bool | UpdateAnimate ()
virtual bool | FrameAnimate ()
virtual void | WaitForNextFrame ()
virtual void | Paint ()
virtual void | WidthOffset (float offset)
virtual float | WidthOffset ()
virtual void | HeightOffset (float offset)
virtual float | HeightOffset ()
virtual void | DepthFactor (float factor)
virtual float | DepthFactor ()
virtual void | FOV (double fov)
virtual double | FOV ()
virtual void | CurrentView (const int view)
virtual int | CurrentView () const
void | Invalidate () override
| Notify the painter that the scene needs to be redrawn. More...
bool | IsInvalidated () const override
Public Member Functions inherited from DisplayFrame
| DisplayFrame (int width, int height, bool allocateObjects=true)
void | ClearBitfield (GLbitfield bitField)
GLbitfield | ClearBitfield ()
virtual void | DragObject (DisplayObject *obj)
virtual DisplayObject * | DragObject ()
virtual void | ClearDrag ()
virtual void | FocusObject (DisplayObject *obj)
virtual DisplayObject * | FocusObject ()
virtual void | ClearFocus ()
virtual void | MultitouchEnabled (bool enabled)
virtual bool | MultitouchEnabled ()
virtual InputHandler * | GetInputHandler ()
virtual DisplayObject * | HandleDisplayEvent (DisplayEvent *ev)
virtual void | WriteResources (const char *filename, GlsResourceFilter *filter=NULL)
virtual void | ReadResources (const char *filename)
virtual DistiAttributeBase & | Resource (const char *name)
virtual void | GetResources (std::ostream &outstr, GlsResourceFilter *filter=NULL)
virtual void | SetResources (std::istream &instr)
void | SetResource (const std::string &resourceName, const std::string &resourceVal)
void | SetResource (const char *resourceName, const char *resourceVal)
std::string | GetResource (const std::string &resourceName)
std::string | GetResource (const char *resourceName)
virtual char * | GetResource_CRTClean (const char *name)
virtual void | GetResourceFree_CRTClean (char *memoryToFree)
virtual char * | GetResources_CRTClean (GlsResourceFilter *filter)
virtual void | GetResourcesFree_CRTClean (char *memoryToFree)
virtual void | SetResource_CRTClean (const char *name, const char *value)
virtual void | SetResources_CRTClean (const char *buf)
virtual void | NotifyAttributeChanged (const AttributeName &name) override
void | SetTexturePaletteSize (int cnt)
void | Draw ()
void | InsertObject (DisplayObject *obj, bool reparent=true, bool recalculateBoundingbox=true, int loc=-1)
void | InsertObject (DisplayObject *obj, int loc)
void | PushObject (DisplayObject *obj)
int | Width ()
int | Height ()
void | SetWidth (int w)
void | SetHeight (int h)
virtual void | SetRedraw ()
bool | CullingEnabled ()
void | CullingEnabled (const bool enabled)
DistiAttribDict & | FrameAttribDict ()
const DistiAttribDict & | FrameAttribDict () const
DynamicMaterialArray & | MaterialPalette ()
ComponentLightMgr * | LightMgr ()
void | LightMgr (ComponentLightMgr *val)
virtual void | ClearDragAndFocus ()
Public Member Functions inherited from AttributeChangedNotifier
virtual void | NotifyAttributeChanged (const AttributeName &name)=0
virtual | ~AttributeChangedNotifier ()
Public Member Functions inherited from WeakReferenceableMixin
void | AddWeakReference (WeakReference *weakRef) override
void | NotifyWeakReferenceDestroyed (WeakReference *ref) override
virtual void | AddWeakReference (WeakReference *weakRef)=0
virtual void | NotifyWeakReferenceDestroyed (WeakReference *weakReference)=0
virtual void | Invalidate ()=0
| Notify the painter that the scene needs to be redrawn. More...
virtual bool | IsInvalidated () const =0

## Public Attributes
EventCompressor< DisplayFrame > | eventCompressor
Public Attributes inherited from RuntimeDisplayFrame
GlsColor | _backgroundColor
Public Attributes inherited from DisplayFrame
TexturePalette * | texturePalette
SoundSystem * | _sound_player
Group * | objects

## Protected Member Functions
void | WindowFlags (int)
| Unused in ES, remains for backward compatibility.
virtual void | BuildAndSendEvent (int x, int y, int pressure, unsigned int eventType)
virtual EventCompressor< DisplayFrame > * | GetEventCompressor () override
Protected Member Functions inherited from DisplayFrame
virtual void | CurrentCursor (unsigned int cursor_id)
void | CleanupDragMap ()
DisplayObject * | GetDragObjectForCursor (unsigned int cursorID)
DisplayObject * | FindDragObject ()
virtual EventCompressor< DisplayFrame > * | GetEventCompressor ()
virtual float | Scale ()
Protected Member Functions inherited from WeakReferenceableMixin
| WeakReferenceableMixin ()
virtual | ~WeakReferenceableMixin ()

## Additional Inherited Members
Static Public Member Functions inherited from DisplayFrame
static void | SetOpenGLDefaultState (bool saveVal)
static void | RestoreOpenGLState ()
Protected Attributes inherited from RuntimeDisplayFrame
Timer | _frameTimer
| Timer used for scheduling.
Timer & | frameTimer
| For backwards compatibility.
float | _smoothedFrameDelay
| Frame interval, smoothed based on actual draw performance.
float | _width_offset
| For better control over clipping and field of view, use a GlsEyePoint, but some limited functionality is available here. More...
float | _height_offset
| Current "height" offset of window. Used for panning of display vertically in ortho mode.
Vector | _viewOffset
| Additional offset to apply to the modelview matrix.
float | _depthFactor
| Used for auto calculations.
double | _fov
| Field Of View. If 0.0 (the default), fov will be auto calculated.
double | _nearZ
| Near clipping plane. Only meaningful if _autoCalcNearZ is false.
bool | _autoCalcNearZ
| When true a _nearZ is automatically calculated.
double | _farZ
| Far clipping plane. Only meaningfull if _autoCalcVarZ is false.
bool | _autoCalcFarZ
| When true a _farZ is automatically calculated.
int | _current_view
| Current view of the canvas (e.g., ortho, perspective, eyepoint).
std::string | _name
| The title of this display frame's window, if applicable.
float | _scale
| Scale of the window.
unsigned int | frameInterval
| The frame interval in microSeconds (inverse of frame rate).
GlsEyePoint * | _currentEyePoint
| The current eyepoint for viewing the scene.
bool | _redraw
| Flag indicating if the window should be redrawn.
Protected Attributes inherited from DisplayFrame
bool | _cullingEnabled
int | _width
int | _height
float | _lastPickedDepth
DynamicMaterialArray | _materialPalette
ComponentLightMgr * | _lightMgr
GLbitfield | _clearBitfield
std::string | _componentHeaderFileName
DragObjectMap * | _dragObjectMap
| Holds a focus object for each cursor.
unsigned int | _currentCursor
bool | _multitouchEnabled
unsigned int | _cursorsDown
Protected Attributes inherited from WeakReferenceableMixin
DynamicArray< WeakReference * > * | _weakRefs

## Detailed Description

Base class for all embedded (openGL ES) display frame classes

## Constructor & Destructor Documentation

## ◆ EmbeddedDisplayFrame()

EmbeddedDisplayFrame | ( | const char * | name,
|  | int | width,
|  | int | height
| ) |  |

Create a new EmbeddedDisplayFrame object

Parameters

  name | name displayed on the title bar, if supported by the platform
  width | the width of the window in pixels
  height | the height of the window in pixels

## Member Function Documentation

## ◆ BuildAndSendEvent()

virtual void BuildAndSendEvent | ( | int | x,
|  | int | y,
|  | int | pressure,
|  | unsigned int | eventType
| ) |  |
| protected virtual

Builds a DisplayEvent for passing to the handle method

Parameters

  x | X device coordinate
  y | Y device coordinate
  pressure | Touchscreen pressure
  eventType | Touch event type (e.g. MOUSE_UP,MOUSE_DOWN,MOUSE_DRAG

## ◆ CreateSplash()

virtual void CreateSplash | ( |  | ) |
| inline virtual

Creates the spash screen Note on iOS the AppDelegate presents the splash screen for us, so this is just a stub

## ◆ GetEventCompressor()

virtual EventCompressor< DisplayFrame > * GetEventCompressor | ( |  | ) |
| inline override protected virtual

Get the event compressor for this display frame, if it exists

Returns
  The event compressor.

Reimplemented from DisplayFrame.

## ◆ Paint()

void Paint | ( |  | ) |
| override virtual

Redraws the window, using the platform specific mechanism. Place holder for base class implementations. Simple implementations may draw directly, while implementations that use a window manager may tell the window manager to redraw.

Reimplemented from RuntimeDisplayFrame.

## ◆ Redraw()

virtual void Redraw | ( |  | ) |
| virtual

Redraw the window now.
This actually calls the OpenGL Drawing routines.

## ◆ RemoveSplash()

virtual void RemoveSplash | ( |  | ) |
| inline virtual

Removes (hides) the spash screen Note on iOS the AppDelegate presents the splash screen for us, so this is just a stub

## ◆ SetProjection()

virtual void SetProjection | ( | GlsMatrixType & | projMatrix,
|  | GlsMatrixType & | model
| ) |  |
| virtual

Sets up the default Orthographic projection (which supports things like pan and zoom).

Parameters

  projMatrix | The returned projection matrix.
  model | The returned modelview matrix.

## ◆ SetRedraw()

void SetRedraw | ( |  | ) |
| override virtual

Set a flag that UpdateAnimate can test to see if the window needs redrawing.

Deprecated:
  Use Invalidate() from the GlsPainter interface to trigger a redraw. SetRedraw behaves differently on ES and Desktop platforms.

Reimplemented from DisplayFrame.

## Member Data Documentation

## ◆ eventCompressor

EventCompressor<DisplayFrame> eventCompressor

Used for event compression. Not for general use by users.

The documentation for this class was generated from the following file:

- embedded_display_frame.h