PS2GL
OpenGL*-like API for the PS2
|
Public Member Functions | |
CIndexedRenderer (void *packet, int packetSize, CRendererProps caps, CRendererProps reqs, int inQuadsPerVert, int outQuadsPerVert, const char *name) | |
virtual void | InitContext (GLenum primType, tU32 rcChanges, bool userRcChanged) |
virtual void | DrawIndexedArrays (CGeometryBlock &block) |
Draw arrays of vertices that are accessed by index (i.e., glDrawElements) | |
virtual int | GetPacketQwordSize (const CGeometryBlock &geometry) |
virtual CRendererProps | GetRenderContextDeps () |
virtual bool | GetCachePackets (const CGeometryBlock &geometry) |
![]() | |
virtual void | Load () |
Load the renderer into vu0/vu1 memory. | |
virtual const char * | GetName () |
Return a pointer to the text name of this renderer. | |
![]() | |
virtual tU64 | GetCapabilities () const |
virtual tU64 | GetRequirements () const |
virtual void | DrawLinearArrays (CGeometryBlock &block) |
Draw arrays of vertices that are accessed linearly (i.e., glDrawArrays) | |
Protected Attributes | |
cpu_vec_4 | ConstantVertColor |
![]() | |
bool | XferVertices |
bool | XferColors |
bool | XferNormals |
bool | XferTexCoords |
bool | VifDoubleBuffered |
float | CurTexCoord [2] |
cpu_vec_xyz | CurNormal |
CDmaPacket * | TexCoordBuf |
CDmaPacket * | NormalBuf |
int | WordsPerVertex |
int | WordsPerNormal |
int | WordsPerTexCoord |
int | WordsPerColor |
unsigned int | VertexUnpackMode |
unsigned int | NormalUnpackMode |
unsigned int | TexCoordUnpackMode |
unsigned int | ColorUnpackMode |
Vifs::tMask | VertexUnpackMask |
Vifs::tMask | NormalUnpackMask |
Vifs::tMask | TexCoordUnpackMask |
Vifs::tMask | ColorUnpackMask |
int | InputQuadsPerVert |
int | OutputQuadsPerVert |
int | InputGeomOffset |
void * | MicrocodePacket |
int | MicrocodePacketSize |
const char * | Name |
![]() | |
tU64 | Capabilities |
tU64 | Requirements |
Additional Inherited Members | |
![]() | |
CBaseRenderer (void *packet, int packetSize, int inQuadsPerVert, int outQuadsPerVert, int inGeomOffset, const char *name) | |
CBaseRenderer (void *packet, int packetSize, CRendererProps caps, CRendererProps reqs, int inQuadsPerVert, int outQuadsPerVert, int inGeomOffset, const char *name) | |
void | SetVifDoubleBuffered (bool db) |
void | GetUnpackAttribs (int numWords, unsigned int &mode, Vifs::tMask &mask) |
void | InitXferBlock (CVifSCDmaPacket &packet, int wordsPerVertex, int wordsPerNormal, int wordsPerTex, int wordsPerColor) |
void | XferBlock (CVifSCDmaPacket &packet, const void *vertices, const void *normals, const void *texCoords, const void *colors, int vu1Offset, int firstElement, int numToAdd) |
void | XferVectors (CVifSCDmaPacket &packet, unsigned int *dataStart, int startOffset, int numVectors, int wordsPerVec, Vifs::tMask unpackMask, tU32 unpackMode, int vu1MemOffset) |
void | AddVu1RendererContext (CVifSCDmaPacket &packet, GLenum primType, int vu1Offset) |
tGifTag | BuildGiftag (GLenum primType) |
void | CacheRendererState () |
float | GetMaxColorValue (bool texEnabled) |
![]() | |
CRenderer (tU64 caps, tU64 reqs) | |
void | SetCapabilities (tU64 caps) |
void | SetRequirements (tU64 reqs) |
Definition at line 12 of file indexed_renderer.h.
CIndexedRenderer::CIndexedRenderer | ( | void * | packet, |
int | packetSize, | ||
CRendererProps | caps, | ||
CRendererProps | reqs, | ||
int | inQuadsPerVert, | ||
int | outQuadsPerVert, | ||
const char * | name | ||
) |
Definition at line 20 of file indexed_renderer.cpp.
|
virtual |
called by the geometry manager when the default renderer context has changed, when the user context has changed, or after the renderer has been loaded (and a different renderer was in use). The renderer must record all necessary context at this point (usually by adding it to the vif1 chain) as the rendering context may have changed when it is called to actually render with Draw*Arrays().
primType | the primitive type to render (can be a custom type) |
rcChanges | changed in the rendering context as returned by CGLContext::GetRendererContextChanged(). |
userRcChanged | whether the user (custom) rendering context has changed |
Implements CRenderer.
Definition at line 31 of file indexed_renderer.cpp.
|
virtual |
Draw arrays of vertices that are accessed by index (i.e., glDrawElements)
Reimplemented from CRenderer.
Definition at line 98 of file indexed_renderer.cpp.
References CBaseRenderer::InitXferBlock(), and CBaseRenderer::XferBlock().
|
virtual |
Estimate the amount of memory, in qwords, the packet to render "geometry" will take. (For display list cacheing.)
Implements CRenderer.
Definition at line 74 of file indexed_renderer.cpp.
|
virtual |
What parts of the render context are encoded into packets produced by this renderer? When the packets are cached in display lists, this cached state must remain valid to continue using the cached packet. This method returns a CRendererProps bitmask with '1' set for each property that is cached in the packet. Note that this does not include the render context kept by InitContext(); this will never be cached by ps2gl. The default renderers, for example, do not transfer normals even when specified if lighting is not enabled. The packets they generate therefore depend on whether or not lighting is enabled, so they set the "Lighting" bit.
Implements CRenderer.
Definition at line 81 of file indexed_renderer.cpp.
|
virtual |
Can the packets generated by this renderer for the given geometry be cached when called from a display list, or should they be rebuilt each time? (The default renderers, for example, don't cache packets that depend on the current normal when lighting is enabled.)
Implements CRenderer.
Definition at line 92 of file indexed_renderer.cpp.
|
protected |
Definition at line 14 of file indexed_renderer.h.