mirror of
https://github.com/love2d/love.git
synced 2026-08-19 04:06:17 +02:00
cleanup redundant initialization code
This commit is contained in:
@@ -58,13 +58,6 @@ namespace love {
|
|||||||
Graphics::Graphics() {
|
Graphics::Graphics() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Graphics::initVulkan() {
|
|
||||||
if (!init) {
|
|
||||||
init = true;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// START OVERRIDEN FUNCTIONS
|
// START OVERRIDEN FUNCTIONS
|
||||||
|
|
||||||
love::graphics::Buffer* Graphics::newBuffer(const love::graphics::Buffer::Settings& settings, const std::vector<love::graphics::Buffer::DataDeclaration>& format, const void* data, size_t size, size_t arraylength) {
|
love::graphics::Buffer* Graphics::newBuffer(const love::graphics::Buffer::Settings& settings, const std::vector<love::graphics::Buffer::DataDeclaration>& format, const void* data, size_t size, size_t arraylength) {
|
||||||
|
|||||||
@@ -23,8 +23,6 @@ namespace love {
|
|||||||
public:
|
public:
|
||||||
Graphics();
|
Graphics();
|
||||||
|
|
||||||
void initVulkan();
|
|
||||||
|
|
||||||
virtual ~Graphics() = default;
|
virtual ~Graphics() = default;
|
||||||
|
|
||||||
const char* getName() const override;
|
const char* getName() const override;
|
||||||
@@ -95,7 +93,6 @@ namespace love {
|
|||||||
void setRenderTargetsInternal(const RenderTargets& rts, int pixelw, int pixelh, bool hasSRGBtexture) override { std::cout << "setRenderTargetsInternal "; }
|
void setRenderTargetsInternal(const RenderTargets& rts, int pixelw, int pixelh, bool hasSRGBtexture) override { std::cout << "setRenderTargetsInternal "; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool init = false;
|
|
||||||
// vulkan specific member functions and variables
|
// vulkan specific member functions and variables
|
||||||
|
|
||||||
struct QueueFamilyIndices {
|
struct QueueFamilyIndices {
|
||||||
|
|||||||
@@ -380,10 +380,6 @@ bool Window::createWindowAndContext(int x, int y, int w, int h, Uint32 windowfla
|
|||||||
#else
|
#else
|
||||||
window = SDL_CreateWindow(title.c_str(), x, y, w, h, windowflags | SDL_WINDOW_VULKAN);
|
window = SDL_CreateWindow(title.c_str(), x, y, w, h, windowflags | SDL_WINDOW_VULKAN);
|
||||||
|
|
||||||
love::graphics::Graphics* gfx = graphics.get();
|
|
||||||
love::graphics::vulkan::Graphics* vgfx = (love::graphics::vulkan::Graphics*)gfx;
|
|
||||||
vgfx->initVulkan();
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user