void C3D_TexBind(int unitId, C3D_Tex* tex) { C3D_Context* ctx = C3Di_GetContext(); if (!(ctx->flags & C3DiF_Active)) return; ctx->flags |= C3DiF_Tex(unitId); ctx->tex[unitId] = tex; }
void C3D_ImmDrawEnd(void) { // Go back to configuration mode GPUCMD_AddMaskedWrite(GPUREG_START_DRAW_FUNC0, 1, 1); // Disable vertex submission mode GPUCMD_AddMaskedWrite(GPUREG_GEOSTAGE_CONFIG2, 1, 0); // Clear the post-vertex cache GPUCMD_AddWrite(GPUREG_VTX_FUNC, 1); C3Di_GetContext()->flags |= C3DiF_DrawUsed; }