gpuray_glsl

annotate src/gpuscene.h @ 2:6e3a4daf3159

adding cones
author John Tsiombikas <nuclear@mutantstargoat.com>
date Sun, 09 Nov 2014 14:39:01 +0200
parents
children 2ed3da7dc0bc
rev   line source
nuclear@0 1 #ifndef GPUSCENE_H_
nuclear@0 2 #define GPUSCENE_H_
nuclear@0 3
nuclear@0 4 #include <vector>
nuclear@0 5 #include "scene.h"
nuclear@0 6 #include "sphere.h"
nuclear@0 7 #include "plane.h"
nuclear@0 8 #include "box.h"
nuclear@0 9
nuclear@0 10 class GPUScene : public Scene {
nuclear@0 11 public:
nuclear@0 12 enum { TEX_SPHERE, TEX_PLANE, TEX_BOX, TEX_TEXTURE, TEX_ENV, TEX_XFORM, NUM_TEXTURES };
nuclear@0 13
nuclear@0 14 private:
nuclear@0 15 unsigned int textures[NUM_TEXTURES];
nuclear@0 16 Vector4 *xform_buf;
nuclear@0 17
nuclear@0 18 int object_index(const Object *obj) const;
nuclear@0 19
nuclear@0 20 void create_sphere_texture(const std::vector<Sphere*> &spheres);
nuclear@0 21 void create_plane_texture(const std::vector<Plane*> &planes);
nuclear@0 22 void create_box_texture(const std::vector<Box*> &box);
nuclear@0 23 void create_megatexture();
nuclear@0 24 void create_env_texture();
nuclear@0 25 void create_xform_texture();
nuclear@0 26
nuclear@0 27 public:
nuclear@0 28 GPUScene();
nuclear@0 29 ~GPUScene();
nuclear@0 30
nuclear@0 31 bool create_textures();
nuclear@0 32
nuclear@0 33 void update_xform_texture();
nuclear@0 34
nuclear@0 35 unsigned int get_texture(int which) const;
nuclear@0 36 };
nuclear@0 37
nuclear@0 38 #endif // GPUSCENE_H_