// // Information about a single render event that is saved between frames // struct PersistentRenderInfo { UINT VShaderHash, PShaderHash; }; OutputDataStream& operator << (OutputDataStream &File, const PersistentRenderInfo &Info); InputDataStream& operator >> (InputDataStream &File, PersistentRenderInfo &Info); class CapturedGeometry { public: CapturedGeometry() { Utility::ZeroMem(_Info); } void FreeMemory(); #if defined(D3DCALLBACK_DLL) || defined(D3DCALLBACK_APP) void LoadFromD3D(const RenderInfo &Data, const Vector &ProcessedVertices); #endif void SaveToFile(const String &Filename) const; void LoadFromFile(const String &Filename); void SaveToMemory(Vector &Data) const; void LoadFromMemory(const Vector &Data); void SaveToMesh(BaseMesh &MeshOut) const; __forceinline const PersistentRenderInfo& Info() const { return _Info; } __forceinline PersistentRenderInfo& Info() { return _Info; } __forceinline const Vector& Indices() const { return _Indices; } __forceinline const Vector& Vertices() const { return _Vertices; } #if defined(CAPTURE_VIEWER) void Prepare(GraphicsDevice &GD); __forceinline const D3D9Mesh& GetMesh() { return _Mesh; } #endif private: PersistentRenderInfo _Info; Vector _Vertices; Vector _Indices; #if defined(CAPTURE_VIEWER) RGBColor _Color; D3D9Mesh _Mesh; #endif };