SCIRun  5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GLContext.h
Go to the documentation of this file.
1 /*
2  For more information, please see: http://software.sci.utah.edu
3 
4  The MIT License
5 
6  Copyright (c) 2012 Scientific Computing and Imaging Institute,
7  University of Utah.
8 
9  License for the specific language governing rights and limitations under
10  Permission is hereby granted, free of charge, to any person obtaining a
11  copy of this software and associated documentation files (the "Software"),
12  to deal in the Software without restriction, including without limitation
13  the rights to use, copy, modify, merge, publish, distribute, sublicense,
14  and/or sell copies of the Software, and to permit persons to whom the
15  Software is furnished to do so, subject to the following conditions:
16 
17  The above copyright notice and this permission notice shall be included
18  in all copies or substantial portions of the Software.
19 
20  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
21  OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
23  THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
25  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
26  DEALINGS IN THE SOFTWARE.
27 */
28 
29 /// \author James Hughes
30 /// \date December 2012
31 /// \brief Not sure this file should go in Modules/Render. But it is an
32 /// auxiliary file to the ViewScene render module.
33 
34 #ifndef INTERFACE_MODULES_RENDER_GLCONTEXT_H
35 #define INTERFACE_MODULES_RENDER_GLCONTEXT_H
36 
37 // For windows.
38 /// \todo Make this definition specific to windows.
39 #define NOMINMAX
40 
42 
43 namespace SCIRun {
44 namespace Gui {
45 
46 /// Context that will be sent to spire.
47 class GLContext : public spire::Context
48 {
49 public:
50  GLContext(QGLWidget* glWidget);
51  virtual ~GLContext();
52 
53  /// Mandatory override from Context.
54  virtual void makeCurrent();
55 
56  /// Mandatory override from Context.
57  virtual void swapBuffers();
58 
59 private:
60 
61  QGLWidget* mGLWidget;
62 };
63 
64 } // end of namespace SCIRun
65 } // end of namespace Gui
66 
67 #endif
virtual void swapBuffers()
Mandatory override from Context.
Definition: GLContext.cc:54
GLContext(QGLWidget *glWidget)
Definition: GLContext.cc:38
virtual ~GLContext()
Definition: GLContext.cc:43
Context that will be sent to spire.
Definition: GLContext.h:47
virtual void makeCurrent()
Mandatory override from Context.
Definition: GLContext.cc:47