MiniEngine/sdl_engine_window.hpp
2017-01-07 09:52:56 +08:00

22 lines
403 B
C++

Window::Window(int winw,int winh)
{
pimpl=new impl;
SDL_Window* wnd=SDL_CreateWindow("Engine",SDL_WINDOWPOS_CENTERED,SDL_WINDOWPOS_CENTERED,winw,winh,SDL_WINDOW_SHOWN);
pimpl->set(wnd);
}
Window::~Window()
{
delete pimpl;
}
Renderer Window::getRenderer()
{
return pimpl->rnd;
}
Window::Window(const Window& inc) : Window(DEFAULT_WIDTH,DEFAULT_HEIGHT)
{
*pimpl=*(inc.pimpl);
}