Rename Display to Window.
It makes more sense to be consistent and always call it window.
This commit is contained in:
parent
416a71f744
commit
24da7f45e0
33 changed files with 257 additions and 255 deletions
|
|
@ -10,7 +10,7 @@ Graphics::Graphics(PlatformApplication *platform)
|
|||
m_width = 800;
|
||||
m_height = 600;
|
||||
|
||||
m_display = new Display();
|
||||
m_window = new Window();
|
||||
|
||||
// Only have OpenGL atm.
|
||||
m_gfxdrv = new OpenGLDrv();
|
||||
|
|
@ -19,16 +19,16 @@ Graphics::Graphics(PlatformApplication *platform)
|
|||
Graphics::~Graphics()
|
||||
{
|
||||
shutdown();
|
||||
delete m_display;
|
||||
delete m_window;
|
||||
delete m_gfxdrv;
|
||||
}
|
||||
|
||||
bool Graphics::init()
|
||||
{
|
||||
DisplayMode mode(m_width, m_height);
|
||||
DisplayDescription desc(mode);
|
||||
WindowDescription desc(mode);
|
||||
|
||||
if (!m_display->create(desc)) {
|
||||
if (!m_window->create(desc)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -41,7 +41,7 @@ bool Graphics::init()
|
|||
|
||||
void Graphics::shutdown()
|
||||
{
|
||||
m_display->destroy();
|
||||
m_window->destroy();
|
||||
}
|
||||
|
||||
std::string Graphics::getVersion() const
|
||||
|
|
@ -49,14 +49,14 @@ std::string Graphics::getVersion() const
|
|||
return m_gfxdrv->getVendor();
|
||||
}
|
||||
|
||||
void Graphics::setDisplayMode(Display::Mode mode)
|
||||
void Graphics::setWindowMode(Window::Mode mode)
|
||||
{
|
||||
m_display->setVideoMode(mode);
|
||||
m_window->setVideoMode(mode);
|
||||
}
|
||||
|
||||
void Graphics::setSize(int width, int height)
|
||||
{
|
||||
m_display->setSize(width, height);
|
||||
m_window->setSize(width, height);
|
||||
}
|
||||
|
||||
void Graphics::setViewport(int x, int y, int width, int height)
|
||||
|
|
@ -76,7 +76,7 @@ void Graphics::clearBuffer()
|
|||
|
||||
void Graphics::swapBuffers()
|
||||
{
|
||||
m_display->swapBuffers();
|
||||
m_window->swapBuffers();
|
||||
}
|
||||
|
||||
GfxDriver* Graphics::getDriver()
|
||||
|
|
@ -84,9 +84,9 @@ GfxDriver* Graphics::getDriver()
|
|||
return m_gfxdrv;
|
||||
}
|
||||
|
||||
Display* Graphics::getDisplay()
|
||||
Window* Graphics::getWindow()
|
||||
{
|
||||
return m_display;
|
||||
return m_window;
|
||||
}
|
||||
|
||||
} // namespace sp
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue