30 static const int NumTexNames = 512;
34 CMMTexture *DefaultTex, *CurTexture, *LastTexSent;
38 void IncCursor() { Cursor = (Cursor + 1) & (NumTexNames - 1); }
44 void SetTexEnabled(
bool yesNo);
45 bool GetTexEnabled()
const {
return IsTexEnabled; }
47 void GenTextures(GLsizei numNewTexNames, GLuint* newTexNames);
48 void BindTexture(GLuint texNameToBind);
49 void DeleteTextures(GLsizei numToDelete,
const GLuint* texNames);
51 CMMTexture& GetCurTexture()
const {
return *CurTexture; }
55 mErrorIf(TexNames[tex] == NULL,
"Trying to access a null texture");
56 return *TexNames[tex];
59 void UseCurTexture(CVifSCDmaPacket& renderPacket);
61 void SetTexMode(GS::tTexMode mode);
63 void SetCurTexParam(GLenum pname, GLint param);
64 void SetCurTexImage(tU128* imagePtr, tU32 w, tU32 h,
66 void SetGsTexture(GS::CMemArea& area);
67 void SetCurClut(
const void* clut,
int numEntries);
69 void BeginDListDef() { InsideDListDef =
true; }
70 void EndDListDef() { InsideDListDef =
false; }
84 CMMClut(
const void* table,
int numEntries = 256)
85 : GS::CClut(table, numEntries)
86 , GsMem(16, 16, GS::kPsm32, GS::kAlignPage)
92 void Load(CVifSCDmaPacket& packet);
104 GS::CMemArea* pImageMem;
112 void SetImage(
const GS::CMemArea& area);
113 void SetImage(tU128* imagePtr, tU32 w, tU32 h, GS::tPSM psm);
115 void SetClut(
const CMMClut& clut)
117 CTexEnv::SetClutGsAddr(clut.GetGsAddr());
120 void ChangePsm(GS::tPSM psm);
127 void Load(
bool waitForEnd =
true);
128 void Use(
bool waitForEnd =
false);
130 void Load(CSCDmaPacket& packet);
131 void Load(CVifSCDmaPacket& packet);
133 void Use(CSCDmaPacket& packet);
134 void Use(CVifSCDmaPacket& packet);
136 void BindToSlot(GS::CMemSlot& slot);
void SetImage(const GS::CMemArea &area)