MiniEngine/sdl_engine_window.hpp

22 lines
403 B
C++
Raw Normal View History

2017-01-05 13:25:09 +08:00
Window::Window(int winw,int winh)
{
pimpl=new impl;
2017-01-07 09:52:56 +08:00
SDL_Window* wnd=SDL_CreateWindow("Engine",SDL_WINDOWPOS_CENTERED,SDL_WINDOWPOS_CENTERED,winw,winh,SDL_WINDOW_SHOWN);
pimpl->set(wnd);
2017-01-05 13:25:09 +08:00
}
Window::~Window()
{
delete pimpl;
}
Renderer Window::getRenderer()
{
return pimpl->rnd;
}
2017-01-07 09:52:56 +08:00
Window::Window(const Window& inc) : Window(DEFAULT_WIDTH,DEFAULT_HEIGHT)
{
*pimpl=*(inc.pimpl);
}