Simplifying GPU creation.

Part of #296.
This commit is contained in:
Ben Vanik
2015-06-27 09:11:03 -07:00
parent 3439641101
commit 883126d497
13 changed files with 56 additions and 145 deletions

View File

@@ -7,10 +7,7 @@
******************************************************************************
*/
#include "xenia/gpu/gl4/gl4_gpu.h"
#include "xenia/gpu/gl4/gl4_gpu-private.h"
#include "xenia/gpu/gl4/gl4_graphics_system.h"
DEFINE_bool(thread_safe_gl, false,
"Only allow one GL context to be active at a time.");
@@ -30,33 +27,3 @@ DEFINE_bool(vendor_gl_extensions, false,
DEFINE_bool(disable_framebuffer_readback, false,
"Disable framebuffer readback.");
DEFINE_bool(disable_textures, false, "Disable textures and use colors only.");
namespace xe {
namespace gpu {
namespace gl4 {
void InitializeIfNeeded();
void CleanupOnShutdown();
void InitializeIfNeeded() {
static bool has_initialized = false;
if (has_initialized) {
return;
}
has_initialized = true;
//
atexit(CleanupOnShutdown);
}
void CleanupOnShutdown() {}
std::unique_ptr<GraphicsSystem> Create(Emulator* emulator) {
InitializeIfNeeded();
return std::make_unique<GL4GraphicsSystem>(emulator);
}
} // namespace gl4
} // namespace gpu
} // namespace xe