gpuray_glsl

view src/gpuscene.h @ 5:000017955721

fixed the cone normal
author John Tsiombikas <nuclear@member.fsf.org>
date Tue, 11 Nov 2014 20:25:59 +0200
parents f234630e38ff
children
line source
1 #ifndef GPUSCENE_H_
2 #define GPUSCENE_H_
4 #include <vector>
5 #include "scene.h"
6 #include "sphere.h"
7 #include "plane.h"
8 #include "box.h"
9 #include "cone.h"
11 class GPUScene : public Scene {
12 public:
13 enum { TEX_SPHERE, TEX_PLANE, TEX_BOX, TEX_CONE, TEX_TEXTURE, TEX_ENV, TEX_XFORM, NUM_TEXTURES };
15 private:
16 unsigned int textures[NUM_TEXTURES];
17 Vector4 *xform_buf;
19 int object_index(const Object *obj) const;
21 void create_sphere_texture(const std::vector<Sphere*> &spheres);
22 void create_plane_texture(const std::vector<Plane*> &planes);
23 void create_box_texture(const std::vector<Box*> &box);
24 void create_cone_texture(const std::vector<Cone*> &cones);
25 void create_megatexture();
26 void create_env_texture();
27 void create_xform_texture();
29 public:
30 GPUScene();
31 ~GPUScene();
33 bool create_textures();
35 void update_xform_texture();
37 unsigned int get_texture(int which) const;
38 };
40 #endif // GPUSCENE_H_