Cinder  0.8.6
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
AppImplMswRendererGl.h
Go to the documentation of this file.
1 /*
2  Copyright (c) 2012, The Cinder Project, All rights reserved.
3 
4  This code is intended for use with the Cinder C++ library: http://libcinder.org
5 
6  Redistribution and use in source and binary forms, with or without modification, are permitted provided that
7  the following conditions are met:
8 
9  * Redistributions of source code must retain the above copyright notice, this list of conditions and
10  the following disclaimer.
11  * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
12  the following disclaimer in the documentation and/or other materials provided with the distribution.
13 
14  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
15  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
16  PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
17  ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
18  TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
19  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
20  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
21  POSSIBILITY OF SUCH DAMAGE.
22 */
23 
24 #pragma once
25 
26 #include "cinder/app/App.h"
28 
29 namespace cinder { namespace app {
30 
32  public:
33  AppImplMswRendererGl( App *aApp, RendererGl *aRenderer );
34 
35  virtual bool initialize( HWND wnd, HDC dc, RendererRef sharedRenderer );
36  virtual void prepareToggleFullScreen();
37  virtual void finishToggleFullScreen();
38  virtual void kill();
39  virtual void defaultResize() const;
40  virtual void swapBuffers() const;
41  virtual void makeCurrentContext();
42 
43  protected:
44  bool initializeInternal( HWND wnd, HDC dc, HGLRC sharedRC );
45  int initMultisample( PIXELFORMATDESCRIPTOR pfd, int requestedLevelIdx, HDC dc );
46 
50  HGLRC mRC, mPrevRC;
51  HDC mDC;
52 };
53 
54 } } // namespace cinder::app
Definition: AppImplMswRenderer.h:37
Definition: Renderer.h:147
virtual void swapBuffers() const
Definition: AppImplMswRendererGl.cpp:76
bool mWasFullScreen
Definition: AppImplMswRendererGl.h:48
virtual void finishToggleFullScreen()
Definition: AppImplMswRendererGl.cpp:48
bool initializeInternal(HWND wnd, HDC dc, HGLRC sharedRC)
Definition: AppImplMswRendererGl.cpp:183
HDC mDC
Definition: AppImplMswRendererGl.h:51
HGLRC mRC
Definition: AppImplMswRendererGl.h:50
virtual void prepareToggleFullScreen()
Definition: AppImplMswRendererGl.cpp:42
int initMultisample(PIXELFORMATDESCRIPTOR pfd, int requestedLevelIdx, HDC dc)
Definition: AppImplMswRendererGl.cpp:262
Definition: App.h:127
std::shared_ptr< class Renderer > RendererRef
Definition: Renderer.h:85
Definition: AppImplMswRendererGl.h:31
virtual bool initialize(HWND wnd, HDC dc, RendererRef sharedRenderer)
Definition: AppImplMswRendererGl.cpp:157
HGLRC mPrevRC
Definition: AppImplMswRendererGl.h:50
bool mWasVerticalSynced
Definition: AppImplMswRendererGl.h:49
virtual void kill()
Definition: AppImplMswRendererGl.cpp:315
AppImplMswRendererGl(App *aApp, RendererGl *aRenderer)
Definition: AppImplMswRendererGl.cpp:35
RendererGl * mRenderer
Definition: AppImplMswRendererGl.h:47
virtual void makeCurrentContext()
Definition: AppImplMswRendererGl.cpp:81
virtual void defaultResize() const
Definition: AppImplMswRendererGl.cpp:57