GL Studio API
|
#include <gls_display_frame.h>
Public Member Functions | |
glsDisplayFrame (const char *name, int width, int height) | |
virtual void | RemoveSplash () |
virtual void | CreateSplash () |
virtual void | Create (void) |
virtual void | SetProjection (void) |
virtual bool | FrameAnimate (void) |
virtual void | Redraw (void) |
virtual void | SetRedraw (void) |
virtual bool | UpdateAnimate (void) |
virtual void | SetWindowDimensions (int X, int Y, int W, int H) |
virtual void | GetWindowDimensions (int &X, int &Y, int &W, int &H) |
virtual void | PostDrawCallback (GlsDrawCallback cb) |
virtual void | PreDrawCallback (GlsDrawCallback cb) |
virtual void | WindowFlags (unsigned long flags) |
virtual void | WidthOffset (float offset) |
virtual float | WidthOffset (void) |
virtual void | HeightOffset (float offset) |
virtual float | HeightOffset (void) |
virtual bool | PostHandle (bool handled, DisplayEvent *ev) |
virtual void | CenterOnLogical (float lx, float ly) |
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 (void) const |
virtual bool | SKeyTogglesStatistics () |
virtual void | SKeyTogglesStatistics (bool flag) |
virtual bool | EscKeyExits () |
virtual void | EscKeyExits (bool flag) |
Public Member Functions inherited from RuntimeDisplayFrame | |
RuntimeDisplayFrame (const char *name, int width, int height) | |
virtual | ~RuntimeDisplayFrame () |
virtual void | Clear (void) |
virtual GlsEyePoint * | CurrentEyePoint () |
virtual void | CurrentEyePoint (GlsEyePoint *eye) |
virtual void | Scale (float scale) |
virtual float | Scale (void) |
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) |
void | Name (char *name) |
virtual glsColor | BackgroundColor (void) |
virtual int | FrameInterval (void) |
virtual void | FrameInterval (int interval) |
virtual Statistics * | Stats () |
virtual void | RecordCalculateStart (void) |
virtual void | RecordCalculateEnd (void) |
virtual void | ClearDragAndFocus () |
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 (void) |
virtual void | ClearDrag () |
virtual void | FocusObject (DisplayObject *obj) |
virtual DisplayObject * | FocusObject (void) |
virtual void | ClearFocus () |
virtual void | MultitouchEnabled (bool enabled) |
virtual bool | MultitouchEnabled (void) |
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) |
std::string | GetResource (const std::string &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) |
virtual InterfaceListType * | GetCppInterfaceDescription (InterfaceListType *addToThisList=NULL) |
virtual void | GetCppInterfaceDescriptionFree (InterfaceListType *array) |
void | SetTexturePaletteSize (int cnt) |
void | Draw (void) |
void | InsertObject (DisplayObject *obj, int loc) |
void | PushObject (DisplayObject *obj) |
int | Width (void) |
int | Height (void) |
void | SetWidth (int w) |
void | SetHeight (int h) |
bool | CullingEnabled (void) |
void | CullingEnabled (const bool enabled) |
DistiAttribDict & | FrameAttribDict (void) |
const DistiAttribDict & | FrameAttribDict (void) const |
DynamicMaterialArray & | MaterialPalette (void) |
ComponentLightMgr * | LightMgr (void) |
void | LightMgr (ComponentLightMgr *val) |
Public Member Functions inherited from AttributeChangedNotifier | |
virtual | ~AttributeChangedNotifier () |
Public Attributes | |
OpenGLWindow * | theWindow |
EventCompressor< DisplayFrame > | eventCompressor |
Public Attributes inherited from RuntimeDisplayFrame | |
glsColor | _backgroundColor |
Public Attributes inherited from DisplayFrame | |
TexturePalette * | texturePalette |
SoundSystem * | _sound_player |
Group * | objects |
Protected Attributes | |
Timer | frameTimer |
float | _smoothedFrameDelay |
bool | _redraw |
float | _width_offset |
float | _height_offset |
GlsDrawCallback | _preDrawCallback |
GlsDrawCallback | _postDrawCallback |
SplashDisplay * | splashDisplay |
int | _current_view |
float | _depthFactor |
double | _fov |
double | _nearZ |
bool | _autoCalcNearZ |
double | _farZ |
bool | _autoCalcFarZ |
bool | _sKeyTogglesStatistics |
bool | _escKeyExits |
Protected Attributes inherited from RuntimeDisplayFrame | |
std::string | _name |
float | _scale |
unsigned int | frameInterval |
GlsEyePoint * | _currentEyePoint |
Protected Attributes inherited from DisplayFrame | |
bool | _cullingEnabled |
int | _width |
int | _height |
float | _lastPickedDepth |
DynamicMaterialArray | _materialPalette |
ComponentLightMgr * | _lightMgr |
GLbitfield | _clearBitfield |
std::string | _componentHeaderFileName |
unsigned int | _currentCursor |
bool | _multitouchEnabled |
unsigned int | _cursorsDown |
Additional Inherited Members | |
Static Public Member Functions inherited from DisplayFrame | |
static void | SetOpenGLDefaultState (bool saveVal) |
static void | RestoreOpenGLState (void) |
Protected Member Functions inherited from DisplayFrame | |
virtual void | CurrentCursor (unsigned int cursor_id) |
void | CleanupDragMap () |
DisplayObject * | GetDragObjectForCursor (unsigned int cursorID) |
DisplayObject * | FindDragObject () |
GL Studio standalone application class. Creates one window and draws all contents in it.
glsDisplayFrame | ( | const char * | name, |
int | width, | ||
int | height | ||
) |
Creates this glsDisplayFrame
name | Window Title |
width | Width of Dsplay Frame in pixels |
height | Width of Dsplay Frame in pixels |
|
virtual |
Causes the window to center the view on the specified logical coordinate. It takes into account the possible rotation of the top group.
lx | Logical X Coordinate |
ly | Logical Y Coordinate |
|
virtual |
Creates this display frame. Called after the constructor so that things that need to access the OpenGL context can safely do so
|
virtual |
Creates the spash screen
|
inlinevirtual |
Sets the current view mode for the window
view | The new view mode for the window. Acceptable view types are: [VIEW_EYEPOINT - The application will be viewed through an eyepoint] [VIEW_XY - The application will be viewed through a 2D orthographic view of the XY plane] [VIEW_PERSPECTIVE - The application will be viewed through a perspective projection] |
|
inlinevirtual |
Gets the current view mode for the window.
|
virtual |
Sets the Depth Factor for the window
factor | The depth factor. Used for autocalculating clipping planes |
|
virtual |
Gets the Depth Factor for the window
|
virtual |
|
virtual |
Enable/disable ESC key for exiting application
flag | Whether or not ESC key exits application |
|
virtual |
Sets the FOV (Field of View) for the window. If fov is set to 0.0, a reasonable FOV will be calculated based on width and height.
fov | New field of view in degrees |
|
virtual |
Gets the FOV (Field of View) for the window.
|
virtual |
Redraw the window at the Hz rate set for the DisplayFrame, or at least try to. We might be slower if the hardware can't keep up.
|
virtual |
Get the dimensions for the display frame window
X | Gets X coordinate of window |
Y | Gets Y coordinate of window |
W | Gets width of window |
H | Gets height of window |
|
virtual |
Pans the display vertically
offset | The new Y position of the center of the window |
|
virtual |
Gets the vertical position of the display at the center of the window
|
virtual |
Sets the post draw callback to the function pointer passed in
|
virtual |
Called after calling handle.
handled | True when the event has already been handled |
ev | the pointer to the the event |
|
virtual |
Sets the pre draw callback to the function pointer passed in
|
virtual |
Redraw the window now. This actually calls the OpenGL Drawing routines.
|
virtual |
Removes (hides) the spash screen
|
virtual |
Sets up the default Orthographic projection (which supports things like pan and zoom)
|
virtual |
Set a flag that UpdateAnimate can test to see if the window needs redrawing.
Reimplemented from DisplayFrame.
|
virtual |
Set the dimensions for the display frame window
X | New X coordinate of window |
Y | New Y coordinate of window |
W | New width of window |
H | New height of window |
|
virtual |
|
virtual |
Enable/disable s key for toggling statistics
flag | Whether or not S key will toggle statistics |
|
virtual |
Only draw on events or if SetRedraw has been called. If this is called in a main loop, updates can occur very frequently if SetRedraw is continuously being called.
|
virtual |
Pans the display horizontally
offset | The new X position at the center of the window |
|
virtual |
Gets the horizontal position of the display at the center of the window
|
virtual |
Sets the mode flags for the window
flags | The mode flags |
|
protected |
When true a _farZ is automatically calculated.
|
protected |
When true a _nearZ is automatically calculated.
|
protected |
Current view of the canvas (e.g., ortho, perspective, eyepoint)
|
protected |
For better control over clipping and field of view, use a GlsEyePoint, but some limited functionality is available here Used for auto calculations
|
protected |
When true, the [Esc] key exits the application
|
protected |
Far clipping plane. Only meaningfull if _autoCalcVarZ is false
|
protected |
Field Of View. If 0.0 (the default), fov will be auto calculated.
|
protected |
Current "height" offset of window. Used for panning of display vertically in ortho mode.
|
protected |
Near clipping plane. Only meaningful if _autoCalcNearZ is false
|
protected |
A function pointer that will be called after the Draw method is called
|
protected |
A function pointer that will be called prior to the Draw method being called
|
protected |
Flag indicating if the window should be redrawn
|
protected |
When true, the [s] key toggles statistics
|
protected |
Frame interval, smoothed based on actual draw performance
|
protected |
Current "width" offset of window. Used for panning of display horizontally in ortho mode.
EventCompressor<DisplayFrame> eventCompressor |
Used for event compression. Not for general use by users.
|
protected |
The Spash screen image
OpenGLWindow* theWindow |
The window associated with this DisplayFrame