fShadowFBOC.h 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. //---------------------------------------------------------------------------
  2. #ifndef fShadowFBOCH
  3. #define fShadowFBOCH
  4. //---------------------------------------------------------------------------
  5. #include <System.Classes.hpp>
  6. #include <Vcl.Controls.hpp>
  7. #include <Vcl.StdCtrls.hpp>
  8. #include <Vcl.Forms.hpp>
  9. #include <Vcl.Imaging.Jpeg.hpp>
  10. #include "GLS.BaseClasses.hpp"
  11. #include "GLS.Cadencer.hpp"
  12. #include "GLS.Coordinates.hpp"
  13. #include "GLSL.CustomShader.hpp"
  14. #include "GLS.FBORenderer.hpp"
  15. #include "GLS.GeomObjects.hpp"
  16. #include "GLS.HUDObjects.hpp"
  17. #include "GLS.Material.hpp"
  18. #include "GLS.Objects.hpp"
  19. #include "GLS.Scene.hpp"
  20. #include "GLS.SimpleNavigation.hpp"
  21. #include "GLS.VectorFileObjects.hpp"
  22. #include "GLS.SceneViewer.hpp"
  23. #include "Formats.DDSImage.hpp"
  24. #include <Vcl.ExtCtrls.hpp>
  25. #include "GLSL.Shader.hpp"
  26. //---------------------------------------------------------------------------
  27. class TForm1 : public TForm
  28. {
  29. __published: // IDE-managed Components
  30. TGLSceneViewer *GLSceneViewer1;
  31. TGLScene *GLScene1;
  32. TGLCamera *GLCamera1;
  33. TGLSphere *GLSphere1;
  34. TGLDummyCube *SceneRoot;
  35. TGLMaterialLibrary *GLMaterialLibrary1;
  36. TGLLightSource *GLLightSource1;
  37. TGLFBORenderer *LightFBORenderer;
  38. TGLDirectOpenGL *PrepareShadowMapping;
  39. TGLCamera *GLCamera2;
  40. TGLPlane *GLPlane1;
  41. TGLTorus *GLTorus1;
  42. TGLCylinder *GLCylinder1;
  43. TGLFreeForm *GLFreeForm1;
  44. TGLHUDSprite *GLShadowTextureSprite;
  45. TGLCadencer *GLCadencer1;
  46. TTimer *Timer1;
  47. TGLSLShader *GLSLShader1;
  48. TGLSLShader *GLSLShader2;
  49. TGLSimpleNavigation *GLNavigation;
  50. void __fastcall GLSLShader1Apply(TGLCustomGLSLShader *Shader);
  51. void __fastcall GLSLShader1UnApply(TGLCustomGLSLShader *Shader, bool &ThereAreMorePasses);
  52. void __fastcall GLSLShader2Apply(TGLCustomGLSLShader *Shader);
  53. void __fastcall GLSLShader2Initialize(TGLCustomGLSLShader *Shader);
  54. void __fastcall GLCadencer1Progress(TObject *Sender, const double deltaTime, const double newTime);
  55. void __fastcall GLSceneViewer1BeforeRender(TObject *Sender);
  56. void __fastcall FormResize(TObject *Sender);
  57. void __fastcall FormCreate(TObject *Sender);
  58. void __fastcall PrepareShadowMappingRender(TObject *Sender, TGLRenderContextInfo &rci);
  59. private: // User declarations
  60. TGLMatrix *FBiasMatrix;
  61. TGLMatrix *FLightModelViewMatrix;
  62. TGLMatrix *FLightProjMatrix;
  63. TGLMatrix *FInvCameraMatrix;
  64. TGLMatrix *FEyeToLightMatrix;
  65. public: // User declarations
  66. __fastcall TForm1(TComponent* Owner);
  67. };
  68. //---------------------------------------------------------------------------
  69. extern PACKAGE TForm1 *Form1;
  70. //---------------------------------------------------------------------------
  71. #endif