Browse Source

cleanup redundant initialization code

niki 3 years ago
parent
commit
d0aaddfef6

+ 0 - 7
src/modules/graphics/vulkan/Graphics.cpp

@@ -58,13 +58,6 @@ namespace love {
 			Graphics::Graphics() {
 			}
 
-			void Graphics::initVulkan() {
-				if (!init) {
-					init = true;
-
-				}
-			}
-
 			// 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) {

+ 0 - 3
src/modules/graphics/vulkan/Graphics.h

@@ -23,8 +23,6 @@ namespace love {
 			public:
 				Graphics();
 
-				void initVulkan();
-
 				virtual ~Graphics() = default;
 
 				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 "; }
 
 			private:
-				bool init = false;
 				// vulkan specific member functions and variables
 
 				struct QueueFamilyIndices {

+ 0 - 4
src/modules/window/sdl/Window.cpp

@@ -380,10 +380,6 @@ bool Window::createWindowAndContext(int x, int y, int w, int h, Uint32 windowfla
 #else
 		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;
 #endif
 	};