00001 00002 #ifndef __crbn_context_h__ 00003 #define __crbn_context_h__ 00004 00005 #include <crbn/api.h> 00006 00007 #include <crbn/basic/basic.h> 00008 #include <crbn/sampler/sampler.hpp> 00009 #include <crbn/renderer/renderer.hpp> 00010 00011 #include "camera/ccontext.hpp" 00012 #include "graphics/grcontext.hpp" 00013 #include "objectset/oscontext.hpp" 00014 #include "output/ocontext.hpp" 00015 00016 #include "sampler/scontext.hpp" 00017 #include "geometry/gcontext.hpp" 00018 #include "renderer/rcontext.hpp" 00019 #include "matter/mcontext.hpp" 00020 #include "shader/shcontext.hpp" 00021 00022 #include "timer.hpp" 00029 typedef enum { 00030 IN_FRAME = 1, 00031 SKIP_FRAME = 2 00032 } FLAGS; 00033 00034 typedef struct _crbn_time_t { 00035 Timer frame_load_timer; 00036 Timer frame_rendering_timer; 00037 Timer global_timer; 00038 } crbn_time_t; 00039 00045 struct _crbn_context_t { 00046 int32 thread_number; 00047 00048 vec3 background_color; 00049 00050 int32 frame_current; 00051 int32 frame_first; 00052 int32 frame_last; 00053 00054 CameraContext* ccontext; 00055 GraphicsContext* grcontext; 00056 ObjectSetContext* oscontext; 00057 OutputContext* ocontext; 00058 SamplerContext* scontext; 00059 GeometryContext* gcontext; 00060 ShaderContext* shcontext; 00061 RendererContext* rcontext; 00062 MatterContext* mcontext; 00063 00064 FILE* file_output; 00065 uint32 flags; 00066 bool noerror; 00067 00068 crbn_stat_cb cb_line; 00069 crbn_stat_cb cb_frame; 00070 crbn_stat_cb cb_global; 00071 00072 crbn_time_t time; 00073 crbn_stat_t stat; 00074 }; 00075 00076 #endif // __crbn_context_h__