diff options
Diffstat (limited to 'source/blender/gpu/intern')
-rw-r--r-- | source/blender/gpu/intern/gpu_batch.cc | 81 |
1 files changed, 0 insertions, 81 deletions
diff --git a/source/blender/gpu/intern/gpu_batch.cc b/source/blender/gpu/intern/gpu_batch.cc index 9efb6b464bc..b0a0c142036 100644 --- a/source/blender/gpu/intern/gpu_batch.cc +++ b/source/blender/gpu/intern/gpu_batch.cc @@ -226,87 +226,6 @@ void GPU_batch_set_shader(GPUBatch *batch, GPUShader *shader) GPU_shader_bind(batch->shader); } -#define GET_UNIFORM \ - const GPUShaderInput *uniform = GPU_shaderinterface_uniform(batch->shader->interface, name); \ - BLI_assert(uniform); - -void GPU_batch_uniform_1i(GPUBatch *batch, const char *name, int value) -{ - GET_UNIFORM - GPU_shader_uniform_int(batch->shader, uniform->location, value); -} - -void GPU_batch_uniform_1b(GPUBatch *batch, const char *name, bool value) -{ - GPU_batch_uniform_1i(batch, name, value ? GL_TRUE : GL_FALSE); -} - -void GPU_batch_uniform_2f(GPUBatch *batch, const char *name, float x, float y) -{ - const float data[2] = {x, y}; - GPU_batch_uniform_2fv(batch, name, data); -} - -void GPU_batch_uniform_3f(GPUBatch *batch, const char *name, float x, float y, float z) -{ - const float data[3] = {x, y, z}; - GPU_batch_uniform_3fv(batch, name, data); -} - -void GPU_batch_uniform_4f(GPUBatch *batch, const char *name, float x, float y, float z, float w) -{ - const float data[4] = {x, y, z, w}; - GPU_batch_uniform_4fv(batch, name, data); -} - -void GPU_batch_uniform_1f(GPUBatch *batch, const char *name, float x) -{ - GET_UNIFORM - GPU_shader_uniform_float(batch->shader, uniform->location, x); -} - -void GPU_batch_uniform_2fv(GPUBatch *batch, const char *name, const float data[2]) -{ - GET_UNIFORM - GPU_shader_uniform_vector(batch->shader, uniform->location, 2, 1, data); -} - -void GPU_batch_uniform_3fv(GPUBatch *batch, const char *name, const float data[3]) -{ - GET_UNIFORM - GPU_shader_uniform_vector(batch->shader, uniform->location, 3, 1, data); -} - -void GPU_batch_uniform_4fv(GPUBatch *batch, const char *name, const float data[4]) -{ - GET_UNIFORM - GPU_shader_uniform_vector(batch->shader, uniform->location, 4, 1, data); -} - -void GPU_batch_uniform_2fv_array(GPUBatch *batch, - const char *name, - const int len, - const float *data) -{ - GET_UNIFORM - GPU_shader_uniform_vector(batch->shader, uniform->location, 2, len, data); -} - -void GPU_batch_uniform_4fv_array(GPUBatch *batch, - const char *name, - const int len, - const float *data) -{ - GET_UNIFORM - GPU_shader_uniform_vector(batch->shader, uniform->location, 4, len, data); -} - -void GPU_batch_uniform_mat4(GPUBatch *batch, const char *name, const float data[4][4]) -{ - GET_UNIFORM - GPU_shader_uniform_vector(batch->shader, uniform->location, 16, 1, (const float *)data); -} - /** \} */ /* -------------------------------------------------------------------- */ |