You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

59 lines
1.1 KiB

  1. //
  2. // Neercs
  3. //
  4. #if !defined __VIDEO_RENDER_H__
  5. #define __VIDEO_RENDER_H__
  6. class Render : public WorldEntity
  7. {
  8. public:
  9. Render(caca_canvas_t *caca);
  10. virtual ~Render();
  11. char const *GetName() { return "<title>"; }
  12. protected:
  13. virtual void TickGame(float seconds);
  14. virtual void TickDraw(float seconds, Scene &scene);
  15. void Draw2D();
  16. void Draw3D();
  17. private:
  18. int InitDrawResources();
  19. void ShaderSimple(Framebuffer *fbo_output, int n);
  20. void TraceQuad();
  21. void Pause();
  22. void Shader();
  23. void InitShaderVar();
  24. void UpdateVar();
  25. void UpdateSize();
  26. caca_canvas_t *m_cv_screen, *m_cv_setup;
  27. class TextRender *m_txt_screen, *m_txt_setup;
  28. VertexDeclaration *m_vdecl;
  29. VertexBuffer *m_vbo;
  30. Entity *m_fps_debug;
  31. struct
  32. {
  33. Framebuffer *back, *screen, *front, *buffer,
  34. *blur_h, *blur_v, *tmp;
  35. }
  36. m_fbos;
  37. bool m_ready;
  38. bool m_pause;
  39. struct
  40. {
  41. bool shader, remanence, glow, blur, postfx,
  42. copper, color, noise, mirror, radial;
  43. }
  44. m_flags;
  45. };
  46. #endif // __VIDEO_RENDER_H__