Gateware Libraries  R6.5A
Beta Build
GOpenGLSurface.h
1 #ifndef GOPENGLSURFACE_H
2 #define GOPENGLSURFACE_H
3 
15 #include "../../Interface/G_Core/GListener.h"
17 #include "../../Interface/G_System/GWindow.h"
18 #include "GGraphicsDefines.h"
19 
21 namespace GW
22 {
24  namespace GRAPHICS
25  {
27  static const GUUIID GOpenGLSurfaceUUIID =
28  {
29  0xf67b270d, 0xb8db, 0x46a6,{ 0x8d, 0x30, 0xbf, 0xb5, 0x68, 0xeb, 0x92, 0xf6 }
30  };
31 
33 
41  {
42 
43  public:
44 
46 
53  virtual GReturn GetContext(void** _outContext) = 0;
55 
62  virtual GReturn GetAspectRatio(float& _outAspectRatio) = 0;
64 
69  virtual GReturn UniversalSwapBuffers() = 0;
71 
88  virtual GReturn QueryExtensionFunction(const char* _extension, const char* _funcName, void** _outFuncAddress) = 0;
90 
98  virtual GReturn EnableSwapControl(bool _setSwapControl) = 0;
99 
100  }; // end GOpenGLSurface class
101 
103 
123  GATEWARE_EXPORT_IMPLICIT GReturn CreateGOpenGLSurface(SYSTEM::GWindow* _gWin, unsigned long long _initMask, GOpenGLSurface** _outSurface);
124 
125  } // end GRAPHICS namespace
126 } // end GW namespace
127 
128 #endif
A GListener Interface may be registered with a GBroadcaster interface to receive event notifications.
Definition: GListener.h:35
virtual GReturn EnableSwapControl(bool _setSwapControl)=0
Enables or disables v-synchronization in regards to buffer swapping.
virtual GReturn GetContext(void **_outContext)=0
Returns the current OpenGL context.
virtual GReturn UniversalSwapBuffers()=0
Calls the appropriate method (depending on platform) to swap the front and back buffers.
A library used to initialize, create, and manage an OpenGL rendering context.
Definition: GOpenGLSurface.h:40
A thread-safe window creation and management library.
Definition: GWindow.h:77
virtual GReturn GetAspectRatio(float &_outAspectRatio)=0
Returns the aspect ratio for the current window.
virtual GReturn QueryExtensionFunction(const char *_extension, const char *_funcName, void **_outFuncAddress)=0
Queries if a requested OpenGL extension or function is supported.
The core namespace to which all Gateware interfaces/structures/defines must belong.
Definition: GAudio.h:20
GATEWARE_EXPORT_IMPLICIT GReturn CreateGOpenGLSurface(SYSTEM::GWindow *_gWin, unsigned long long _initMask, GOpenGLSurface **_outSurface)
Creates and outputs a new GOpenGLSurface object.
GReturn
Listing of common error codes returned by Gateware functions.
Definition: GDefines.h:53