IsosurfacesGL.h 2.05 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/*
# Copyright 2016-2018 The NOMAD Developers Group
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 # You may obtain a copy of the License at
 #
 #     http://www.apache.org/licenses/LICENSE-2.0
 #
 # Unless required by applicable law or agreed to in writing, software
 # distributed under the License is distributed on an "AS IS" BASIS,
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
*/


18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#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
	);

42
GLenum SetupBlending (GLuint *vao, GLuint *vertex, GLuint *indices);
43
GLenum PrepareISOShader (GLuint *p, GLint *mat);
44
GLenum PrepareISOTransShader (GLuint *p, GLint *mat, GLuint *b);
45
//#if defined(WIN32) || defined (CAVE)
46
47
bool SetupDepthPeeling(int renderWidth, int renderHeight, int zlayers, GLuint *textures /*[zlayers+2 (2 depth, zlayers colour)]*/,
					   GLuint *peelingFramebuffer);
48
void CleanDepthTexture (GLuint t);
49
50
51
52
53
54
55
56


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

57
58
GLenum EnableDepthFB(unsigned int zl, const GLuint transP, 
	const GLuint peelingFramebuffer, const GLuint *texture /*[2+ZLAYERS]*/);
59
60
void DeleteBlendingBuffers(GLuint *vao, GLuint *vertex, GLuint *indices);
void BlendTextures(GLuint *textures, int zlayers);
61
//#endif
62
#endif // __ISOSURFACESGL_H