void MODEL_render(model_t* model) { if (model == NULL) return; if (model->textureObject != NULL) { GX_LoadTexObj(model->textureObject, GX_TEXMAP0); } GX_CallDispList(model->modelList, model->modelListSize); }
void DrawScene(Mtx view) { Mtx model,modelview; // Various matrices guVector axis; // Axis to rotate on // BUG: Light ignores underlying polygon colors. SetLight(view); // Setup the light for (yloop = 1; yloop < 6; yloop++) { // Loop through the y plane for (xloop = 0; xloop < yloop; xloop++) { // Loop through the x plane // Position the cubes on the screen guMtxIdentity(model); axis.x = 1.0f; axis.y = 0; axis.z = 0; guMtxRotAxisDeg(model,&axis,(45.0f-(2.0f*(float)yloop)+xrot)); // Tilt the cubes up and down axis.x = 0; axis.y = 1.0f; guMtxRotAxisDeg(model,&axis,(45.0f+yrot)); // Spin cubes left and right guMtxTransApply(model,model,(1.4f+((float)xloop*2.8f)-((float)yloop*1.4f)),(((6.0f-(float)yloop)*2.2f)-7.0f),-20.0f); guMtxConcat(model,view,modelview); GX_LoadPosMtxImm(modelview, GX_PNMTX0); GX_CallDispList(boxList[yloop-1],boxSize[yloop-1]); // Draw the box } } }
void GuiFrameImage::Draw() { if(!IsVisible()) return; if( oldWidth != GetWidth() || oldHeight != GetHeight() || oldX != GetLeft() || oldY != GetTop() || oldZ != 0 || oldAlpha != GetAlpha()) { CreateDrawList(); } GX_CallDispList(DrawList, DrawListSize); }