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:
Diffstat (limited to 'source/blender/editors/space_view3d/drawvolume.c')
-rw-r--r--source/blender/editors/space_view3d/drawvolume.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/source/blender/editors/space_view3d/drawvolume.c b/source/blender/editors/space_view3d/drawvolume.c
index cf118404183..c6874a663a5 100644
--- a/source/blender/editors/space_view3d/drawvolume.c
+++ b/source/blender/editors/space_view3d/drawvolume.c
@@ -1,4 +1,4 @@
-/*
+/*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -40,17 +40,17 @@
#include "BLI_utildefines.h"
#include "BLI_math.h"
-#include "BKE_DerivedMesh.h"
#include "BKE_colorband.h"
+#include "BKE_deform.h"
#include "BKE_particle.h"
#include "smoke_API.h"
#include "BIF_gl.h"
-#include "GPU_debug.h"
#include "GPU_shader.h"
#include "GPU_texture.h"
+#include "GPU_state.h"
#include "view3d_intern.h" // own include
@@ -129,7 +129,7 @@ static GPUTexture *create_transfer_function(int type, const ColorBand *coba)
break;
}
- GPUTexture *tex = GPU_texture_create_1D(TFUNC_WIDTH, data, NULL);
+ GPUTexture *tex = GPU_texture_create_1D(TFUNC_WIDTH, GPU_RGBA8, data, NULL);
MEM_freeN(data);
@@ -160,7 +160,7 @@ static GPUTexture *create_field_texture(SmokeDomainSettings *sds)
default: return NULL;
}
- return GPU_texture_create_3D(sds->res[0], sds->res[1], sds->res[2], 1, field);
+ return GPU_texture_create_3D(sds->res[0], sds->res[1], sds->res[2], GPU_R8, field, NULL);
}
typedef struct VolumeSlicer {
@@ -633,11 +633,11 @@ void draw_smoke_volume(SmokeDomainSettings *sds, Object *ob,
glGetBooleanv(GL_DEPTH_TEST, (GLboolean *)&gl_depth);
glGetBooleanv(GL_DEPTH_WRITEMASK, (GLboolean *)&gl_depth_write);
- glEnable(GL_DEPTH_TEST);
+ GPU_depth_test(true);
glDepthMask(GL_FALSE);
- glEnable(GL_BLEND);
+ GPU_blend(true);
- glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
+ GPU_blend_set_func(GPU_ONE, GPU_ONE_MINUS_SRC_ALPHA);
draw_buffer(sds, shader, &slicer, ob_sizei, invsize, num_points, false);
/* Draw fire separately (T47639). */
@@ -656,11 +656,11 @@ void draw_smoke_volume(SmokeDomainSettings *sds, Object *ob,
glDepthMask(gl_depth_write);
if (!gl_blend) {
- glDisable(GL_BLEND);
+ GPU_blend(false);
}
if (gl_depth) {
- glEnable(GL_DEPTH_TEST);
+ GPU_depth_test(true);
}
}
@@ -685,7 +685,7 @@ static void add_needle(float (*verts)[3], float (*colors)[3], float center[3],
float len = len_v3(dir);
float rgb[3];
- weight_to_rgb(rgb, len);
+ BKE_defvert_weight_to_rgb(rgb, len);
if (len != 0.0f) {
mul_v3_fl(dir, 1.0f / len);
@@ -725,7 +725,7 @@ static void add_streamline(float (*verts)[3], float(*colors)[3], float center[3]
const float len = len_v3(dir);
float rgb[3];
- weight_to_rgb(rgb, len);
+ BKE_defvert_weight_to_rgb(rgb, len);
copy_v3_v3(colors[(*offset)], rgb);
copy_v3_v3(verts[(*offset)++], center);
@@ -832,7 +832,7 @@ void draw_smoke_velocity(SmokeDomainSettings *domain, float viewnormal[3])
}
}
- glLineWidth(1.0f);
+ GPU_line_width(1.0f);
glEnableClientState(GL_VERTEX_ARRAY);
glVertexPointer(3, GL_FLOAT, 0, verts);