summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilrik de Loose <wilrik@wilrik.nl>2008-01-08 13:06:34 (GMT)
committerWilrik de Loose <wilrik@wilrik.nl>2008-01-08 13:06:34 (GMT)
commita570135d7b6167a56f98ee392fea8dc943168fd5 (patch)
tree0888fd273680f038c5717cda1cbb75ed8031f32f
parent8b709499993c0590038e440853e6a84b2ff54654 (diff)
download2iv35-a570135d7b6167a56f98ee392fea8dc943168fd5.zip
2iv35-a570135d7b6167a56f98ee392fea8dc943168fd5.tar.gz
2iv35-a570135d7b6167a56f98ee392fea8dc943168fd5.tar.bz2
-rw-r--r--Smoke/Week 2.suobin64000 -> 64512 bytes
-rw-r--r--Smoke/Week 2.vcproj16
-rw-r--r--Smoke/renderer_gl.c19
3 files changed, 23 insertions, 12 deletions
diff --git a/Smoke/Week 2.suo b/Smoke/Week 2.suo
index 1203660..4b7ea18 100644
--- a/Smoke/Week 2.suo
+++ b/Smoke/Week 2.suo
Binary files differ
diff --git a/Smoke/Week 2.vcproj b/Smoke/Week 2.vcproj
index 92c6134..54a5b44 100644
--- a/Smoke/Week 2.vcproj
+++ b/Smoke/Week 2.vcproj
@@ -763,6 +763,10 @@
>
</File>
<File
+ RelativePath=".\normals.c"
+ >
+ </File>
+ <File
RelativePath=".\palette.c"
>
</File>
@@ -928,6 +932,10 @@
>
</File>
<File
+ RelativePath=".\normals.h"
+ >
+ </File>
+ <File
RelativePath=".\palette.h"
>
</File>
@@ -966,19 +974,19 @@
>
</File>
<File
- RelativePath="fftw-2.1.3\rfftw\Makefile.am"
+ RelativePath="fftw-2.1.3\fftw\Makefile.am"
>
</File>
<File
- RelativePath="fftw-2.1.3\fftw\Makefile.am"
+ RelativePath="fftw-2.1.3\rfftw\Makefile.am"
>
</File>
<File
- RelativePath="fftw-2.1.3\fftw\Makefile.in"
+ RelativePath="fftw-2.1.3\rfftw\Makefile.in"
>
</File>
<File
- RelativePath="fftw-2.1.3\rfftw\Makefile.in"
+ RelativePath="fftw-2.1.3\fftw\Makefile.in"
>
</File>
<File
diff --git a/Smoke/renderer_gl.c b/Smoke/renderer_gl.c
index d84e59c..62f513f 100644
--- a/Smoke/renderer_gl.c
+++ b/Smoke/renderer_gl.c
@@ -150,11 +150,11 @@ static void render_normal(void)
int i, j, idx, DIM;
double px, py;
fftw_real wn, hn;
+ float normal_scale = 16.0f;
DIM = fluids_get_dim();
wn = (fftw_real)winWidth / (fftw_real)(DIM + 1); // Grid cell width
hn = (fftw_real)winHeight / (fftw_real)(DIM + 1); // Grid cell height
- float normal_scale = 16.0f;
glDisable(GL_LIGHTING);
glBegin(GL_LINES);
@@ -185,11 +185,11 @@ static void render_normals(void)
double px, py;
fftw_real wn, hn;
fftw_real *height;
+ float normal_scale = 10.0f;
DIM = fluids_get_dim();
wn = (fftw_real)winWidth / (fftw_real)(DIM + 1); // Grid cell width
hn = (fftw_real)winHeight / (fftw_real)(DIM + 1); // Grid cell height
- float normal_scale = 10.0f;
height = heightplots_get_frame();
@@ -834,15 +834,18 @@ void renderer_init_gl(void)
float LightPosition[] = { -250.0f, -250.0f, -300.0f, 1.00f }; // Position of the light source
glEnable(GL_TEXTURE_2D);
- glShadeModel(GL_SMOOTH); // Enable smooth shading
- glClearColor(0.0f, 0.0f, 0.0f, 0.0f); // Black background
- glClearDepth(1.0f); // Depth buffer setup
- glDepthFunc(GL_LESS); // The type of depth testing to do
- glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST); // Really nice perspective calculations
- glHint(GL_POINT_SMOOTH_HINT, GL_NICEST); // Really nice point smoothing
+ glShadeModel(GL_SMOOTH);
+ glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
+ glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
+ glHint(GL_POINT_SMOOTH_HINT, GL_NICEST);
+
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE);
+
glEnable(GL_DEPTH_TEST);
+ glClearDepth(1.0f);
+ glDepthFunc(GL_LESS);
+
glEnable(GL_LIGHTING);
glEnable(GL_LIGHT0);
glEnable(GL_COLOR_MATERIAL);