upload complete uniform buffer at once

this is the way of dx11. it would upload more per draw, but uses less calls.
will be faster if many uniforms are changed, but slower else
This commit is contained in:
degasus
2013-01-14 13:58:11 +01:00
parent b18c0a5d1b
commit c3aafc77b3
3 changed files with 27 additions and 5 deletions

View File

@ -117,6 +117,7 @@ public:
static void SetMultiPSConstant4fv(unsigned int offset, const float *f, unsigned int count);
static void SetMultiVSConstant4fv(unsigned int offset, const float *f, unsigned int count);
static void UploadConstants();
static void Init(void);
static void Shutdown(void);
@ -154,6 +155,9 @@ private:
static GLuint s_ps_vs_ubo;
static GLintptr s_vs_data_offset;
static float *s_ubo_buffer;
static u32 s_ubo_buffer_size;
static bool s_ubo_dirty;
static void SetProgramVariables(PCacheEntry &entry);
static void SetProgramBindings(PCacheEntry &entry);
};