mirror of
https://github.com/Kiritow/MiniEngine.git
synced 2024-03-22 13:11:22 +08:00
Add GetRenderer to class Window
This commit is contained in:
parent
002617a557
commit
a212f2c1b6
|
@ -14,7 +14,7 @@ class Renderer
|
|||
public:
|
||||
Renderer() = default;
|
||||
/// Create a Renderer associated with Window
|
||||
Renderer(Window& wnd,std::initializer_list<RendererType> RendererFlags = { RendererType::Accelerated,RendererType::TargetTexture });
|
||||
Renderer(class Window& wnd,std::initializer_list<RendererType> RendererFlags = { RendererType::Accelerated,RendererType::TargetTexture });
|
||||
/// Create a software Renderer
|
||||
Renderer(Surface& surf);
|
||||
~Renderer() = default;
|
||||
|
@ -148,6 +148,7 @@ private:
|
|||
void _clear();
|
||||
SDL_Renderer* _get() const;
|
||||
|
||||
friend class Window;
|
||||
friend class _internal::Plugin;
|
||||
};
|
||||
} /// End of namespace MiniEngine
|
||||
|
|
|
@ -108,6 +108,13 @@ float Window::getOpacity() const
|
|||
}
|
||||
#endif /// End of SDL2 2.0.5 Require.
|
||||
|
||||
Renderer Window::getRenderer()
|
||||
{
|
||||
Renderer nrnd;
|
||||
nrnd._set(SDL_GetRenderer(_get()));
|
||||
return nrnd;
|
||||
}
|
||||
|
||||
/// FIXME: Not Implemented.
|
||||
void Window::setResizable(bool resizable)
|
||||
{
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
#include "MessageBox.h"
|
||||
#include "Surface.h"
|
||||
#include "__Plugin.h"
|
||||
#include "Renderer.h"
|
||||
|
||||
namespace MiniEngine
|
||||
{
|
||||
class Window
|
||||
|
@ -36,6 +38,8 @@ public:
|
|||
float getOpacity() const;
|
||||
#endif
|
||||
|
||||
class Renderer getRenderer();
|
||||
|
||||
/// FIXME: Not Implemented.
|
||||
void setResizable(bool resizable);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user