GL Studio C++ Runtime API
gls_state_manager.h
Go to the documentation of this file.
1/*! \file
2 \brief The disti::GlsStateManager factory class. Creates an instance of a
3state manager that manages the GL Studio runtime library's use of
4the OpenGL context, minimizing unnecessary state changes.
5
6 \par Copyright Information
7
8 Copyright (c) 2017 by The DiSTI Corporation.<br>
9 11301 Corporate Blvd; Suite 100<br>
10 Orlando, Florida 32817<br>
11 USA<br>
12 <br>
13 All rights reserved.<br>
14
15 This Software contains proprietary trade secrets of DiSTI and may not be
16reproduced, in whole or part, in any form, or by any means of electronic,
17mechanical, or otherwise, without the written permission of DiSTI. Said
18permission may be derived through the purchase of applicable DiSTI product
19licenses which detail the distribution rights of this content and any
20Derivative Works based on this or other copyrighted DiSTI Software.
21
22 NO WARRANTY. THE SOFTWARE IS PROVIDED "AS-IS," WITHOUT WARRANTY OF ANY KIND,
23AND ANY USE OF THIS SOFTWARE PRODUCT IS AT YOUR OWN RISK. TO THE MAXIMUM EXTENT
24PERMITTED BY APPLICABLE LAW, DISTI AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES
25AND CONDITIONS, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
26IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY AND/OR FITNESS FOR A
27PARTICULAR PURPOSE, TITLE, AND NON-INFRINGEMENT, WITH REGARD TO THE SOFTWARE.
28
29 LIMITATION OF LIABILITY. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW,
30IN NO EVENT SHALL DISTI OR ITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
31INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION,
32DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS
33INFORMATION, OR ANY OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR
34INABILITY TO USE THE SOFTWARE, EVEN IF DISTI HAS BEEN ADVISED OF THE POSSIBILITY
35OF SUCH DAMAGES. DISTI'S ENTIRE LIABILITY AND YOUR EXCLUSIVE REMEDY SHALL NOT
36EXCEED FIVE DOLLARS (US$5.00).
37
38 The aforementioned terms and restrictions are governed by the laws of the
39State of Florida and the United States of America. Use, distribution,
40duplication, or disclosure by the U. S. Government is subject to
41"Restricted Rights" as set forth in DFARS 252.227-7014(c)(1)(ii).
42
43*/
44
45#ifndef DISTI_GLS_STATE_MANAGER_H_INCLUDED
46#define DISTI_GLS_STATE_MANAGER_H_INCLUDED
47
49
50#ifdef GLES20
52#endif
53
54/// \cond INTERNAL
55#ifdef GLS_GL_DEBUGGING
56# define ERROR_CHECK() DistiAssert( GL_NO_ERROR == GlsStateManager::CheckError() );
57#else
58# define ERROR_CHECK()
59#endif
60/// \endcond
61
62namespace disti
63{
64/** The GlsStateManager singleton class that holds an instance of a
65 * state manager that manages the GL Studio runtime library's use of
66 * the OpenGL context, minimizing unnecessary state changes.
67 */
69{
70public:
71 /** The singleton accessor method for an implementation of an IGlsStateManager, which manages
72 * the GL Studio runtime library's use of the OpenGL context, minimizing unnecessary state changes
73 * \return Returns a pointer to the IGlsStateManager implementation singleton.
74 * For OpenGL ES 2.0, returns an implementation of an IGlsStateManagerES20
75 */
77
78 /// \return The value of glGetError(), and prints the value if not equal to GL_NO_ERROR.
79 GLS_EXPORT static GLenum CheckError();
80
81private:
82 /** ctor */
84
85 /** dtor */
87
88 // Creates the proper instance for management by GlsGlobals
89 static IGlsStateManager* CreateStateManager();
90 friend class GlsGlobals;
91};
92
93} // namespace disti
94
95#endif // DISTI_GLS_STATE_MANAGER_H_INCLUDED
Hold global objects so we can control order of destruction.
Definition: util.h:1917
Definition: gls_state_manager.h:69
static IGlsStateManager * Instance()
static GLenum CheckError()
Definition: gls_state_manager_interface.h:69
#define GLS_EXPORT
Macro denoting which functions should be visible from the runtime library.
Definition: gls_include.h:52
IGlsStateManager, interface to a state manager that manages the GL Studio runtime library's use of th...
IGlsStateManager, interface to a state manager that manages the GL Studio runtime library's use of th...
Force inclusion of the DirectShow library.
Definition: bmpimage.h:47