gpuray_glsl

annotate 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
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@4 9 #include "cone.h"
nuclear@0 10
nuclear@0 11 class GPUScene : public Scene {
nuclear@0 12 public:
nuclear@4 13 enum { TEX_SPHERE, TEX_PLANE, TEX_BOX, TEX_CONE, TEX_TEXTURE, TEX_ENV, TEX_XFORM, NUM_TEXTURES };
nuclear@0 14
nuclear@0 15 private:
nuclear@0 16 unsigned int textures[NUM_TEXTURES];
nuclear@0 17 Vector4 *xform_buf;
nuclear@0 18
nuclear@0 19 int object_index(const Object *obj) const;
nuclear@0 20
nuclear@0 21 void create_sphere_texture(const std::vector<Sphere*> &spheres);
nuclear@0 22 void create_plane_texture(const std::vector<Plane*> &planes);
nuclear@0 23 void create_box_texture(const std::vector<Box*> &box);
nuclear@4 24 void create_cone_texture(const std::vector<Cone*> &cones);
nuclear@0 25 void create_megatexture();
nuclear@0 26 void create_env_texture();
nuclear@0 27 void create_xform_texture();
nuclear@0 28
nuclear@0 29 public:
nuclear@0 30 GPUScene();
nuclear@0 31 ~GPUScene();
nuclear@0 32
nuclear@0 33 bool create_textures();
nuclear@0 34
nuclear@0 35 void update_xform_texture();
nuclear@0 36
nuclear@0 37 unsigned int get_texture(int which) const;
nuclear@0 38 };
nuclear@0 39
nuclear@0 40 #endif // GPUSCENE_H_