2 FLUIDS v.1 - SPH Fluid Simulator for CPU and GPU
3 Copyright (C) 2009. Rama Hoetzlein, http://www.rchoetzlein.com
6 This software is provided 'as-is', without any express or implied
7 warranty. In no event will the authors be held liable for any damages
8 arising from the use of this software.
10 Permission is granted to anyone to use this software for any purpose,
11 including commercial applications, and to alter it and redistribute it
12 freely, subject to the following restrictions:
14 1. The origin of this software must not be misrepresented; you must not
15 claim that you wrote the original software. If you use this software
16 in a product, an acknowledgment in the product documentation would be
17 appreciated but is not required.
18 2. Altered source versions must be plainly marked as such, and must not be
19 misrepresented as being the original software.
20 3. This notice may not be removed or altered from any source distribution.
26 #include "common_defs.h"
31 #ifdef _MSC_VER // Windows
48 extern void checkOpenGL ();
49 extern void drawText ( int x, int y, char* msg);
50 extern void drawGrid ();
51 extern void measureFPS ();
53 extern mint::Time tm_last;
58 extern void disableShadows ();
59 extern void checkFrameBuffers ();
61 extern GLuint glSphere;
62 extern float glRadius;
63 extern void setSphereRadius ( float f );
64 extern void drawSphere ();
67 extern void setShadowLight ( float fx, float fy, float fz, float tx, float ty, float tz, float fov );
68 extern void setShadowLightColor ( float dr, float dg, float db, float sr, float sg, float sb );
70 extern void createFrameBuffer ();
71 extern void createShadowTextures ();
72 extern void computeLightMatrix ( int n, int tx, int ty );
73 extern void renderDepthMap_Clear ( float wx, float wy );
74 extern void renderDepthMap_FrameBuffer ( int n, float wx, float wy );
75 extern void renderShadowStage ( int n, float* vmat );
76 extern void renderShadows ( float* vmat );
77 extern void drawScene ( float* view_mat, bool bShaders ); // provided by user
79 extern float light_proj[16];
80 extern float light_x, light_y, light_z;
81 extern float light_tox, light_toy, light_toz;
82 extern float light_mfov;
84 extern GLuint shadow1_id;
85 extern GLuint shadow2_id;