The Wizards Wiki

Explore your world

User Tools

Site Tools


documentation:graphics

This is an old revision of the document!


Graphics

Core

XNAGame

This is the core implementation of IXNAGame. It provides the basic services for rendering with XNA/DirectX9 and handles mouse/keyboard input. It also provides an easy to use linerenderer and fps renderer.

DrawFPS renders fps. This will be capped to 60 unless IsFixedTimestep is set to false. Currently, vertical sync is disabled in XNAGame to enable a more interesting fps.

LineManager3D

This is used by the XNAGame to render lines, or boxes, triangles, … as lines. You add the lines every frame; add the end of the frame all the lines are removed.

Helper classes

LineManager3DLines

This class can be used to store lines for rendering with the LineManager3D. You can add lines to this object, and render them each frame without having to re-add them all like in the LineManager3D

AverageFPSCalculater

This class simply calculates the average frame length from framelenghts passed to it. It then holds a property that contains the FPS

ColladaShader

This is a basic shader implementation for rendering textured/colored/normalmapped meshes. Supports vertex colored rendering, textured rendering and normal mapped rendering

BasicShader

This is a basic shader class for a shader that holds a world/view/proj matrix. It provides functionality to compile a shader from an fx file. Note that this class does not hold an fx file, one must be provided.

Meshes

Note: Currently, these meshes have a reasonable common implementation. If more are added, inheritance or an adapter should be considered.

BoxMesh

This is a helper class for simply rendering a box with given bounds and worldmatrix. This class uses the ColladaShader for rendering. Supports raytracing

SphereMesh

This is a helper class for simply rendering a sphere with given radius and worldmatrix. TODO: implement raytracing functionality

documentation/graphics.1307379453.txt.gz · Last modified: 2024/08/26 13:57 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki