dd_context.h 598 B

123456789101112131415161718192021222324252627282930
  1. #ifndef DD_CONTEXT_H
  2. #define DD_CONTEXT_H
  3. /* global camera
  4. * this is a "point" in 3d space, that is used as an "offset" to draw meshes
  5. * it can be manipulated with functions to simulate a camera
  6. */
  7. struct dd_dynamic_array *dd_cam;
  8. #define dd_global_matrix dd_da_get(dd_cam, dd_cam->elements-1)
  9. int dd_create_context();
  10. void dd_buffer_clear();
  11. void dd_buffer_draw();
  12. void dd_version();
  13. void (*dd_update)(void);
  14. void (*dd_draw)(void);
  15. void dd_loop();
  16. void dd_update_func(void*);
  17. void dd_draw_func(void*);
  18. #define dd_update_func(x) dd_update = x
  19. #define dd_draw_func(x) dd_draw = x
  20. #endif