OGRE  1.9
Object-Oriented Graphics Rendering Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
include/GLX/OgreGLXWindow.h
Go to the documentation of this file.
1 /*
2 -----------------------------------------------------------------------------
3 This source file is part of OGRE
4 (Object-oriented Graphics Rendering Engine)
5 For the latest info, see http://www.ogre3d.org/
6 
7 Copyright (c) 2000-2014 Torus Knot Software Ltd
8 
9 Permission is hereby granted, free of charge, to any person obtaining a copy
10 of this software and associated documentation files (the "Software"), to deal
11 in the Software without restriction, including without limitation the rights
12 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 copies of the Software, and to permit persons to whom the Software is
14 furnished to do so, subject to the following conditions:
15 
16 The above copyright notice and this permission notice shall be included in
17 all copies or substantial portions of the Software.
18 
19 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 THE SOFTWARE.
26 -----------------------------------------------------------------------------
27 */
28 
29 #ifndef __GLXWindow_H__
30 #define __GLXWindow_H__
31 
32 #include "OgreRenderWindow.h"
33 #include "OgreGLXContext.h"
34 #include "OgreGLXGLSupport.h"
35 #include <X11/Xlib.h>
36 
37 namespace Ogre
38 {
40  {
41  public:
42  GLXWindow(GLXGLSupport* glsupport);
43  ~GLXWindow();
44 
45  void create(const String& name, unsigned int width, unsigned int height,
46  bool fullScreen, const NameValuePairList *miscParams);
47 
49  void setFullscreen (bool fullscreen, uint width, uint height);
50 
52  void destroy(void);
53 
55  bool isClosed(void) const;
56 
58  bool isVisible(void) const;
59 
61  void setVisible(bool visible);
62 
64  bool isHidden(void) const { return mHidden; }
65 
67  void setHidden(bool hidden);
68 
70  void setVSyncEnabled(bool vsync);
71 
73  bool isVSyncEnabled() const;
74 
76  void setVSyncInterval(unsigned int interval);
77 
79  unsigned int getVSyncInterval() const;
80 
82  void reposition(int left, int top);
83 
85  void resize(unsigned int width, unsigned int height);
86 
88  void windowMovedOrResized();
89 
91  void swapBuffers();
92 
94  void copyContentsToMemory(const PixelBox &dst, FrameBuffer buffer);
95 
105  void getCustomAttribute(const String& name, void* pData);
106 
107  bool requiresTextureFlipping() const { return false; }
108 
109  private:
110  bool mClosed;
111  bool mVisible;
112  bool mHidden;
116  bool mVSync;
118 
120  ::Window mWindow;
122  void switchFullScreen(bool fullscreen);
123  };
124 }
125 
126 #endif
Manages the target rendering window.
map< String, String >::type NameValuePairList
Name / value parameter pair (first = name, second = value)
Definition: OgreCommon.h:550
bool requiresTextureFlipping() const
#define _OgrePrivate
Definition: OgrePlatform.h:261
bool isHidden(void) const
Indicates whether the window was set to hidden (not displayed)
_StringBase String
A primitive describing a volume (3D), image (2D) or line (1D) of pixels in memory.
unsigned int uint