![]() |
GL Studio C++ Runtime API
|
#include <embedded_display_frame.h>
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 () |
![]() | |
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 |
![]() | |
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 |
virtual InterfaceListType * | GetCppInterfaceDescription (InterfaceListType *addToThisList=NULL) |
virtual void | GetCppInterfaceDescriptionFree (InterfaceListType *array) |
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 () |
![]() | |
virtual void | NotifyAttributeChanged (const AttributeName &name)=0 |
virtual | ~AttributeChangedNotifier () |
![]() | |
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 |
![]() | |
GlsColor | _backgroundColor |
![]() | |
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 |
![]() | |
virtual void | CurrentCursor (unsigned int cursor_id) |
void | CleanupDragMap () |
DisplayObject * | GetDragObjectForCursor (unsigned int cursorID) |
DisplayObject * | FindDragObject () |
virtual EventCompressor< DisplayFrame > * | GetEventCompressor () |
virtual float | Scale () |
![]() | |
WeakReferenceableMixin () | |
virtual | ~WeakReferenceableMixin () |
Additional Inherited Members | |
![]() | |
static void | SetOpenGLDefaultState (bool saveVal) |
static void | RestoreOpenGLState () |
![]() | |
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. | |
![]() | |
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 |
![]() | |
DynamicArray< WeakReference * > * | _weakRefs |
Base class for all embedded (openGL ES) display frame classes
EmbeddedDisplayFrame | ( | const char * | name, |
int | width, | ||
int | height | ||
) |
Create a new EmbeddedDisplayFrame object
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 |
|
protectedvirtual |
Builds a DisplayEvent for passing to the handle method
x | X device coordinate |
y | Y device coordinate |
pressure | Touchscreen pressure |
eventType | Touch event type (e.g. MOUSE_UP,MOUSE_DOWN,MOUSE_DRAG |
|
inlinevirtual |
Creates the spash screen Note on iOS the AppDelegate presents the splash screen for us, so this is just a stub
|
inlineoverrideprotectedvirtual |
Get the event compressor for this display frame, if it exists
Reimplemented from DisplayFrame.
|
overridevirtual |
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.
|
virtual |
Redraw the window now.
This actually calls the OpenGL Drawing routines.
|
inlinevirtual |
Removes (hides) the spash screen Note on iOS the AppDelegate presents the splash screen for us, so this is just a stub
|
virtual |
Sets up the default Orthographic projection (which supports things like pan and zoom).
projMatrix | The returned projection matrix. |
model | The returned modelview matrix. |
|
overridevirtual |
Set a flag that UpdateAnimate can test to see if the window needs redrawing.
Reimplemented from DisplayFrame.
EventCompressor<DisplayFrame> eventCompressor |
Used for event compression. Not for general use by users.