151 double GetTriangleRate()
const {
return m_triangleRateMeter.Frequency(); }
175 unsigned long m_width;
176 unsigned long m_height;
178 BOOL m_isInitialized;
179 BOOL m_stopRendering;
184 unsigned long m_frameCount;
187 unsigned long m_triangleCount;
Utility for measuring the frequency (operations per second) of a repeated operation.
double Frequency() const
Returns the measured frequency (operations per elapsed second).
[AI] Encapsulates a rendering surface, its associated hardware device, renderer, and view.
Tgl::View * GetView() const
[AI] Gets the current view/camera for this surface.
Tgl::Device * GetDevice() const
[AI] Returns the graphics device used by this surface, e.g.
Tgl::Group * GetScene() const
[AI] Returns the currently attached 3D scene root/group.
Tgl::Renderer * GetRenderer() const
[AI] Gets the active renderer for this surface.
virtual Tgl::View * CreateView(Tgl::Renderer *, Tgl::Device *)=0
[AI] Abstract view creation.
virtual BOOL Create(const CreateStruct &, Tgl::Renderer *, Tgl::Group *pScene)
[AI] Creates and initializes the surface, rendering device, and optionally installs scene graph.
virtual void Destroy()
[AI] Destroys all resources (view, device), releasing scene and renderer references.
unsigned long GetFrameCount() const
[AI] Returns the frame count since creation or since last meter reset.
virtual ~TglSurface()
[AI] Virtual destructor also triggers Destroy().
double GetFrameRate() const
[AI] Returns the measured frame rate (frames per second) for the current surface.
double GetRenderingRate() const
[AI] Returns the measured rendering rate (frames per second) for the rendering routine.
virtual double Render()
[AI] Renders a single frame and returns the render time for that frame.
TglSurface()
[AI] Constructs a new TglSurface instance with members initialized to their default state.
virtual void DestroyView()
[AI] Destroys (deletes) the surface's view/camera, and resets the pointer to null.
unsigned long GetWidth() const
[AI] Returns the width (in pixels) of the rendered surface.
unsigned long GetHeight() const
[AI] Returns the height (in pixels) of the rendered surface.
[AI] Represents a rendering device/context for the Tgl renderer.
[AI] Scene graph node for parental transforms/color/material/texture; can hold meshes or other groups...
[AI] Main interface/factory for rendering resources and scene graphs.
[AI] Represents a rendering viewport and drawing context.
[AI] Namespace containing all classes related to the 3D graphics abstraction/rendering engine.
[AI] Contains initialization parameters for creating a TglSurface and its underlying DDraw/D3D resour...
BOOL m_isWideViewAngle
[AI] Enables wide or default field-of-view projection.
BOOL m_isFullScreen
[AI] TRUE to use fullscreen mode, FALSE for windowed rendering.
HWND m_hWnd
[AI] Handle to the window to be associated with this surface.
IDirectDraw * m_pDirectDraw
[AI] DirectDraw interface pointer for low-level surface management.
IDirectDrawSurface * m_pFrontBuffer
[AI] DirectDraw primary/front buffer surface.
IDirect3D2 * m_direct3d
[AI] Direct3D2 interface pointer for 3D initialization.
const GUID * m_pDriverGUID
[AI] DirectDraw driver GUID to use or NULL for primary display.
IDirect3DDevice2 * m_d3dDevice
[AI] Direct3D2 device interface (hardware or emulated).
IDirectDrawPalette * m_pPalette
[AI] Optional palette for indexed color surfaces.
IDirectDrawSurface * m_pBackBuffer
[AI] Optional DirectDraw back buffer for double buffering.