Mitsuba Renderer  0.5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
wglrenderer.h
Go to the documentation of this file.
1 /*
2  This file is part of Mitsuba, a physically based rendering system.
3 
4  Copyright (c) 2007-2014 by Wenzel Jakob and others.
5 
6  Mitsuba is free software; you can redistribute it and/or modify
7  it under the terms of the GNU General Public License Version 3
8  as published by the Free Software Foundation.
9 
10  Mitsuba is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18 
19 #pragma once
20 #if !defined(__MITSUBA_HW_WGLRENDERER_H_)
21 #define __MITSUBA_HW_WGLRENDERER_H_
22 
23 #include <mitsuba/hw/wgldevice.h>
24 #include <mitsuba/hw/glrenderer.h>
25 
27 
28 /** \brief Windows (WGL) renderer implementation
29  * \ingroup libhw
30  */
32 public:
33  /// Create a new renderer
34  WGLRenderer(WGLSession *session);
35 
36  /// Return the rendering context
37  inline HGLRC getWGLContext() { return m_context; }
38 
39  /// Initialize the renderer
40  void init(Device *device, Renderer *other = NULL);
41 
42  /// Shut the renderer down
43  void shutdown();
44 
45  /// Lookup an OpenGL extension
46  virtual void *lookupExtension(const std::string &name) const;
47 
49 protected:
50  /// Virtual destructor
51  virtual ~WGLRenderer();
52 private:
53  HGLRC m_context;
54 };
55 
57 
58 #endif /* __MITSUBA_HW_WGLRENDERER_H_ */
virtual void init(Device *device, Renderer *other=NULL)
Initialize the renderer.
#define MTS_EXPORT_HW
Definition: platform.h:114
Windows (WGL) renderer implementation.
Definition: wglrenderer.h:31
HGLRC getWGLContext()
Return the rendering context.
Definition: wglrenderer.h:37
#define MTS_NAMESPACE_BEGIN
Definition: platform.h:137
Windows (WGL) windowing environment session.
Definition: wglsession.h:32
An abstract drawing device.
Definition: device.h:136
#define MTS_DECLARE_CLASS()
This macro must be used in the initial definition in classes that derive from Object.
Definition: class.h:158
Abstract renderer implementation.
Definition: renderer.h:79
virtual void shutdown()
Shut the renderer down.
OpenGL implementation of the Renderer interface.
Definition: glrenderer.h:43
#define MTS_NAMESPACE_END
Definition: platform.h:138