resonance 1.0.1
Loading...
Searching...
No Matches
drawverts.h File Reference
#include "gfx/gfxdevice.h"
Include dependency graph for drawverts.h:

Go to the source code of this file.

Classes

struct  Rnd::DrawVert
 Vertex as the software draw paths leave it, ready for the GS. More...

Namespaces

namespace  Rnd
 The rendering engine.

Enumerations

enum  Rnd::DrawVertPosLane { Rnd::kDrawVertPosX = 0 , Rnd::kDrawVertPosY = 1 , Rnd::kDrawVertPosZ = 2 , Rnd::kDrawVertPosFog = 3 }
 Lanes of DrawVert::mPos. More...

Functions

int Rnd::IsSphereInsideFrustum (const Sphere &sphere, const Frustum &frustum)
 Report whether a sphere lies wholly inside a frustum.
int Rnd::IsSphereInDrawFrustum (const Sphere &sphere)
 Report whether a sphere lies wholly inside the draw frustum, g_drawFrustum.
void Rnd::TransformAndLightMeshVerts (DrawVert *pOutVerts, const float *pXfm, MeshVert *pVerts, int nCount, int bWriteClipFlags, const Sphere &sphere)
 Transform and light a run of vertices into the shared draw buffer.
void Rnd::TransformMeshVertsNoLight (DrawVert *pOutVerts, MeshVert *pVerts, int nCount, const float *pXfm)
 Transform a run of vertices without lighting them.
void Rnd::ClipTriangleToFrustum (unsigned nIdx0, unsigned nIdx1, unsigned nIdx2, DrawVert *pVerts, int *pnNextIndex)
 Clip one triangle against the near plane and the scissor rectangle and append the polygon to the vertex buffer.
int Rnd::EmitFaceVu1Setup (const float *pXfm, const Sphere &sphere)
 Emit the VU1 parameter block for a face pass and return the microprogram entry to run.
void Rnd::EmitEdgeVu1Setup (const float *pXfm, const Color &color)
 Emit the VU1 parameter quadwords for an edge pass.
void Rnd::EmitParticleVu1Setup ()
 Emit the VU1 parameter quadwords for a particle pass.
int Rnd::PackParticleQuads (DrawVert *pOutVerts, int nMode, const Particle *pFirst, int nLineLength)
 Pack a run of live particles into the shared draw buffer.

Variables

constexpr int Rnd::kDrawVertCapacity = 2500
 Vertices a single draw may submit, from the overflow guard in Rnd::PsMesh::DrawShowing().
constexpr int Rnd::kDrawVertLanes = 4
 Integer lanes in DrawVert::mColor and DrawVert::mPos.
constexpr int Rnd::kDrawVertClipAnyPlane = 0x3f
 Every plane of the six-plane frustum.
constexpr int Rnd::kDrawVertClipFarPlane = 0x10
 Far plane, the vclipw judgement z > w, which drops a triangle outright rather than clipping it.
constexpr int Rnd::kDrawVertClipOtherPlanes = 0x2f
 The five planes a triangle is rejected against only when all its vertices fail one.
DrawVert Rnd::g_aDrawVerts []
 Buffer every software draw path transforms its vertices into.
Frustum Rnd::g_drawFrustum
 World-space frustum IsSphereInsideFrustum() tests against.
int Rnd::g_nFogEnabled
 Non-zero while fog is enabled.