projects
/
demo
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Changed the OpenGL part and the GLSL shaders to use UBO and
[demo]
/
src
/
gfxapi.cc
diff --git
a/src/gfxapi.cc
b/src/gfxapi.cc
index
1b67a36
..
e9f0f73
100644
(file)
--- a/
src/gfxapi.cc
+++ b/
src/gfxapi.cc
@@
-6,10
+6,12
@@
#include "opengl/mesh-gl.h"
#include "opengl/texture-gl.h"
#include "opengl/shader-gl.h"
#include "opengl/mesh-gl.h"
#include "opengl/texture-gl.h"
#include "opengl/shader-gl.h"
+#include "opengl/uniforms-gl.h"
#include "vulkan/shader-vk.h"
#include "vulkan/mesh-vk.h"
#include "vulkan/texture-vk.h"
#include "vulkan/shader-vk.h"
#include "vulkan/mesh-vk.h"
#include "vulkan/texture-vk.h"
+#include "vulkan/uniforms-vk.h"
static Gfx_API api;
static Gfx_API api;
@@
-97,6
+99,17
@@
Shader *gfx_create_shader()
return 0;
}
return 0;
}
+UniformBuffer *gfx_create_uniform_buffer()
+{
+ switch(api) {
+ case GFX_GL:
+ return new UniformBufferGL;
+ case GFX_VK:
+ return new UniformBufferVK;
+ }
+ return 0;
+}
+
char *gfx_get_shader_path()
{
switch(api) {
char *gfx_get_shader_path()
{
switch(api) {