libcrbn/shader/shcontext.hpp

00001 
00002 #ifndef __shader_context_hpp__
00003 #define __shader_context_hpp__
00004 
00005 #include <crbn/basic/paramlist.hpp>
00006 #include <crbn/basic/ray.hpp>
00007 #include <crbn/basic/intersection.hpp>
00008 #include <crbn/basic/vec3.hpp>
00009 #include "shcache.hpp"
00010 
00011 //
00012 // All about shader managment.
00013 //
00014 
00015 class ShaderContext
00016 {
00017 public:
00018 
00019   // ctor.
00020   ShaderContext();
00021 
00022   // dtor.
00023   virtual ~ShaderContext();
00024 
00025   // returns the memory used by this object.
00026   uint32 memory();
00027 
00028   // makes what must be done after the scene declaration.
00029   bool realize();
00030 
00031   // create a new shader according to 'pl'.
00032   uint32 create( char* matter_type, paramlist& pl );
00033 
00034   void eval( int32 shader_id, ray& r, intersection& inter, vec3& color );
00035 private:
00036   shCache _shcache;
00037 };
00038 
00039 #endif // __shader_context_hpp__

Generated on Tue Nov 14 15:40:08 2006 for libcrbn by  doxygen 1.5.0