forked from binji/smoothnacl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsmoothlife.h
53 lines (43 loc) · 1.38 KB
/
smoothlife.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#ifndef SMOOTHLIFE_H_
#define SMOOTHLIFE_H_
#include <GLES2/gl2.h>
static const int AA = 0;
static const int KR = 1;
static const int KD = 2;
static const int AN = 3;
static const int AM = 4;
static const int ARB = 5; // number of real buffers
static const int AF = 0;
static const int KRF = 1;
static const int KDF = 2;
static const int ANF = 3;
static const int AMF = 4;
static const int FFT0 = 5;
static const int FFT1 = 6;
static const int AFB = 7; // number of Fourier buffers
static const int NX = 512;
static const int NY = 512;
static const int NZ = 1;
static const int SX = 512;
static const int SY = 512;
static const int BX = 9;
static const int BY = 9;
extern double kflr;
extern double kfld;
void InitializeVbo();
void InitializeTextures();
GLuint MakeProgram(const char* vertex_shader, const char* frag_shader);
void snm(GLuint prog, int an, int am, int na);
void makesnm(GLuint prog, int an, int am, int asnm);
void drawa(GLuint prog, int a);
// Like drawa, but renders from a Fourier buffer.
void drawf(GLuint prog, int a);
void fft_planx();
void fft_plany();
void makekernel(int kr, int kd);
void fft(GLuint rcprog, GLuint crprog, GLuint fftprog, int vo, int na, int si);
void kernelmul(GLuint prog, int vo, int ke, int na, double sc);
void splat2D(float *buf);
void inita2D(int a);
void testfuncs(GLuint rcprog, GLuint crprog, GLuint fftprog, GLuint drawprog);
#endif // SMOOTHLIFE_H_