Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKévin Dietrich <kevin.dietrich@mailoo.org>2016-01-10 09:36:23 +0300
committerKévin Dietrich <kevin.dietrich@mailoo.org>2016-01-10 09:36:23 +0300
commit0372b642705c5304f252f7691b188fc65dd51b59 (patch)
treee7f1d6fb1dff5889a93d7ec0c363a04e0364365a /source/blender/gpu/GPU_shader.h
parentd330162ba6981a6c3691bcc8759215463d47f973 (diff)
OpenGL: port smoke drawing code to GLSL.
Beside the obvious ARB -> GLSL change, the texture slicing algorithm had to be rewritten. Although this new algorithm has the same behaviour as the old one (view aligned slicing), it works with an arbitrary number of slices (which could eventually be set by the user), which means we can preallocate the buffer. The previous algorithm would slice from the begining to the end of the volume's bbox, and draw the slices as it generates them. Also support for ARB program was removed. Patch by myself, with some minor fixes by Brecht. Reviewers: brecht, #opengl_gfx Differential Revision: https://developer.blender.org/D1694
Diffstat (limited to 'source/blender/gpu/GPU_shader.h')
-rw-r--r--source/blender/gpu/GPU_shader.h21
1 files changed, 2 insertions, 19 deletions
diff --git a/source/blender/gpu/GPU_shader.h b/source/blender/gpu/GPU_shader.h
index 6464fb7454a..468cc2f0f6e 100644
--- a/source/blender/gpu/GPU_shader.h
+++ b/source/blender/gpu/GPU_shader.h
@@ -37,21 +37,8 @@ extern "C" {
#endif
typedef struct GPUShader GPUShader;
-typedef struct GPUProgram GPUProgram;
struct GPUTexture;
-/* Builtin/Non-generated shaders */
-typedef enum GPUProgramType {
- GPU_PROGRAM_TYPE_FRAGMENT = 0
-} GPUProgramType;
-
-/* TODO: remove ARB program support (recode smoke shader in GLSL) */
-GPUProgram *GPU_program_shader_create(GPUProgramType type, const char *code);
-void GPU_program_free(GPUProgram *program);
-void GPU_program_parameter_4f(GPUProgram *program, unsigned int location, float x, float y, float z, float w);
-void GPU_program_bind(GPUProgram *);
-void GPU_program_unbind(GPUProgram *);
-
/* GPU Shader
* - only for fragment shaders now
* - must call texture bind before setting a texture as uniform! */
@@ -97,15 +84,11 @@ int GPU_shader_get_attribute(GPUShader *shader, const char *name);
typedef enum GPUBuiltinShader {
GPU_SHADER_VSM_STORE = 0,
GPU_SHADER_SEP_GAUSSIAN_BLUR = 1,
+ GPU_SHADER_SMOKE = 2,
+ GPU_SHADER_SMOKE_FIRE = 3,
} GPUBuiltinShader;
-typedef enum GPUBuiltinProgram {
- GPU_PROGRAM_SMOKE = 0,
- GPU_PROGRAM_SMOKE_COLORED = 1,
-} GPUBuiltinProgram;
-
GPUShader *GPU_shader_get_builtin_shader(GPUBuiltinShader shader);
-GPUProgram *GPU_shader_get_builtin_program(GPUBuiltinProgram program);
GPUShader *GPU_shader_get_builtin_fx_shader(int effects, bool persp);
void GPU_shader_free_builtin_shaders(void);