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  DISTI_DEPRECATED( "This identifier is forbidden by the C++ standard. Use BaseClass instead." )
129  typedef Group _BaseClass;
130  typedef Group BaseClass;
131 
132  /**
133  * Constructor.
134  *
135  * \param generateInstance Whether or not to generate an instance name
136  * for this mimic group
137  */
138  GLSGEN_GLSMIMICGROUP_EXPORT GlsMimicGroup( bool generateInstance = false );
139 
140  GLSGEN_GLSMIMICGROUP_EXPORT GlsMimicGroup( const GlsMimicGroup& that, const bool generateNames );
141 
142  /**
143  * Destructs a GlsMimicGroup object
144  */
145  virtual GLSGEN_GLSMIMICGROUP_EXPORT ~GlsMimicGroup();
146 
147  /**
148  * Provides a way to statically create an instance of the GlsMimicGroup
149  *
150  * \return an instance of a GlsMimicGroup
151  */
152  static GLSGEN_GLSMIMICGROUP_EXPORT DisplayObject* CreateInstance();
153 
154  /**
155  * \see DisplayObject
156  */
157  virtual GLSGEN_GLSMIMICGROUP_EXPORT void SetAvailableAttributes( unsigned int value );
158 
159  /**
160  * \see DisplayObject
161  */
162  virtual GLSGEN_GLSMIMICGROUP_EXPORT DisplayObject* CloneObject( bool generateNames = false );
163 
164  /**
165  * \see DisplayObject
166  */
167  virtual GLSGEN_GLSMIMICGROUP_EXPORT void CopyProperties( DisplayObject* src );
168 
169 #ifndef GLES
170  /**
171  * \see DisplayObject
172  */
173  virtual GLSGEN_GLSMIMICGROUP_EXPORT InterfaceListType* GetCppInterfaceDescription( InterfaceListType* addToThisList = NULL );
174 
175  /**
176  * \see DisplayObject
177  */
178  virtual GLSGEN_GLSMIMICGROUP_EXPORT void GetCppInterfaceDescriptionFree( InterfaceListType* array );
179 #endif
180 
181  /**
182  * \see DisplayObject
183  */
184  virtual GLSGEN_GLSMIMICGROUP_EXPORT void Draw( void );
185 
186  /**
187  * \see DisplayObject
188  */
189  virtual GLSGEN_GLSMIMICGROUP_EXPORT void SetValue( int spec, va_list& args );
190 
191  //////////////////////////////////////////////////
192  // GlsMimicGroup specific operations
193  //////////////////////////////////////////////////
194 
195  /**
196  * Accessor for the mimic texture width.
197  *
198  * \return the width, in pixels, of the mimic texture.
199  */
200  virtual GLSGEN_GLSMIMICGROUP_EXPORT unsigned int TextureWidth() const { return _textureWidth; }
201 
202  /**
203  * Set the mimic texture width.
204  *
205  * \param textureWidth the width, in pixels, of the mimic texture.
206  */
207  virtual GLSGEN_GLSMIMICGROUP_EXPORT void TextureWidth( unsigned int textureWidth );
208 
209  /**
210  * Accessor for the mimic texture height.
211  *
212  * \return the height, in pixels, of the mimic texture.
213  */
214  virtual GLSGEN_GLSMIMICGROUP_EXPORT unsigned int TextureHeight() const { return _textureHeight; }
215 
216  /**
217  * Set the mimic texture height.
218  *
219  * \param textureHeight the height, in pixels, of the mimic texture.
220  */
221  virtual GLSGEN_GLSMIMICGROUP_EXPORT void TextureHeight( unsigned int textureHeight );
222 
223  /**
224  * Whether or not the mimic will render a depth buffer.
225  *
226  * \return true if the mimic will render a depth buffer.
227  */
228  virtual GLSGEN_GLSMIMICGROUP_EXPORT bool HasDepthBuffer() const { return _hasDepthBuffer; }
229 
230  /**
231  * Set whether or not the mimic will render a depth buffer.
232  *
233  * \param hasDepthBuffer true if the mimic will render a depth buffer.
234  */
235  virtual GLSGEN_GLSMIMICGROUP_EXPORT void HasDepthBuffer( bool hasDepthBuffer );
236 
237  /**
238  * Whether or not the mimic will generate mip maps.
239  *
240  * \return true if the mimic will generate mip maps.
241  */
242  virtual GLSGEN_GLSMIMICGROUP_EXPORT bool GenerateMipMaps() const { return _generateMipMaps; }
243 
244  /**
245  * Set whether or not the mimic will generate mip maps.
246  *
247  * \param generate true if the mimic will generate mip maps.
248  */
249  virtual GLSGEN_GLSMIMICGROUP_EXPORT void GenerateMipMaps( bool generate );
250 
251  /**
252  * Whether or not a mimic polygon will be drawn.
253  *
254  * \return true if a mimic polygon will be drawn.
255  */
256  virtual GLSGEN_GLSMIMICGROUP_EXPORT bool DrawMimicGroupPolygon() const { return _drawMimicGroupPolygon; }
257 
258  /**
259  * Set whether or not a mimic polygon will be drawn.
260  *
261  * \param draw true if a mimic polygon will be drawn.
262  */
263  virtual GLSGEN_GLSMIMICGROUP_EXPORT void DrawMimicGroupPolygon( bool draw );
264 
265  /**
266  * Accessor for the mimic depth test settings.
267  *
268  * \return the depth settings
269  */
270  virtual GLSGEN_GLSMIMICGROUP_EXPORT unsigned char MimicGroupDepthTest() const { return _mimicGroupDepthTest; }
271 
272  /**
273  * Set the mimic depth test settings.
274  *
275  * \param depthSettings the depth settings
276  */
277  virtual GLSGEN_GLSMIMICGROUP_EXPORT void MimicGroupDepthTest( unsigned char depthSettings );
278 
279  /**
280  * Accessor for the mimic auto-redraw for conditional rendering settings.
281  *
282  * \return the depth settings
283  */
284  virtual GLSGEN_GLSMIMICGROUP_EXPORT bool AutoRedraw() const { return _autoRedraw; }
285 
286  /**
287  * Set the mimic auto-redraw for conditional rendering.
288  *
289  * \param autoRedrawSetting the enable to automatically update.
290  */
291  virtual GLSGEN_GLSMIMICGROUP_EXPORT void AutoRedraw( bool autoRedrawSetting );
292 
293  /**
294  * Accessor for the mimic scene background clear color.
295  *
296  * \return the RGBA color that the mimic will use to clear mimic scene background with
297  */
298  virtual GLSGEN_GLSMIMICGROUP_EXPORT GlsColor ClearColor() const { return _clearColor; }
299 
300  /**
301  * Set the mimic scene background clear color.
302  *
303  * \param color the RGBA color that the mimic will use to clear mimic scene background with
304  */
305  virtual GLSGEN_GLSMIMICGROUP_EXPORT void ClearColor( const GlsColor& color );
306 
307  /**
308  * Accessor for the GL Studio texture index the mimic will generate into.
309  *
310  * \return the GL Studio texture index the mimic will generate into. If -1, then mimic will generate its own texture.
311  */
312  virtual GLSGEN_GLSMIMICGROUP_EXPORT int AttachedTextureIndex() const { return _attachedTextureIndex; }
313 
314  /**
315  * Set the GL Studio texture index the mimic will generate into.
316  *
317  * \param textureIndex the GL Studio texture index to generate mimic into. If -1, then mimic will generate its own texture.
318  */
319  virtual GLSGEN_GLSMIMICGROUP_EXPORT void AttachedTextureIndex( int textureIndex );
320 
321  /**
322  * Whether or not the mimic is active for this group.
323  * If not active, mimic group behaves as a normal group
324  *
325  * \return true if mimic is active for this group
326  */
327  GLSGEN_GLSMIMICGROUP_EXPORT bool MimicGroupActive( void ) { return _mimicGroupActive; }
328 
329  /**
330  * Sets if mimic is active for this group
331  * If not active, mimic group behaves as a normal group
332  *
333  * \param activate whether or not to activate the mimic
334  */
335  GLSGEN_GLSMIMICGROUP_EXPORT void MimicGroupActive( bool activate );
336 
337  /**
338  * Set the bottom left corner of mimic scene region
339  *
340  * \param bottomLeftCorner (in object coordinates)
341  */
342  GLSGEN_GLSMIMICGROUP_EXPORT void BottomLeftCorner( const Vector& bottomLeftCorner );
343 
344  /**
345  * Accessor for the bottom left corner coordinate of the mimic scene region.
346  *
347  * \return the bottom left corner of mimic scene region (in object coordinates)
348  */
349  GLSGEN_GLSMIMICGROUP_EXPORT Vector BottomLeftCorner( void ) { return _bottomLeftCorner; }
350 
351  /**
352  * Set the top right corner of mimic scene region
353  *
354  * \param topRightCorner (in object coordinates)
355  */
356  GLSGEN_GLSMIMICGROUP_EXPORT void TopRightCorner( const Vector& topRightCorner );
357 
358  /**
359  * Accessor for the top right corner coordinate of the mimic scene region.
360  *
361  * \return the top right corner of mimic scene region (in object coordinates)
362  */
363  GLSGEN_GLSMIMICGROUP_EXPORT Vector TopRightCorner( void ) const { return _topRightCorner; }
364 
365  /**
366  * Whether or not the outline of the mimic polygon region should be shown in the editor.
367  *
368  * \return true if region should always be drawn in the editor
369  */
370  GLSGEN_GLSMIMICGROUP_EXPORT bool ShowOutline( void ) const { return _showOutline; }
371 
372  /**
373  * Set whether or not the mimic polygon region should always be drawn in the editor.
374  *
375  * \param showOutline true if outline should always be drawn in editor
376  */
377  GLSGEN_GLSMIMICGROUP_EXPORT void ShowOutline( bool showOutline );
378 
379  /**
380  * Whether or not the mimic group needs to redraw.
381  *
382  * \return true if the mimic group needs to redraw.
383  */
384  GLSGEN_GLSMIMICGROUP_EXPORT bool Redraw( void ) const { return _redraw; }
385 
386  /**
387  * Set whether or not the mimic group needs to redraw
388  *
389  * \param redraw the new redraw value
390  */
391  GLSGEN_GLSMIMICGROUP_EXPORT void Redraw( bool redraw );
392 
393  /**
394  * Whether or not the mimic group texture is RGB.
395  *
396  * \return true if the mimic group texture is RGB.
397  */
398  GLSGEN_GLSMIMICGROUP_EXPORT bool UseOpaqueTexture( void ) const { return _useOpaqueTexture; }
399 
400  /**
401  * Set whether the mimic group texture is RGB or RGBA
402  *
403  * \param opaque true for RGB, false for RGBA
404  */
405  GLSGEN_GLSMIMICGROUP_EXPORT void UseOpaqueTexture( bool opaque );
406 
407  /**
408  * \see DisplayObject
409  */
410  GLSGEN_GLSMIMICGROUP_EXPORT void SetPainter( GlsPainter* painter ) DISTI_METHOD_OVERRIDE;
411 
412  /**
413  * \see Group
414  */
415  virtual GLSGEN_GLSMIMICGROUP_EXPORT void InsertObject( DisplayObject* obj, bool reparent = true, bool recalculateBoundingbox = true, int loc = -1 ) DISTI_METHOD_OVERRIDE;
416 
417  /**
418  * \see Group
419  */
420  virtual GLSGEN_GLSMIMICGROUP_EXPORT void PushObject( DisplayObject* obj ) DISTI_METHOD_OVERRIDE;
421 
422  /**
423  * \see GlsPainter
424  */
425  GLSGEN_GLSMIMICGROUP_EXPORT void Invalidate() DISTI_METHOD_OVERRIDE;
426 
427  /**
428  * \see GlsPainter
429  */
430  GLSGEN_GLSMIMICGROUP_EXPORT bool IsInvalidated() const DISTI_METHOD_OVERRIDE;
431 
432 protected:
433  /**
434  * Set up the matrices for the root of the mimic scene. The mimic scene is drawn without regard to any
435  * parent matrices of the mimic group.
436  */
437  virtual GLSGEN_GLSMIMICGROUP_EXPORT void SetMatrices();
438 
439  /**
440  * Predraw case for when the mimic scene redraws
441  */
442  virtual GLSGEN_GLSMIMICGROUP_EXPORT void PreDrawMimicGroupChildren( const OpenGLMatrices& parentMatrices, Culler& culler );
443 
444  /**
445  * Set depth buffer settings when rendering the mimic polygon
446  */
447  GLSGEN_GLSMIMICGROUP_EXPORT void SetupMimicGroupDepthTest();
448 
449  /**
450  * Get the four corners of the region transformed by the current DCS and offset by the group's location
451  *
452  * \param topLeftCorner [out] receives top left corner
453  * \param topRightCorner [out] receives top right corner
454  * \param bottomRightCorner [out] receives bottom right corner
455  * \param bottomLeftCorner [out] receives bottom left corner
456  */
457  GLSGEN_GLSMIMICGROUP_EXPORT void GetRegionCorners( Vector& topLeftCorner, Vector& topRightCorner, Vector& bottomRightCorner, Vector& bottomLeftCorner );
458 
459  /**
460  * Apply texture settings for mimic polygon
461  */
462  GLSGEN_GLSMIMICGROUP_EXPORT void ApplyMimicGroupTextureSettings();
463 
464  /**
465  * Allocate and create the diffuse texture map
466  */
467  GLSGEN_GLSMIMICGROUP_EXPORT void CreateDiffuseTexture();
468 
469  /**
470  * Allocate and create the depth texture map
471  */
472  GLSGEN_GLSMIMICGROUP_EXPORT void CreateDepthTexture();
473 
474  /**
475  * Allocate and create the mimic quad
476  */
477  GLSGEN_GLSMIMICGROUP_EXPORT void CreateMimicGroupQuad();
478 
479  /**
480  * Allocate and create the frame buffer
481  */
482  GLSGEN_GLSMIMICGROUP_EXPORT void CreateFrameBuffer();
483 
484  /**
485  * Delete the frame buffer (if it has been bound)
486  */
487  GLSGEN_GLSMIMICGROUP_EXPORT void DeleteFrameBuffer();
488 
489  /**
490  * Redraw the scene
491  */
492  GLSGEN_GLSMIMICGROUP_EXPORT void RedrawScene();
493 
494  /**
495  * Draw the polygon for the mimic
496  */
497  GLSGEN_GLSMIMICGROUP_EXPORT void DrawPolygon();
498 
499  /**
500  * Regenerate the mip maps
501  */
502  GLSGEN_GLSMIMICGROUP_EXPORT void RegenerateMipMaps();
503 
504  /**
505  * \see DisplayObject
506  */
507  GLSGEN_GLSMIMICGROUP_EXPORT DisplayObject* handle( DisplayEvent* displayEvent );
508 
509  /**
510  * The GlsMimicGroup requres specific extensions of OpenGL which are not required
511  * elsewhere in GL Studio. This method will check that those features are supported.
512  *
513  * \return True if the required features are supported.
514  */
515  GLSGEN_GLSMIMICGROUP_EXPORT bool RequiredGlFeaturesSupported();
516 
517  /**
518  * Logs the unsupported features that the GlsMimicGroup class requires to function properly.
519  */
520  GLSGEN_GLSMIMICGROUP_EXPORT void LogUnsupportedFeatures();
521 
522  /**
523  * Determines if vertex buffer objects are supported on this platform.
524  *
525  * \return True if vertex buffer objects are supported on this platform.
526  */
527  GLSGEN_GLSMIMICGROUP_EXPORT bool VertexBuffersAreSupported();
528 
529  /**
530  * Draw the mimic group. Care should be taken to call this method only when it is safe to draw
531  * the mimic group. The Draw() has the conditional structure necessary to
532  * make this decision.
533  *
534  */
535  GLSGEN_GLSMIMICGROUP_EXPORT void DrawMimicGroup();
536 
537 #ifdef GLES
538  /**
539  * Set a single attribute from the GLO file.
540  *
541  * \param data The attribute to set and its associated data.
542  */
543  virtual GLSGEN_GLSMIMICGROUP_EXPORT void SetFromGloData( GlsGloFileAttribute& data );
544 #endif
545 
546  bool _mimicGroupActive; /*< Whether or not the mimic is active. If not active, mimic group behaves as a normal group */
547  bool _autoRedraw; /*< Whether or not the mimic group should automatically update via conditional rendering */
548  bool _redraw; /*< Whether or not the mimic scene needs to redraw */
549  bool _hasDepthBuffer; /*< Whether or not the mimic will render a depth buffer */
550  bool _generateMipMaps; /*< Whether or not the mimic will generate mip maps */
551  bool _showOutline; /*< Outline is only visible in editor */
552  bool _drawMimicGroupPolygon; /*< Whether or not a mimic polygon will be drawn. */
553  unsigned char _mimicGroupDepthTest; /*< Mimic depth test settings (affects whether or not the mimic polygon is depth tested) */
554  bool _textureIndexChanged;
555  GlsColor _clearColor; /*< RGBA color to clear mimic scene background with */
556  Vector _bottomLeftCorner; /*< Bottom Left Corner of the mimic scene region */
557  Vector _topRightCorner; /*< Top Right Corner of the mimic scene region */
558  int _attachedTextureIndex; /*< GL Studio texture index to generate mimic into. If -1, then mimic will generate its own texture. */
559  unsigned int _textureWidth; /*< Width of the mimic texture in pixels (MUST BE power of two) */
560  unsigned int _textureHeight; /*< Height of the mimic texture in pixels (MUST BE power of two) */
561  unsigned int _frameBufferHandle; /*< Handle for frame buffer object */
562  unsigned int _depthBufferHandle; /*< Handle for depth buffer object */
563  Image* _mimicGroupTexture; /*< Image object for texture */
564  unsigned int _vertexBufferHandle; /*< Vertex buffer handle for mimic quad */
565  bool _frameBuffersEnabledAndAttached; /**< True when frame buffer support is detected and frame buffers were attached successfully */
566  bool _overrideMimicGroupActive; /**< True if the mimic group is not allowed to be activated due to platform restrictions. */
567  bool _useOpaqueTexture; /*< True if the atached frame buffer texture should be crated as GL_RGB, False will create the texture as GL_RGBA */
568 
569  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. */
570 };
571 
572 } // namespace disti
573 
574 #endif
Definition: cull.h:49
virtual GlsColor ClearColor() const
Definition: gls_mimic_group.h:298
Definition: image.h:162
#define DISTI_DEPRECATED(msg)
Defines whether this compiler supports the C++14 deprecated attribute.
Definition: gls_cpp_lang_support.h:436
void Invalidate() DISTI_METHOD_OVERRIDE
virtual ~GlsMimicGroup()
static DisplayObject * CreateInstance()
bool ShowOutline(void) const
Definition: gls_mimic_group.h:370
Definition: dynamic_array.h:66
virtual unsigned char MimicGroupDepthTest() const
Definition: gls_mimic_group.h:270
The disti::Group class. Implements groups of objects.
Class to contain current OpenGL view, projection and draw matrices.
Definition: util.h:296
void ApplyMimicGroupTextureSettings()
virtual bool AutoRedraw() const
Definition: gls_mimic_group.h:284
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:242
Definition: gls_glo_file.h:988
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:566
virtual bool DrawMimicGroupPolygon() const
Definition: gls_mimic_group.h:256
void SetupMimicGroupDepthTest()
virtual bool HasDepthBuffer() const
Definition: gls_mimic_group.h:228
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:200
Utility for common frame buffer support.
virtual void Draw(void)
virtual void PushObject(DisplayObject *obj) DISTI_METHOD_OVERRIDE
Definition: events.h:112
bool Redraw(void) const
Definition: gls_mimic_group.h:384
Definition: gls_color.h:53
bool MimicGroupActive(void)
Definition: gls_mimic_group.h:327
Vector TopRightCorner(void) const
Definition: gls_mimic_group.h:363
void SetPainter(GlsPainter *painter) DISTI_METHOD_OVERRIDE
The gls_auto_lib.
bool _frameBuffersEnabledAndAttached
Definition: gls_mimic_group.h:565
virtual unsigned int TextureHeight() const
Definition: gls_mimic_group.h:214
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:349
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 IsInvalidated() const DISTI_METHOD_OVERRIDE
bool UseOpaqueTexture(void) const
Definition: gls_mimic_group.h:398
virtual int AttachedTextureIndex() const
Definition: gls_mimic_group.h:312
void GetRegionCorners(Vector &topLeftCorner, Vector &topRightCorner, Vector &bottomRightCorner, Vector &bottomLeftCorner)
static bool _unsupportedLogged
Definition: gls_mimic_group.h:569