10#include "ps2s/packet.h"
23 tU64 NumDirLights : 2;
27 tU64 PerVtxMaterial : 3;
30 tU64 TwoSidedLighting : 1;
39 inline operator tU64()
const
45 tU64* value = (tU64*)
this;
49 inline void operator=(tU64 value)
56} __attribute__((aligned(8)));
58namespace RendererProps {
59typedef enum { kPtsLinesStripsFans = 1 << 0,
61 kQuads = 1 << 2 } tPrimType;
63typedef enum { k3DirLights = 1 << 0,
64 k8DirLights = 1 << 1 } tNumDirLights;
66typedef enum { k1PtLight = 1 << 0,
68 k8PtLights = 1 << 2 } tNumPtLights;
70typedef enum { kNoMaterial = 1 << 0,
72 kSpecular = 1 << 2 } tPerVtxMaterial;
74typedef enum { kLinear = 1 << 0,
75 kIndexed = 1 << 1 } tArrayAccess;
77typedef enum { kNonClipped = 1 << 0,
78 kClipped = 1 << 1 } tClipping;
102 void SetCapabilities(tU64 caps) { Capabilities = caps; }
103 void SetRequirements(tU64 reqs) { Requirements = reqs; }
106 virtual tU64 GetCapabilities()
const {
return Capabilities; }
107 virtual tU64 GetRequirements()
const {
return Requirements; }
119 virtual void InitContext(GLenum primType, tU32 rcChanges,
bool userRcChanged) = 0;
127 mError(
"This renderer doesn't do linear arrays");
132 mError(
"This renderer doesn't do indexed arrays");
virtual bool GetCachePackets(const CGeometryBlock &geometry)=0
virtual void InitContext(GLenum primType, tU32 rcChanges, bool userRcChanged)=0
virtual void DrawIndexedArrays(CGeometryBlock &block)
Draw arrays of vertices that are accessed by index (i.e., glDrawElements)
virtual void DrawLinearArrays(CGeometryBlock &block)
Draw arrays of vertices that are accessed linearly (i.e., glDrawArrays)
virtual void Load()=0
Load the renderer into vu0/vu1 memory.
virtual const char * GetName()=0
Return a pointer to the text name of this renderer.
virtual int GetPacketQwordSize(const CGeometryBlock &geometry)=0
virtual CRendererProps GetRenderContextDeps()=0