Mitsuba Renderer  0.5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
wglsession.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_WGLSESSION_H_)
21 #define __MITSUBA_HW_WGLSESSION_H_
22 
23 #include <mitsuba/hw/session.h>
24 
25 #include <windows.h>
26 
28 
29 /** \brief Windows (WGL) windowing environment session
30  * \ingroup libhw
31  */
33  friend class WGLDevice;
34  friend class WGLRenderer;
35 public:
36  /// Create a new session
37  WGLSession();
38 
39  /// Initialize the session
40  void init();
41 
42  /// Shut the session down
43  void shutdown();
44 
45  /// Process all events and call event callbacks
46  void processEvents();
47 
48  /**
49  * \brief Process all events and call event callbacks.
50  *
51  * This function will run until the \c stop parameter is set
52  * to \c true from within an event callback.
53  */
54  void processEventsBlocking(bool &stop);
55 
56 
58 protected:
59  /// Virtual destructor
60  virtual ~WGLSession();
61 protected:
62  HINSTANCE m_hinstance;
63  std::string m_wndClassName;
64 };
65 
67 
68 #endif /* __MITSUBA_HW_WGLSESSION_H_ */
Windows (WGL) device implementation.
Definition: wgldevice.h:31
#define MTS_EXPORT_HW
Definition: platform.h:114
virtual void processEvents()=0
Process all events and call event callbacks.
Windows (WGL) renderer implementation.
Definition: wglrenderer.h:31
virtual void init()
Initialize the session.
#define MTS_NAMESPACE_BEGIN
Definition: platform.h:137
virtual void shutdown()
Shut the session down.
Windows (WGL) windowing environment session.
Definition: wglsession.h:32
#define MTS_DECLARE_CLASS()
This macro must be used in the initial definition in classes that derive from Object.
Definition: class.h:158
virtual void processEventsBlocking(bool &stop)=0
Process all events and call event callbacks.
Abstract windowing environment session.
Definition: session.h:32
#define MTS_NAMESPACE_END
Definition: platform.h:138