gpuray_glsl
view src/gpuscene.h @ 3:297dbc5080c4
cone intersection
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sun, 09 Nov 2014 20:13:33 +0200 |
parents | |
children | 2ed3da7dc0bc |
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"
10 class GPUScene : public Scene {
11 public:
12 enum { TEX_SPHERE, TEX_PLANE, TEX_BOX, TEX_TEXTURE, TEX_ENV, TEX_XFORM, NUM_TEXTURES };
14 private:
15 unsigned int textures[NUM_TEXTURES];
16 Vector4 *xform_buf;
18 int object_index(const Object *obj) const;
20 void create_sphere_texture(const std::vector<Sphere*> &spheres);
21 void create_plane_texture(const std::vector<Plane*> &planes);
22 void create_box_texture(const std::vector<Box*> &box);
23 void create_megatexture();
24 void create_env_texture();
25 void create_xform_texture();
27 public:
28 GPUScene();
29 ~GPUScene();
31 bool create_textures();
33 void update_xform_texture();
35 unsigned int get_texture(int which) const;
36 };
38 #endif // GPUSCENE_H_