backup - needs fixing
[demo] / src / gfxapi.cc
index d4464f1..2dead6f 100644 (file)
@@ -7,6 +7,7 @@
 #include "opengl/texture-gl.h"
 #include "opengl/shader-gl.h"
 
+#include "vulkan/shader-vk.h"
 #include "vulkan/mesh-vk.h"
 #include "vulkan/texture-vk.h"
 
@@ -14,7 +15,13 @@ static Gfx_API api;
 
 void (*gfx_clear)(float r, float g, float b);
 void (*gfx_viewport)(int x, int y, int width, int height);
-
+void (*gfx_zbuffer)(bool enable);
+void (*gfx_cull_face)(Gfx_cull_face cf);
+void (*gfx_reshape)(int width, int height);
+void (*gfx_wireframe)(bool enable);
+void (*gfx_swapbuffers)();
+void (*gfx_begin_drawing)();
+void (*gfx_end_drawing)();
 
 bool gfx_init(Gfx_API api)
 {
@@ -55,6 +62,7 @@ Mesh *gfx_create_mesh()
        case GFX_VK:
                return new MeshVK;
        }
+       return 0;
 }
 Texture *gfx_create_texture()
 {
@@ -64,6 +72,7 @@ Texture *gfx_create_texture()
        case GFX_VK:
                return new TextureVK;
        }
+       return 0;
 }
 
 ShaderProgram *gfx_create_shader_program()
@@ -72,9 +81,9 @@ ShaderProgram *gfx_create_shader_program()
        case GFX_GL:
                return new ShaderProgramGL;
        case GFX_VK:
-               // return new ShaderProgramVK;
-               return 0;
+               return new ShaderProgramVK;
        }
+       return 0;
 }
 
 Shader *gfx_create_shader()
@@ -83,9 +92,9 @@ Shader *gfx_create_shader()
        case GFX_GL:
                return new ShaderGL;
        case GFX_VK:
-               // return new ShaderVK;
-               return 0;
+               return new ShaderVK;
        }
+       return 0;
 }
 
 char *gfx_get_shader_path()
@@ -96,4 +105,5 @@ char *gfx_get_shader_path()
        case GFX_VK:
                return (char *)"vk_shaders";
        }
-}
\ No newline at end of file
+       return (char *)"";
+}