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/gpu')
-rw-r--r--source/blender/gpu/CMakeLists.txt4
-rw-r--r--source/blender/gpu/GPU_draw.h5
-rw-r--r--source/blender/gpu/GPU_extensions.h1
-rw-r--r--source/blender/gpu/SConscript4
-rw-r--r--source/blender/gpu/intern/Makefile1
-rw-r--r--source/blender/gpu/intern/gpu_draw.c29
-rw-r--r--source/blender/gpu/intern/gpu_extensions.c63
7 files changed, 4 insertions, 103 deletions
diff --git a/source/blender/gpu/CMakeLists.txt b/source/blender/gpu/CMakeLists.txt
index 279596e5ad7..4d376f47d91 100644
--- a/source/blender/gpu/CMakeLists.txt
+++ b/source/blender/gpu/CMakeLists.txt
@@ -27,8 +27,8 @@
FILE(GLOB SRC intern/*.c)
SET(INC
- . ../blenlib ../blenkernel ../makesdna ../include
- ../../../extern/glew/include ../../../intern/guardedalloc ../../../intern/smoke/extern ../imbuf)
+ . ../blenlib ../blenkernel ../makesdna ../include
+ ../../../extern/glew/include ../../../intern/guardedalloc ../imbuf)
BLENDERLIB(bf_gpu "${SRC}" "${INC}")
diff --git a/source/blender/gpu/GPU_draw.h b/source/blender/gpu/GPU_draw.h
index fabe1420e83..82ff51dc5ce 100644
--- a/source/blender/gpu/GPU_draw.h
+++ b/source/blender/gpu/GPU_draw.h
@@ -43,7 +43,6 @@ struct Object;
struct Scene;
struct View3D;
struct RegionView3D;
-struct SmokeModifierData;
/* OpenGL drawing functions related to shading. These are also
* shared with the game engine, where there were previously
@@ -113,10 +112,6 @@ int GPU_verify_image(struct Image *ima, int tftile, int tfmode, int compare, int
void GPU_free_image(struct Image *ima);
void GPU_free_images(void);
-/* smoke drawing functions */
-void GPU_free_smoke(struct SmokeModifierData *smd);
-void GPU_create_smoke(struct SmokeModifierData *smd, int highres);
-
#ifdef __cplusplus
}
#endif
diff --git a/source/blender/gpu/GPU_extensions.h b/source/blender/gpu/GPU_extensions.h
index e00cab79ce0..eba585e8838 100644
--- a/source/blender/gpu/GPU_extensions.h
+++ b/source/blender/gpu/GPU_extensions.h
@@ -73,7 +73,6 @@ int GPU_print_error(char *str);
GPUTexture *GPU_texture_create_1D(int w, float *pixels);
GPUTexture *GPU_texture_create_2D(int w, int h, float *pixels);
-GPUTexture *GPU_texture_create_3D(int w, int h, int depth, float *fpixels);
GPUTexture *GPU_texture_create_depth(int w, int h);
GPUTexture *GPU_texture_from_blender(struct Image *ima,
struct ImageUser *iuser, double time, int mipmap);
diff --git a/source/blender/gpu/SConscript b/source/blender/gpu/SConscript
index 7e700c177e4..63f5fe53238 100644
--- a/source/blender/gpu/SConscript
+++ b/source/blender/gpu/SConscript
@@ -4,8 +4,8 @@ Import ('env')
sources = env.Glob('intern/*.c')
incs = '../blenlib ../blenkernel ../makesdna ../include'
-incs += ' #/extern/glew/include #intern/guardedalloc #intern/smoke/extern ../imbuf .'
+incs += ' #/extern/glew/include #intern/guardedalloc ../imbuf .'
incs += ' ' + env['BF_OPENGL_INC']
-env.BlenderLib ( 'bf_gpu', sources, Split(incs), [], libtype=['core','player'], priority=[160,110] )
+env.BlenderLib ( 'bf_gpu', sources, Split(incs), [], libtype=['core', 'player'], priority=[160, 20] )
diff --git a/source/blender/gpu/intern/Makefile b/source/blender/gpu/intern/Makefile
index 2637bff44ac..3a3ac20ff6c 100644
--- a/source/blender/gpu/intern/Makefile
+++ b/source/blender/gpu/intern/Makefile
@@ -47,7 +47,6 @@ CPPFLAGS += -I../../blenlib
CPPFLAGS += -I../../makesdna
CPPFLAGS += -I../../imbuf
CPPFLAGS += -I../../blenkernel
-CPPFLAGS += -I$(NAN_SMOKE)/include
CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include
CPPFLAGS += -I$(NAN_GLEW)/include
CPPFLAGS += -I../
diff --git a/source/blender/gpu/intern/gpu_draw.c b/source/blender/gpu/intern/gpu_draw.c
index 75e8073aafd..e7846a23905 100644
--- a/source/blender/gpu/intern/gpu_draw.c
+++ b/source/blender/gpu/intern/gpu_draw.c
@@ -38,11 +38,9 @@
#include "DNA_lamp_types.h"
#include "DNA_material_types.h"
#include "DNA_meshdata_types.h"
-#include "DNA_modifier_types.h"
#include "DNA_node_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
-#include "DNA_smoke_types.h"
#include "DNA_userdef_types.h"
#include "DNA_view3d_types.h"
@@ -64,8 +62,6 @@
#include "GPU_material.h"
#include "GPU_draw.h"
-#include "smoke_API.h"
-
/* These are some obscure rendering functions shared between the
* game engine and the blender, in this module to avoid duplicaten
* and abstract them away from the rest a bit */
@@ -748,31 +744,6 @@ int GPU_update_image_time(Image *ima, double time)
return inc;
}
-
-void GPU_free_smoke(SmokeModifierData *smd)
-{
- if(smd->type & MOD_SMOKE_TYPE_DOMAIN && smd->domain)
- {
- if(smd->domain->tex)
- GPU_texture_free(smd->domain->tex);
- smd->domain->tex = NULL;
-
- if(smd->domain->tex_shadow)
- GPU_texture_free(smd->domain->tex_shadow);
- smd->domain->tex_shadow = NULL;
- }
-}
-
-void GPU_create_smoke(SmokeModifierData *smd, int highres)
-{
- if(smd->type & MOD_SMOKE_TYPE_DOMAIN && smd->domain && !smd->domain->tex && !highres)
- smd->domain->tex = GPU_texture_create_3D(smd->domain->res[0], smd->domain->res[1], smd->domain->res[2], smoke_get_density(smd->domain->fluid));
- else if(smd->type & MOD_SMOKE_TYPE_DOMAIN && smd->domain && !smd->domain->tex && highres)
- smd->domain->tex = GPU_texture_create_3D(smd->domain->res_wt[0], smd->domain->res_wt[1], smd->domain->res_wt[2], smoke_turbulence_get_density(smd->domain->wt));
-
- smd->domain->tex_shadow = GPU_texture_create_3D(smd->domain->res[0], smd->domain->res[1], smd->domain->res[2], smd->domain->shadow);
-}
-
void GPU_free_image(Image *ima)
{
/* free regular image binding */
diff --git a/source/blender/gpu/intern/gpu_extensions.c b/source/blender/gpu/intern/gpu_extensions.c
index d7b54e425fd..467b2c4a7f4 100644
--- a/source/blender/gpu/intern/gpu_extensions.c
+++ b/source/blender/gpu/intern/gpu_extensions.c
@@ -312,69 +312,6 @@ static GPUTexture *GPU_texture_create_nD(int w, int h, int n, float *fpixels, in
return tex;
}
-
-GPUTexture *GPU_texture_create_3D(int w, int h, int depth, float *fpixels)
-{
- GPUTexture *tex;
- GLenum type, format, internalformat;
- void *pixels = NULL;
- float vfBorderColor[4] = {0.0f, 0.0f, 0.0f, 0.0f};
-
- tex = MEM_callocN(sizeof(GPUTexture), "GPUTexture");
- tex->w = w;
- tex->h = h;
- tex->depth = depth;
- tex->number = -1;
- tex->refcount = 1;
- tex->target = GL_TEXTURE_3D;
-
- glGenTextures(1, &tex->bindcode);
-
- if (!tex->bindcode) {
- fprintf(stderr, "GPUTexture: texture create failed: %d\n",
- (int)glGetError());
- GPU_texture_free(tex);
- return NULL;
- }
-
- if (!GLEW_ARB_texture_non_power_of_two) {
- tex->w = larger_pow2(tex->w);
- tex->h = larger_pow2(tex->h);
- tex->depth = larger_pow2(tex->depth);
- }
-
- tex->number = 0;
- glBindTexture(tex->target, tex->bindcode);
-
- type = GL_FLOAT; // GL_UNSIGNED_BYTE
- format = GL_RED;
- internalformat = GL_RED;
-
- //if (fpixels)
- // pixels = GPU_texture_convert_pixels(w*h*depth, fpixels);
-
- glTexImage3D(tex->target, 0, internalformat, tex->w, tex->h, tex->depth, 0, format, type, 0);
-
- if (fpixels) {
- glTexSubImage3D(tex->target, 0, 0, 0, 0, w, h, depth, format, type, fpixels);
- }
-
- glTexParameterfv(GL_TEXTURE_3D, GL_TEXTURE_BORDER_COLOR, vfBorderColor);
- glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
- glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_BORDER);
- glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_BORDER);
- glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_WRAP_R, GL_CLAMP_TO_BORDER);
-
- if (pixels)
- MEM_freeN(pixels);
-
- if (tex)
- GPU_texture_unbind(tex);
-
- return tex;
-}
-
GPUTexture *GPU_texture_from_blender(Image *ima, ImageUser *iuser, double time, int mipmap)
{
GPUTexture *tex;