mirror of
https://github.com/Kiritow/MiniEngine.git
synced 2024-03-22 13:11:22 +08:00
17 lines
448 B
C++
17 lines
448 B
C++
Window::Window(int winw,int winh)
|
|
{
|
|
pimpl=new impl;
|
|
pimpl->sWnd.reset(SDL_CreateWindow("Engine",SDL_WINDOWPOS_CENTERED,SDL_WINDOWPOS_CENTERED,winw,winh,SDL_WINDOW_SHOWN),SDL_DestroyWindow);
|
|
pimpl->rnd.pimpl->sRnd.reset(SDL_CreateRenderer(pimpl->sWnd.get(),-1,SDL_RENDERER_ACCELERATED|SDL_RENDERER_TARGETTEXTURE),SDL_DestroyRenderer);
|
|
}
|
|
|
|
Window::~Window()
|
|
{
|
|
delete pimpl;
|
|
}
|
|
|
|
Renderer Window::getRenderer()
|
|
{
|
|
return pimpl->rnd;
|
|
}
|