예제 #1
0
void ctrSetViewportSize(s16 w, s16 h, bool tilt) {
	C3D_SetViewport(0, 0, h, w);
	C3D_Mtx projectionMtx;
	if (tilt) {
		Mtx_OrthoTilt(&projectionMtx, 0.0, w, h, 0.0, 0.0, 1.0, true);
	} else {
		Mtx_Ortho(&projectionMtx, 0.0, w, 0.0, h, 0.0, 1.0, true);
	}
	C3D_FVUnifMtx4x4(GPU_GEOMETRY_SHADER, GSH_FVEC_projectionMtx, &projectionMtx);
}
예제 #2
0
void UI::LayerGroup::compost(float timeDelta) {
    if (disabled && !overrideDisableForRender) return;

    for (auto layer : layers) {
        if (layer->compost) {
			Mtx_Ortho(&compostMatrix, 0.0, float(layer->compostFB.width), float(layer->compostFB.height), 0.0, 0.0, 1.0);
			GFX::DrawOn(&layer->compostFB, &compostMatrix, true);
			layer->render(timeDelta, true);
		}
    }
}