IsosurfacesGL.h 1.45 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
#ifndef __ISOSURFACESGL_H
#define __ISOSURFACESGL_H

#include "rply/rply.h"

//number of components in our vertices data xyz+nxnynz+rgba
#define numComponents 10

bool AddModelToScene( const float *mat/*[16]*/, std::vector<float> &vertdata, 
#ifndef INDICESGL32
	std::vector<short> & vertindices, 
#else
	std::vector<GLuint> & vertindices,
#endif
	const char * model, bool water, bool colours, int set);

GLenum PrepareGLiso (GLuint vao, GLuint vertbuffer, const std::vector<float> &vertdata, GLuint indbuffer,
 #ifndef INDICESGL32
	std::vector<short> & vertindices 
#else
	std::vector<GLuint> & vertindices
#endif
	);

25
GLenum SetupBlending (GLuint *vao, GLuint *vertex, GLuint *indices);
26
GLenum PrepareISOShader (GLuint *p, GLint *mat);
27
GLenum PrepareISOTransShader (GLuint *p, GLint *mat, GLuint *b);
28
//#if defined(WIN32) || defined (CAVE)
29 30
bool SetupDepthPeeling(int renderWidth, int renderHeight, int zlayers, GLuint *textures /*[zlayers+2 (2 depth, zlayers colour)]*/,
					   GLuint *peelingFramebuffer);
31
void CleanDepthTexture (GLuint t);
32 33 34 35 36 37 38 39


#if defined(WIN32) || defined(CAVE)
void CleanDepthTexture (GLuint t);
#else
void CleanDepthTexture (GLuint t, int width, int height);
#endif

40 41
GLenum EnableDepthFB(unsigned int zl, const GLuint transP, 
	const GLuint peelingFramebuffer, const GLuint *texture /*[2+ZLAYERS]*/);
42 43
void DeleteBlendingBuffers(GLuint *vao, GLuint *vertex, GLuint *indices);
void BlendTextures(GLuint *textures, int zlayers);
44
//#endif
45
#endif // __ISOSURFACESGL_H