+#include "opengl/opengl.h"
+#include "vulkan/vk.h"
+
+#include "gfxapi.h"
+
+#include "opengl/mesh-gl.h"
+#include "opengl/texture-gl.h"
+#include "opengl/shader-gl.h"
+
+#include "vulkan/mesh-vk.h"
+#include "vulkan/texture-vk.h"
+
+static Gfx_API api;
+
+void (*gfx_clear)(float r, float g, float b);
+void (*gfx_viewport)(int x, int y, int width, int height);
+
+
+bool gfx_init(Gfx_API api)
+{
+ switch(api) {
+ case GFX_GL:
+ if(!init_opengl())
+ return false;
+ break;
+ case GFX_VK:
+ if(!init_vulkan())
+ return false;
+ break;
+ default:
+ return false;
+ }
+
+ ::api = api;
+ return true;
+}
+
+void gfx_cleanup()
+{
+ switch(api) {
+ case GFX_GL:
+ cleanup_opengl();
+ break;
+ case GFX_VK:
+ cleanup_vulkan();
+ break;
+ }
+}
+
+Mesh *gfx_create_mesh()
+{
+ switch(api) {
+ case GFX_GL:
+ return new MeshGL;
+ case GFX_VK:
+ return new MeshVK;
+ }
+}
+Texture *gfx_create_texture()
+{
+ switch(api) {
+ case GFX_GL:
+ return new TextureGL;
+ case GFX_VK:
+ return new TextureVK;
+ }
+}
+
+ShaderProgram *gfx_create_shader_program()
+{
+ switch(api) {
+ case GFX_GL:
+ return new ShaderProgramGL;
+ case GFX_VK:
+ // return new ShaderProgramVK;
+ return 0;
+ }
+}
+
+Shader *gfx_create_shader()
+{
+ switch(api) {
+ case GFX_GL:
+ return new ShaderGL;
+ case GFX_VK:
+ // return new ShaderVK;
+ return 0;
+ }
+}
+
+char *gfx_get_shader_path()
+{
+ switch(api) {
+ case GFX_GL:
+ return (char *)"gl_shaders";
+ case GFX_VK:
+ return (char *)"vk_shaders";
+ }
+}
\ No newline at end of file