1 #include "opengl/opengl.h"
6 #include "opengl/mesh-gl.h"
7 #include "opengl/texture-gl.h"
8 #include "opengl/shader-gl.h"
9 #include "opengl/uniforms-gl.h"
11 #include "vulkan/shader-vk.h"
12 #include "vulkan/mesh-vk.h"
13 #include "vulkan/texture-vk.h"
14 #include "vulkan/uniforms-vk.h"
18 void (*gfx_clear)(float r, float g, float b);
19 void (*gfx_viewport)(int x, int y, int width, int height);
20 void (*gfx_zbuffer)(bool enable);
21 void (*gfx_cull_face)(Gfx_cull_face cf);
22 void (*gfx_reshape)(int width, int height);
23 void (*gfx_wireframe)(bool enable);
24 void (*gfx_swapbuffers)();
25 void (*gfx_begin_drawing)();
26 void (*gfx_end_drawing)();
28 bool gfx_init(Gfx_API api)
59 Mesh *gfx_create_mesh()
69 Texture *gfx_create_texture()
80 ShaderProgram *gfx_create_shader_program()
84 return new ShaderProgramGL;
86 return new ShaderProgramVK;
91 Shader *gfx_create_shader()
102 UniformBuffer *gfx_create_uniform_buffer()
106 return new UniformBufferGL;
108 return new UniformBufferVK;
113 char *gfx_get_shader_path()
117 return (char *)"shaders";
119 return (char *)"shaders/spirv";