Subversion Repositories Games.Carmageddon

Rev

Blame | Last modification | View Log | Download | RSS feed

  1. #ifndef HARNESS_BRENDER_RENDERER_DISPATCH
  2. #define HARNESS_BRENDER_RENDERER_DISPATCH
  3.  
  4. #include "brender/br_types.h"
  5.  
  6. #define MAX_STATE_STACK 32
  7.  
  8. struct state_matrix {
  9.     br_matrix34 model_to_view;
  10.     br_matrix4 view_to_screen;
  11.     br_matrix34 view_to_environment;
  12.  
  13.     br_scalar hither_z;
  14.     br_scalar yon_z;
  15. };
  16.  
  17. typedef struct state_all {
  18.     struct br_renderer* renderer;
  19.     struct state_matrix matrix;
  20.  
  21. } state_all;
  22.  
  23. // Same structure as br_renderer_state
  24. typedef struct harness_br_renderer {
  25.     struct br_renderer_dispatch* dispatch;
  26.     char* identifier;
  27.     struct br_device* device;
  28.  
  29.     void* object_list;
  30.     struct state_all state;
  31.     struct state_all* default_state;
  32.     struct br_renderer_state_stored* last_restored;
  33.     struct br_primitive_library* plib;
  34.  
  35.     struct state_all state_stack[MAX_STATE_STACK];
  36.     br_uint_32 stack_top;
  37.     br_renderer_facility* renderer_facility;
  38.  
  39. } harness_br_renderer;
  40.  
  41. harness_br_renderer* NewHarnessBrRenderer(void);
  42.  
  43. #endif
  44.