GL Studio C++ Runtime API
gls_mimic_group.h
Go to the documentation of this file.
1 /*! \file
2  \brief
3 
4  \par Copyright Information
5 
6  Copyright (c) 2017 by The DiSTI Corporation.<br>
7  11301 Corporate Blvd; Suite 100<br>
8  Orlando, Florida 32817<br>
9  USA<br>
10  <br>
11  All rights reserved.<br>
12 
13  This Software contains proprietary trade secrets of DiSTI and may not be
14 reproduced, in whole or part, in any form, or by any means of electronic,
15 mechanical, or otherwise, without the written permission of DiSTI. Said
16 permission may be derived through the purchase of applicable DiSTI product
17 licenses which detail the distribution rights of this content and any
18 Derivative Works based on this or other copyrighted DiSTI Software.
19 
20  NO WARRANTY. THE SOFTWARE IS PROVIDED "AS-IS," WITHOUT WARRANTY OF ANY KIND,
21 AND ANY USE OF THIS SOFTWARE PRODUCT IS AT YOUR OWN RISK. TO THE MAXIMUM EXTENT
22 PERMITTED BY APPLICABLE LAW, DISTI AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES
23 AND CONDITIONS, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
24 IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY AND/OR FITNESS FOR A
25 PARTICULAR PURPOSE, TITLE, AND NON-INFRINGEMENT, WITH REGARD TO THE SOFTWARE.
26 
27  LIMITATION OF LIABILITY. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW,
28 IN NO EVENT SHALL DISTI OR ITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
29 INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION,
30 DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS
31 INFORMATION, OR ANY OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR
32 INABILITY TO USE THE SOFTWARE, EVEN IF DISTI HAS BEEN ADVISED OF THE POSSIBILITY
33 OF SUCH DAMAGES. DISTI'S ENTIRE LIABILITY AND YOUR EXCLUSIVE REMEDY SHALL NOT
34 EXCEED FIVE DOLLARS (US$5.00).
35 
36  The aforementioned terms and restrictions are governed by the laws of the
37 State of Florida and the United States of America.
38 
39 */
40 
41 #ifndef INCLUDED_GLS_MIMIC_GROUP_H
42 #define INCLUDED_GLS_MIMIC_GROUP_H
43 
44 #include "frame_buffer_utility.h"
45 
46 #include "gls_cpp_lang_support.h"
47 #include "group.h"
48 #include "image.h"
49 
50 //////////////////// Provides support for creating DLLs ////////////////////////
51 #if( defined( GLSGEN_EXPORT_GLSMIMICGROUP ) || defined( GLSGEN_IMPORT_GLSMIMICGROUP ) || defined( GLS_EXPORT_GENERATED ) || defined( GLS_IMPORT_GENERATED ) ) \
52  && defined( _MSC_VER )
53 # if defined( GLSGEN_EXPORT_GLSMIMICGROUP ) || defined( GLS_EXPORT_GENERATED )
54 # define GLSGEN_GLSMIMICGROUP_EXPORT __declspec( dllexport )
55 # else
56 # define GLSGEN_GLSMIMICGROUP_EXPORT __declspec( dllimport )
57 # endif
58 #else
59 # define GLSGEN_GLSMIMICGROUP_EXPORT
60 #endif
61 ///////////////////////////////////////////////////////////////////////////////
62 
63 #define LIB_BASE_NAME "gls_mimic_group"
64 #include "gls_auto_lib.h"
65 #undef LIB_BASE_NAME
66 
67 namespace disti
68 {
69 #ifdef GLES
70 class GlsGloFile;
71 #endif
72 
73 // SetValue enumerations
74 enum
75 {
76  GLS_MIMIC_GROUP_STATE = GLS_LAST_INITIALIZER + 1,
77  GLS_MIMIC_GROUP_MIMIC_ACTIVE,
78  GLS_MIMIC_GROUP_BOTTOM_LEFT_CORNER,
79  GLS_MIMIC_GROUP_TOP_RIGHT_CORNER,
80  GLS_MIMIC_GROUP_SHOW_OUTLINE,
81  GLS_MIMIC_GROUP_TEXTURE_HEIGHT,
82  GLS_MIMIC_GROUP_TEXTURE_WIDTH,
83  GLS_MIMIC_GROUP_HAS_DEPTH_BUFFER,
84  GLS_MIMIC_GROUP_DEPTH_TEST,
85  GLS_MIMIC_GROUP_GENERATE_MIPMAPS,
86  GLS_MIMIC_GROUP_DRAW_MIMIC_POLYGON,
87  GLS_MIMIC_GROUP_ATTACHED_TEXTURE_INDEX,
88  GLS_MIMIC_GROUP_CLEAR_COLOR,
89  GLS_MIMIC_GROUP_USE_OPAQUE_TEXTURE,
90  GLS_MIMIC_GROUP_MIMIC_AUTO_REDRAW
91 };
92 
93 /**
94 * The GlsMimicGroup class provides a way to group objects that change
95 * infrequently into a single textured polygon such that performance is increased due
96 * to not having to render the objects every frame. Instead, since all of the objects
97 * in the group are replaced with a single texture, performance is saved by updating the texture
98 * ONLY through handling a display event of name "MimicGroupUpdate". Whenever an object
99 * placed in this group is modified, you must write code to emit a "MimicGroupUpdate" ObjectEvent
100 * so that any changes made to its appearance will be reflected in the rendered texture.
101 *
102 * For example:
103 * EmitObjectEvent( objectThatChanged, "MimicGroupUpdate" );
104 *
105 * Picking and event handling for objects within the GlsMimicGroup work the same as
106 * for a regular Group, so it can contain interactive objects such as buttons, switches, etc.
107 * The GlsMimicGroup will only redraw the texture when it receives a "MimicGroupUpdate"
108 * ObjectEvent so you must write code to emit these events whenever a
109 * press, toggle, etc. affect the appearance of the object.
110 *
111 * The GlsMimicGroup can contain 2D or 3D objects. All of these objects will be replaced
112 * with a 2D texture polygon so the GlsMimicGroup is best suited for use with panels that are mostly 2D.
113 * The GlsMimicGroup can also be useful with a collection of 3D objects as long as the
114 * GlsMimicGroup remains screen-aligned.
115 *
116 * On older hardware that does not support the render-to-texture capabilities required by the
117 * GlsMimicGroup, the GlsMimicGroup will fall-back to rendering like a regular Group.
118 */
119 class GlsMimicGroup : public Group
120  , virtual public GlsPainter
121 {
122 private:
123  GlsMimicGroup& operator=( const GlsMimicGroup& ) DISTI_SPECIAL_MEM_FUN_DELETE;
124  GlsMimicGroup( const GlsMimicGroup& ) DISTI_SPECIAL_MEM_FUN_DELETE;
125 
126 public:
127  friend class GlsMimicGroupEditor;
128  typedef Group _BaseClass;
129 
130  /**
131  * Constructor.
132  *
133  * \param generateInstance Whether or not to generate an instance name
134  * for this mimic group
135  */
136  GLSGEN_GLSMIMICGROUP_EXPORT GlsMimicGroup( bool generateInstance = false );
137 
138  GLSGEN_GLSMIMICGROUP_EXPORT GlsMimicGroup( const GlsMimicGroup& that, const bool generateNames );
139 
140  /**
141  * Destructs a GlsMimicGroup object
142  */
143  virtual GLSGEN_GLSMIMICGROUP_EXPORT ~GlsMimicGroup();
144 
145  /**
146  * Provides a way to statically create an instance of the GlsMimicGroup
147  *
148  * \return an instance of a GlsMimicGroup
149  */
150  static GLSGEN_GLSMIMICGROUP_EXPORT DisplayObject* CreateInstance();
151 
152  /**
153  * \see DisplayObject
154  */
155  virtual GLSGEN_GLSMIMICGROUP_EXPORT void SetAvailableAttributes( unsigned int value );
156 
157  /**
158  * \see DisplayObject
159  */
160  virtual GLSGEN_GLSMIMICGROUP_EXPORT DisplayObject* CloneObject( bool generateNames = false );
161 
162  /**
163  * \see DisplayObject
164  */
165  virtual GLSGEN_GLSMIMICGROUP_EXPORT void CopyProperties( DisplayObject* src );
166 
167 #ifndef GLES
168  /**
169  * \see DisplayObject
170  */
171  virtual GLSGEN_GLSMIMICGROUP_EXPORT InterfaceListType* GetCppInterfaceDescription( InterfaceListType* addToThisList = NULL );
172 
173  /**
174  * \see DisplayObject
175  */
176  virtual GLSGEN_GLSMIMICGROUP_EXPORT void GetCppInterfaceDescriptionFree( InterfaceListType* array );
177 #endif
178 
179  /**
180  * \see DisplayObject
181  */
182  virtual GLSGEN_GLSMIMICGROUP_EXPORT void Draw( void );
183 
184  /**
185  * \see DisplayObject
186  */
187  virtual GLSGEN_GLSMIMICGROUP_EXPORT void SetValue( int spec, va_list& args );
188 
189  //////////////////////////////////////////////////
190  // GlsMimicGroup specific operations
191  //////////////////////////////////////////////////
192 
193  /**
194  * Accessor for the mimic texture width.
195  *
196  * \return the width, in pixels, of the mimic texture.
197  */
198  virtual GLSGEN_GLSMIMICGROUP_EXPORT unsigned int TextureWidth() const { return _textureWidth; }
199 
200  /**
201  * Set the mimic texture width.
202  *
203  * \param textureWidth the width, in pixels, of the mimic texture.
204  */
205  virtual GLSGEN_GLSMIMICGROUP_EXPORT void TextureWidth( unsigned int textureWidth );
206 
207  /**
208  * Accessor for the mimic texture height.
209  *
210  * \return the height, in pixels, of the mimic texture.
211  */
212  virtual GLSGEN_GLSMIMICGROUP_EXPORT unsigned int TextureHeight() const { return _textureHeight; }
213 
214  /**
215  * Set the mimic texture height.
216  *
217  * \param textureHeight the height, in pixels, of the mimic texture.
218  */
219  virtual GLSGEN_GLSMIMICGROUP_EXPORT void TextureHeight( unsigned int textureHeight );
220 
221  /**
222  * Whether or not the mimic will render a depth buffer.
223  *
224  * \return true if the mimic will render a depth buffer.
225  */
226  virtual GLSGEN_GLSMIMICGROUP_EXPORT bool HasDepthBuffer() const { return _hasDepthBuffer; }
227 
228  /**
229  * Set whether or not the mimic will render a depth buffer.
230  *
231  * \param hasDepthBuffer true if the mimic will render a depth buffer.
232  */
233  virtual GLSGEN_GLSMIMICGROUP_EXPORT void HasDepthBuffer( bool hasDepthBuffer );
234 
235  /**
236  * Whether or not the mimic will generate mip maps.
237  *
238  * \return true if the mimic will generate mip maps.
239  */
240  virtual GLSGEN_GLSMIMICGROUP_EXPORT bool GenerateMipMaps() const { return _generateMipMaps; }
241 
242  /**
243  * Set whether or not the mimic will generate mip maps.
244  *
245  * \param generate true if the mimic will generate mip maps.
246  */
247  virtual GLSGEN_GLSMIMICGROUP_EXPORT void GenerateMipMaps( bool generate );
248 
249  /**
250  * Whether or not a mimic polygon will be drawn.
251  *
252  * \return true if a mimic polygon will be drawn.
253  */
254  virtual GLSGEN_GLSMIMICGROUP_EXPORT bool DrawMimicGroupPolygon() const { return _drawMimicGroupPolygon; }
255 
256  /**
257  * Set whether or not a mimic polygon will be drawn.
258  *
259  * \param draw true if a mimic polygon will be drawn.
260  */
261  virtual GLSGEN_GLSMIMICGROUP_EXPORT void DrawMimicGroupPolygon( bool draw );
262 
263  /**
264  * Accessor for the mimic depth test settings.
265  *
266  * \return the depth settings
267  */
268  virtual GLSGEN_GLSMIMICGROUP_EXPORT unsigned char MimicGroupDepthTest() const { return _mimicGroupDepthTest; }
269 
270  /**
271  * Set the mimic depth test settings.
272  *
273  * \param depthSettings the depth settings
274  */
275  virtual GLSGEN_GLSMIMICGROUP_EXPORT void MimicGroupDepthTest( unsigned char depthSettings );
276 
277  /**
278  * Accessor for the mimic auto-redraw for conditional rendering settings.
279  *
280  * \return the depth settings
281  */
282  virtual GLSGEN_GLSMIMICGROUP_EXPORT bool AutoRedraw() const { return _autoRedraw; }
283 
284  /**
285  * Set the mimic auto-redraw for conditional rendering.
286  *
287  * \param autoRedrawSetting the enable to automatically update.
288  */
289  virtual GLSGEN_GLSMIMICGROUP_EXPORT void AutoRedraw( bool autoRedrawSetting );
290 
291  /**
292  * Accessor for the mimic scene background clear color.
293  *
294  * \return the RGBA color that the mimic will use to clear mimic scene background with
295  */
296  virtual GLSGEN_GLSMIMICGROUP_EXPORT GlsColor ClearColor() const { return _clearColor; }
297 
298  /**
299  * Set the mimic scene background clear color.
300  *
301  * \param color the RGBA color that the mimic will use to clear mimic scene background with
302  */
303  virtual GLSGEN_GLSMIMICGROUP_EXPORT void ClearColor( const GlsColor& color );
304 
305  /**
306  * Accessor for the GL Studio texture index the mimic will generate into.
307  *
308  * \return the GL Studio texture index the mimic will generate into. If -1, then mimic will generate its own texture.
309  */
310  virtual GLSGEN_GLSMIMICGROUP_EXPORT int AttachedTextureIndex() const { return _attachedTextureIndex; }
311 
312  /**
313  * Set the GL Studio texture index the mimic will generate into.
314  *
315  * \param textureIndex the GL Studio texture index to generate mimic into. If -1, then mimic will generate its own texture.
316  */
317  virtual GLSGEN_GLSMIMICGROUP_EXPORT void AttachedTextureIndex( int textureIndex );
318 
319  /**
320  * Whether or not the mimic is active for this group.
321  * If not active, mimic group behaves as a normal group
322  *
323  * \return true if mimic is active for this group
324  */
325  GLSGEN_GLSMIMICGROUP_EXPORT bool MimicGroupActive( void ) { return _mimicGroupActive; }
326 
327  /**
328  * Sets if mimic is active for this group
329  * If not active, mimic group behaves as a normal group
330  *
331  * \param activate whether or not to activate the mimic
332  */
333  GLSGEN_GLSMIMICGROUP_EXPORT void MimicGroupActive( bool activate );
334 
335  /**
336  * Set the bottom left corner of mimic scene region
337  *
338  * \param bottomLeftCorner (in object coordinates)
339  */
340  GLSGEN_GLSMIMICGROUP_EXPORT void BottomLeftCorner( const Vector& bottomLeftCorner );
341 
342  /**
343  * Accessor for the bottom left corner coordinate of the mimic scene region.
344  *
345  * \return the bottom left corner of mimic scene region (in object coordinates)
346  */
347  GLSGEN_GLSMIMICGROUP_EXPORT Vector BottomLeftCorner( void ) { return _bottomLeftCorner; }
348 
349  /**
350  * Set the top right corner of mimic scene region
351  *
352  * \param topRightCorner (in object coordinates)
353  */
354  GLSGEN_GLSMIMICGROUP_EXPORT void TopRightCorner( const Vector& topRightCorner );
355 
356  /**
357  * Accessor for the top right corner coordinate of the mimic scene region.
358  *
359  * \return the top right corner of mimic scene region (in object coordinates)
360  */
361  GLSGEN_GLSMIMICGROUP_EXPORT Vector TopRightCorner( void ) const { return _topRightCorner; }
362 
363  /**
364  * Whether or not the outline of the mimic polygon region should be shown in the editor.
365  *
366  * \return true if region should always be drawn in the editor
367  */
368  GLSGEN_GLSMIMICGROUP_EXPORT bool ShowOutline( void ) const { return _showOutline; }
369 
370  /**
371  * Set whether or not the mimic polygon region should always be drawn in the editor.
372  *
373  * \param showOutline true if outline should always be drawn in editor
374  */
375  GLSGEN_GLSMIMICGROUP_EXPORT void ShowOutline( bool showOutline );
376 
377  /**
378  * Whether or not the mimic group needs to redraw.
379  *
380  * \return true if the mimic group needs to redraw.
381  */
382  GLSGEN_GLSMIMICGROUP_EXPORT bool Redraw( void ) const { return _redraw; }
383 
384  /**
385  * Set whether or not the mimic group needs to redraw
386  *
387  * \param redraw the new redraw value
388  */
389  GLSGEN_GLSMIMICGROUP_EXPORT void Redraw( bool redraw );
390 
391  /**
392  * Whether or not the mimic group texture is RGB.
393  *
394  * \return true if the mimic group texture is RGB.
395  */
396  GLSGEN_GLSMIMICGROUP_EXPORT bool UseOpaqueTexture( void ) const { return _useOpaqueTexture; }
397 
398  /**
399  * Set whether the mimic group texture is RGB or RGBA
400  *
401  * \param opaque true for RGB, false for RGBA
402  */
403  GLSGEN_GLSMIMICGROUP_EXPORT void UseOpaqueTexture( bool opaque );
404 
405  /**
406  * \see DisplayObject
407  */
408  GLSGEN_GLSMIMICGROUP_EXPORT void SetPainter( GlsPainter* painter ) DISTI_METHOD_OVERRIDE;
409 
410  /**
411  * \see Group
412  */
413  virtual GLSGEN_GLSMIMICGROUP_EXPORT void InsertObject( DisplayObject* obj, bool reparent = true, bool recalculateBoundingbox = true, int loc = -1 ) DISTI_METHOD_OVERRIDE;
414 
415  /**
416  * \see Group
417  */
418  virtual GLSGEN_GLSMIMICGROUP_EXPORT void PushObject( DisplayObject* obj ) DISTI_METHOD_OVERRIDE;
419 
420  /**
421  * Cause the frame buffer to be regenerated and the scene to be redrawn
422  */
423  GLSGEN_GLSMIMICGROUP_EXPORT void Invalidate() DISTI_METHOD_OVERRIDE;
424 
425 protected:
426  /**
427  * Set up the matrices for the root of the mimic scene. The mimic scene is drawn without regard to any
428  * parent matrices of the mimic group.
429  */
430  virtual GLSGEN_GLSMIMICGROUP_EXPORT void SetMatrices();
431 
432  /**
433  * Predraw case for when the mimic scene redraws
434  */
435  virtual GLSGEN_GLSMIMICGROUP_EXPORT void PreDrawMimicGroupChildren( const OpenGLMatrices& parentMatrices, Culler& culler );
436 
437  /**
438  * Set depth buffer settings when rendering the mimic polygon
439  */
440  GLSGEN_GLSMIMICGROUP_EXPORT void SetupMimicGroupDepthTest();
441 
442  /**
443  * Get the four corners of the region transformed by the current DCS and offset by the group's location
444  *
445  * \param topLeftCorner [out] receives top left corner
446  * \param topRightCorner [out] receives top right corner
447  * \param bottomRightCorner [out] receives bottom right corner
448  * \param bottomLeftCorner [out] receives bottom left corner
449  */
450  GLSGEN_GLSMIMICGROUP_EXPORT void GetRegionCorners( Vector& topLeftCorner, Vector& topRightCorner, Vector& bottomRightCorner, Vector& bottomLeftCorner );
451 
452  /**
453  * Apply texture settings for mimic polygon
454  */
455  GLSGEN_GLSMIMICGROUP_EXPORT void ApplyMimicGroupTextureSettings();
456 
457  /**
458  * Allocate and create the diffuse texture map
459  */
460  GLSGEN_GLSMIMICGROUP_EXPORT void CreateDiffuseTexture();
461 
462  /**
463  * Allocate and create the depth texture map
464  */
465  GLSGEN_GLSMIMICGROUP_EXPORT void CreateDepthTexture();
466 
467  /**
468  * Allocate and create the mimic quad
469  */
470  GLSGEN_GLSMIMICGROUP_EXPORT void CreateMimicGroupQuad();
471 
472  /**
473  * Allocate and create the frame buffer
474  */
475  GLSGEN_GLSMIMICGROUP_EXPORT void CreateFrameBuffer();
476 
477  /**
478  * Delete the frame buffer (if it has been bound)
479  */
480  GLSGEN_GLSMIMICGROUP_EXPORT void DeleteFrameBuffer();
481 
482  /**
483  * Redraw the scene
484  */
485  GLSGEN_GLSMIMICGROUP_EXPORT void RedrawScene();
486 
487  /**
488  * Draw the polygon for the mimic
489  */
490  GLSGEN_GLSMIMICGROUP_EXPORT void DrawPolygon();
491 
492  /**
493  * Regenerate the mip maps
494  */
495  GLSGEN_GLSMIMICGROUP_EXPORT void RegenerateMipMaps();
496 
497  /**
498  * \see DisplayObject
499  */
500  GLSGEN_GLSMIMICGROUP_EXPORT DisplayObject* handle( DisplayEvent* displayEvent );
501 
502  /**
503  * The GlsMimicGroup requres specific extensions of OpenGL which are not required
504  * elsewhere in GL Studio. This method will check that those features are supported.
505  *
506  * \return True if the required features are supported.
507  */
508  GLSGEN_GLSMIMICGROUP_EXPORT bool RequiredGlFeaturesSupported();
509 
510  /**
511  * Logs the unsupported features that the GlsMimicGroup class requires to function properly.
512  */
513  GLSGEN_GLSMIMICGROUP_EXPORT void LogUnsupportedFeatures();
514 
515  /**
516  * Determines if vertex buffer objects are supported on this platform.
517  *
518  * \return True if vertex buffer objects are supported on this platform.
519  */
520  GLSGEN_GLSMIMICGROUP_EXPORT bool VertexBuffersAreSupported();
521 
522  /**
523  * Draw the mimic group. Care should be taken to call this method only when it is safe to draw
524  * the mimic group. The Draw() has the conditional structure necessary to
525  * make this decision.
526  *
527  */
528  GLSGEN_GLSMIMICGROUP_EXPORT void DrawMimicGroup();
529 
530 #ifdef GLES
531  /**
532  * Set a single attribute from the GLO file.
533  *
534  * \param data The attribute to set and its associated data.
535  */
536  virtual GLSGEN_GLSMIMICGROUP_EXPORT void SetFromGloData( GlsGloFileAttribute& data );
537 #endif
538 
539  bool _mimicGroupActive; /*< Whether or not the mimic is active. If not active, mimic group behaves as a normal group */
540  bool _autoRedraw; /*< Whether or not the mimic group should automatically update via conditional rendering */
541  bool _redraw; /*< Whether or not the mimic scene needs to redraw */
542  bool _hasDepthBuffer; /*< Whether or not the mimic will render a depth buffer */
543  bool _generateMipMaps; /*< Whether or not the mimic will generate mip maps */
544  bool _showOutline; /*< Outline is only visible in editor */
545  bool _drawMimicGroupPolygon; /*< Whether or not a mimic polygon will be drawn. */
546  unsigned char _mimicGroupDepthTest; /*< Mimic depth test settings (affects whether or not the mimic polygon is depth tested) */
547  bool _textureIndexChanged;
548  GlsColor _clearColor; /*< RGBA color to clear mimic scene background with */
549  Vector _bottomLeftCorner; /*< Bottom Left Corner of the mimic scene region */
550  Vector _topRightCorner; /*< Top Right Corner of the mimic scene region */
551  int _attachedTextureIndex; /*< GL Studio texture index to generate mimic into. If -1, then mimic will generate its own texture. */
552  unsigned int _textureWidth; /*< Width of the mimic texture in pixels (MUST BE power of two) */
553  unsigned int _textureHeight; /*< Height of the mimic texture in pixels (MUST BE power of two) */
554  unsigned int _frameBufferHandle; /*< Handle for frame buffer object */
555  unsigned int _depthBufferHandle; /*< Handle for depth buffer object */
556  Image* _mimicGroupTexture; /*< Image object for texture */
557  unsigned int _vertexBufferHandle; /*< Vertex buffer handle for mimic quad */
558  bool _frameBuffersEnabledAndAttached; /**< True when frame buffer support is detected and frame buffers were attached successfully */
559  bool _overrideMimicGroupActive; /**< True if the mimic group is not allowed to be activated due to platform restrictions. */
560  bool _useOpaqueTexture; /*< True if the atached frame buffer texture should be crated as GL_RGB, False will create the texture as GL_RGBA */
561 
562  static bool _unsupportedLogged; /**< True if a warning has been logged to users that the mimic group feature is not supported. This keeps us from spamming the user about not being supported. */
563 };
564 
565 } // namespace disti
566 
567 #endif
Definition: cull.h:49
virtual GlsColor ClearColor() const
Definition: gls_mimic_group.h:296
Definition: image.h:162
void Invalidate() DISTI_METHOD_OVERRIDE
virtual ~GlsMimicGroup()
static DisplayObject * CreateInstance()
bool ShowOutline(void) const
Definition: gls_mimic_group.h:368
Definition: dynamic_array.h:62
virtual unsigned char MimicGroupDepthTest() const
Definition: gls_mimic_group.h:268
The disti::Group class. Implements groups of objects.
Class to contain current OpenGL view, projection and draw matrices.
Definition: util.h:301
void ApplyMimicGroupTextureSettings()
virtual bool AutoRedraw() const
Definition: gls_mimic_group.h:282
DisplayObject * handle(DisplayEvent *displayEvent)
Definition: display.h:98
virtual void PreDrawMimicGroupChildren(const OpenGLMatrices &parentMatrices, Culler &culler)
virtual bool GenerateMipMaps() const
Definition: gls_mimic_group.h:240
Definition: gls_glo_file.h:982
Definition: gls_mimic_group.h:119
virtual void SetAvailableAttributes(unsigned int value)
The Image class. All textures are converted internally into Images.
Definition: gls_painter.h:51
bool _overrideMimicGroupActive
Definition: gls_mimic_group.h:559
virtual bool DrawMimicGroupPolygon() const
Definition: gls_mimic_group.h:254
void SetupMimicGroupDepthTest()
virtual bool HasDepthBuffer() const
Definition: gls_mimic_group.h:226
virtual void SetMatrices()
virtual void CopyProperties(DisplayObject *src)
virtual void GetCppInterfaceDescriptionFree(InterfaceListType *array)
virtual void InsertObject(DisplayObject *obj, bool reparent=true, bool recalculateBoundingbox=true, int loc=-1) DISTI_METHOD_OVERRIDE
virtual unsigned int TextureWidth() const
Definition: gls_mimic_group.h:198
Utility for common frame buffer support.
virtual void Draw(void)
virtual void PushObject(DisplayObject *obj) DISTI_METHOD_OVERRIDE
Definition: events.h:111
bool Redraw(void) const
Definition: gls_mimic_group.h:382
Definition: gls_color.h:53
bool MimicGroupActive(void)
Definition: gls_mimic_group.h:325
Vector TopRightCorner(void) const
Definition: gls_mimic_group.h:361
void SetPainter(GlsPainter *painter) DISTI_METHOD_OVERRIDE
The gls_auto_lib.
bool _frameBuffersEnabledAndAttached
Definition: gls_mimic_group.h:558
virtual unsigned int TextureHeight() const
Definition: gls_mimic_group.h:212
virtual void SetValue(int spec, va_list &args)
Definition: group.h:52
Definition: vertex.h:84
virtual InterfaceListType * GetCppInterfaceDescription(InterfaceListType *addToThisList=NULL)
bool RequiredGlFeaturesSupported()
Vector BottomLeftCorner(void)
Definition: gls_mimic_group.h:347
virtual DisplayObject * CloneObject(bool generateNames=false)
Macros and helper code to determine what subset of C++11/14/17 is available.
bool VertexBuffersAreSupported()
Definition: bmpimage.h:46
bool UseOpaqueTexture(void) const
Definition: gls_mimic_group.h:396
virtual int AttachedTextureIndex() const
Definition: gls_mimic_group.h:310
void GetRegionCorners(Vector &topLeftCorner, Vector &topRightCorner, Vector &bottomRightCorner, Vector &bottomLeftCorner)
static bool _unsupportedLogged
Definition: gls_mimic_group.h:562