Subversion Repositories gelsvn

Rev

Rev 412 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 412 Rev 417
Line 7... Line 7...
7
 *
7
 *
8
 */
8
 */
9
 
9
 
10
#include <algorithm>
10
#include <algorithm>
11
#include <string>
11
#include <string>
-
 
12
#include <cstdlib>
12
#include <CGLA/Mat3x3d.h>
13
#include <CGLA/Mat3x3d.h>
13
#include <GLGraphics/glsl_shader.h>
14
#include <GLGraphics/glsl_shader.h>
14
#include <HMesh/FaceCirculator.h>
15
#include <HMesh/FaceCirculator.h>
15
 
16
 
16
#include <GLConsole/GLConsole.h>
17
#include <GLConsole/GLConsole.h>
Line 36... Line 37...
36
		int height = 32;
37
		int height = 32;
37
		int depth = 32;
38
		int depth = 32;
38
		vector<unsigned char> texels(width*height*depth);
39
		vector<unsigned char> texels(width*height*depth);
39
		for (int i = 0; i < width*height*depth; ++i)
40
		for (int i = 0; i < width*height*depth; ++i)
40
		{
41
		{
41
			int intensity = 255.0 * (float(random()) / RAND_MAX);
42
			int intensity = 255.0 * (float(gel_rand()) / GEL_RAND_MAX);
42
			texels[i] = (unsigned char) intensity;
43
			texels[i] = (unsigned char) intensity;
43
		}
44
		}
44
		
45
		
45
		glGenTextures(1, &texname);	
46
		glGenTextures(1, &texname);	
46
		glBindTexture(GL_TEXTURE_3D, texname);	
47
		glBindTexture(GL_TEXTURE_3D, texname);