OgreRenderWindow.h
Go to the documentation of this file.
/*-------------------------------------------------------------------------
This source file is a part of OGRE
(Object-oriented Graphics Rendering Engine)
For the latest info, see http://www.ogre3d.org/
Copyright (c) 2000-2013 Torus Knot Software Ltd
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE
-------------------------------------------------------------------------*/
#ifndef __RenderWindow_H__
#define __RenderWindow_H__
#include "OgrePrerequisites.h"
#include "OgreRenderTarget.h"
namespace Ogre
{
class _OgreExport RenderWindow : public RenderTarget
{
public:
RenderWindow();
virtual void create(const String& name, unsigned int width, unsigned int height,
bool fullScreen, const NameValuePairList *miscParams) = 0;
virtual void setFullscreen(bool fullScreen, unsigned int width, unsigned int height)
{ (void)fullScreen; (void)width; (void)height; }
virtual void destroy(void) = 0;
virtual void resize(unsigned int width, unsigned int height) = 0;
virtual void windowMovedOrResized() {}
virtual void reposition(int left, int top) = 0;
virtual bool isVisible(void) const { return true; }
virtual void setVisible(bool visible)
{ (void)visible; }
virtual bool isHidden(void) const { return false; }
virtual void setHidden(bool hidden)
{ (void)hidden; }
virtual void setVSyncEnabled(bool vsync)
{ (void)vsync; }
virtual bool isVSyncEnabled() const { return false; }
virtual void setVSyncInterval(unsigned int interval)
{ (void)interval; }
virtual unsigned int getVSyncInterval() const { return 1; }
virtual bool isActive(void) const { return mActive && isVisible(); }
virtual bool isClosed(void) const = 0;
virtual bool isPrimary(void) const;
virtual bool isFullScreen(void) const;
virtual void getMetrics(unsigned int& width, unsigned int& height, unsigned int& colourDepth,
int& left, int& top);
PixelFormat suggestPixelFormat() const { return PF_BYTE_RGB; }
bool isDeactivatedOnFocusChange() const;
void setDeactivateOnFocusChange(bool deactivate);
protected:
bool mIsFullScreen;
bool mIsPrimary;
bool mAutoDeactivatedOnFocusChange;
int mLeft;
int mTop;
void _setPrimary() { mIsPrimary = true; }
friend class Root;
};
} // Namespace
#endif
Ogre::RenderTarget
A &#39;canvas&#39; which can receive the results of a rendering operation.
Definition: OgreRenderTarget.h:65
Ogre::RenderWindow::setFullscreen
virtual void setFullscreen(bool fullScreen, unsigned int width, unsigned int height)
Alter fullscreen mode options.
Definition: OgreRenderWindow.h:92
Ogre::RenderWindow::setVSyncEnabled
virtual void setVSyncEnabled(bool vsync)
Enable or disable vertical sync for the RenderWindow.
Definition: OgreRenderWindow.h:139
_OgreExport
#define _OgreExport
Definition: OgrePlatform.h:257
Ogre::RenderWindow::suggestPixelFormat
PixelFormat suggestPixelFormat() const
Override since windows don&#39;t usually have alpha.
Definition: OgreRenderWindow.h:184
Ogre::RenderWindow::isVSyncEnabled
virtual bool isVSyncEnabled() const
Indicates whether vertical sync is activated for the window.
Definition: OgreRenderWindow.h:144
Ogre::RenderWindow::setHidden
virtual void setHidden(bool hidden)
Hide (or show) the window.
Definition: OgreRenderWindow.h:134
Ogre::RenderWindow::isVisible
virtual bool isVisible(void) const
Indicates whether the window is visible (not minimized or obscured)
Definition: OgreRenderWindow.h:115
Ogre::RenderWindow::setVSyncInterval
virtual void setVSyncInterval(unsigned int interval)
Set the vertical sync interval.
Definition: OgreRenderWindow.h:149
Ogre::PixelFormat
PixelFormat
The pixel format used for images, textures, and render surfaces.
Definition: OgrePixelFormat.h:43
Ogre::RenderWindow::_setPrimary
void _setPrimary()
Indicates that this is the primary window.
Definition: OgreRenderWindow.h:206
Ogre::RenderWindow::mIsPrimary
bool mIsPrimary
Definition: OgreRenderWindow.h:198
Ogre::RenderWindow::isHidden
virtual bool isHidden(void) const
Indicates whether the window was set to hidden (not displayed)
Definition: OgreRenderWindow.h:124
Ogre::RenderWindow::setVisible
virtual void setVisible(bool visible)
Set the visibility state.
Definition: OgreRenderWindow.h:119
Ogre::RenderWindow::mIsFullScreen
bool mIsFullScreen
Definition: OgreRenderWindow.h:197
OgrePrerequisites.h
Ogre::NameValuePairList
map< String, String >::type NameValuePairList
Name / value parameter pair (first = name, second = value)
Definition: OgreCommon.h:550
Ogre::String
_StringBase String
Definition: OgrePrerequisites.h:439
Ogre::PF_BYTE_RGB
3 byte pixel format, 1 byte for red, 1 byte for green, 1 byte for blue
Definition: OgrePixelFormat.h:99
Ogre::RenderWindow::isActive
virtual bool isActive(void) const
Overridden from RenderTarget, flags invisible windows as inactive.
Definition: OgreRenderWindow.h:159
Ogre::RenderWindow::mLeft
int mLeft
Definition: OgreRenderWindow.h:200
OgreRenderTarget.h
Ogre
Definition: OgreAndroidLogListener.h:34
Ogre::RenderWindow::mTop
int mTop
Definition: OgreRenderWindow.h:201
Ogre::RenderWindow
Manages the target rendering window.
Definition: OgreRenderWindow.h:62
Ogre::RenderWindow::windowMovedOrResized
virtual void windowMovedOrResized()
Notify that the window has been resized.
Definition: OgreRenderWindow.h:107
Ogre::RenderWindow::mAutoDeactivatedOnFocusChange
bool mAutoDeactivatedOnFocusChange
Definition: OgreRenderWindow.h:199
Ogre::Root
The root class of the Ogre system.
Definition: OgreRoot.h:71
Ogre::RenderWindow::getVSyncInterval
virtual unsigned int getVSyncInterval() const
Returns the vertical sync interval.
Definition: OgreRenderWindow.h:154

Copyright © 2012 Torus Knot Software Ltd
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.