W3DSnow.h 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /*
  2. ** Command & Conquer Generals Zero Hour(tm)
  3. ** Copyright 2025 Electronic Arts Inc.
  4. **
  5. ** This program is free software: you can redistribute it and/or modify
  6. ** it under the terms of the GNU General Public License as published by
  7. ** the Free Software Foundation, either version 3 of the License, or
  8. ** (at your option) any later version.
  9. **
  10. ** This program is distributed in the hope that it will be useful,
  11. ** but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. ** GNU General Public License for more details.
  14. **
  15. ** You should have received a copy of the GNU General Public License
  16. ** along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. // FILE: W3DSnow.h /////////////////////////////////////////////////////////
  19. #ifndef _W3DSNOW_H_
  20. #define _W3DSNOW_H_
  21. #include "GameClient/Snow.h"
  22. class DX8IndexBufferClass;
  23. class RenderInfoClass;
  24. class TextureClass;
  25. struct IDirect3DVertexBuffer8;
  26. class W3DSnowManager : public SnowManager
  27. {
  28. public :
  29. W3DSnowManager(void);
  30. ~W3DSnowManager(void);
  31. virtual void init( void );
  32. virtual void reset( void );
  33. virtual void update ( void);
  34. virtual void updateIniSettings(void);
  35. void render(RenderInfoClass &rinfo);
  36. void renderAsQuads(RenderInfoClass &rinfo, Int cubeOriginX, Int cubeOriginY, Int cubeDimX, Int cubeDimY);
  37. void renderSubBox(RenderInfoClass &rinfo, Int originX, Int originY, Int cubeDimX, Int cubeDimY );
  38. void ReleaseResources(void);
  39. Bool ReAcquireResources(void);
  40. private:
  41. DX8IndexBufferClass *m_indexBuffer;
  42. TextureClass *m_snowTexture;
  43. IDirect3DVertexBuffer8* m_VertexBufferD3D;
  44. Int m_dwBase; ///<index to beginning of unused vertex buffer space.
  45. Int m_dwFlush; ///<maximum amount of vertices to sumbit before rendering.
  46. Int m_dwDiscard; ///<maximum index allowed before needing to discard the buffer.
  47. Int m_leafDim; ///<horizontal dimensions of leaf nodes that are always rendered without visibility checks.
  48. Real m_snowCeiling; ///<height at the top of the cube with camera at center.
  49. Real m_heightTraveled; ///<height that snow flake traveled this frame.
  50. Int m_totalRendered; ///<total number of snow particles rendered this frame - only for profiling.
  51. Real m_cullOverscan; ///<how much extra padding to put on the sides of AABoxes when view culling.
  52. };
  53. #endif // _W3DSNOW_H_