/**************************************************************************** * StopGX * * Stops GX (when exiting) ***************************************************************************/ void StopGX() { GX_AbortFrame(); GX_Flush(); VIDEO_SetBlack(TRUE); VIDEO_Flush(); }
static void drawgx_shutdown(void) { GX_AbortFrame(); GX_Flush(); VIDEO_Flush(); VIDEO_WaitVSync(); VIDEO_SetBlack(true); }
// Call this at the end of a screen void DrawFrameFinish() { //Copy EFB->XFB GX_SetCopyClear((GXColor){0, 0, 0, 0xFF}, GX_MAX_Z24); GX_CopyDisp(xfb[whichfb],GX_TRUE); GX_Flush(); VIDEO_SetNextFramebuffer(xfb[whichfb]); VIDEO_Flush(); VIDEO_WaitVSync(); }
void wii_video_deinit(void) { GX_AbortFrame(); GX_Flush(); VIDEO_SetBlack(true); VIDEO_Flush(); for (unsigned i = 0; i < 3; i++) free(MEM_K1_TO_K0(g_framebuf[i])); }
/**************************************************************************** * StopGX * * Stops GX (when exiting) ***************************************************************************/ void StopGX() { GX_AbortFrame(); GX_Flush(); VIDEO_SetBlack(TRUE); VIDEO_Flush(); VIDEO_WaitVSync(); if (vmode->viTVMode & VI_NON_INTERLACE) VIDEO_WaitVSync(); }
static void system_deinit(void *data) { (void)data; #ifndef IS_SALAMANDER // we never init GX/VIDEO subsystems in salamander GX_DrawDone(); GX_AbortFrame(); GX_Flush(); VIDEO_SetBlack(true); VIDEO_Flush(); VIDEO_WaitVSync(); #endif }
/**************************************************************************** * StopGX * * Stops GX (when exiting) ***************************************************************************/ void StopGX() { GX_SetCopyClear((GXColor){0, 0, 0, 0xFF}, GX_MAX_Z24); GX_CopyDisp(xfb[whichfb], GX_TRUE); GX_Flush(); VIDEO_SetNextFramebuffer(xfb[whichfb]); VIDEO_SetBlack(TRUE); VIDEO_Flush(); VIDEO_WaitVSync(); if (vmode->viTVMode & VI_NON_INTERLACE) VIDEO_WaitVSync(); whichfb ^= 1; }
/** * Clears all loaded font glyph data. * * This routine clears all members of the font map structure and frees all allocated memory back to the system. */ void FreeTypeGX::unloadFont() { GX_DrawDone(); GX_Flush(); for( std::map<wchar_t, ftgxCharData>::iterator i = this->fontData.begin(); i != this->fontData.end(); i++) { free(i->second.glyphDataTexture); } if(this->ftFace) { FT_Done_Face(this->ftFace); } this->cacheTextWidth.clear(); this->fontData.clear(); }
/** * Clears all loaded font glyph data. * * This routine clears all members of the font map structure and frees all allocated memory back to the system. */ void FreeTypeGX::clearGlyphData() { if (this->fontDatas.size() == 0) return; GX_DrawDone(); GX_Flush(); for ( std::map<uint16_t, FTGX_Cache>::iterator i = this->fontDatas.begin(); i != this->fontDatas.end(); i++) { for ( FTGX_Cache::iterator j = i->second.begin(); j != i->second.end(); j++) { free(j->second.glyphDataTexture); } i->second.clear(); } /* for ( std::map<wchar_t, ftgxCharData>::iterator i = this->fontData.begin(); i != this->fontData.end(); i++) { free(i->second.glyphDataTexture); } */ this->fontDatas.clear(); }
static void init_vtx(GXRModeObj *mode) { GX_SetViewport(0, 0, mode->fbWidth, mode->efbHeight, 0, 1); GX_SetDispCopyYScale(GX_GetYScaleFactor(mode->efbHeight, mode->xfbHeight)); GX_SetScissor(0, 0, mode->fbWidth, mode->efbHeight); GX_SetDispCopySrc(0, 0, mode->fbWidth, mode->efbHeight); GX_SetDispCopyDst(mode->fbWidth, mode->xfbHeight); GX_SetCopyFilter(mode->aa, mode->sample_pattern, (mode->xfbMode == VI_XFBMODE_SF) ? GX_FALSE : GX_TRUE, mode->vfilter); GX_SetCopyClear((GXColor) { 0, 0, 0, 0xff }, GX_MAX_Z24); GX_SetFieldMode(mode->field_rendering, (mode->viHeight == 2 * mode->xfbHeight) ? GX_ENABLE : GX_DISABLE); GX_SetPixelFmt(GX_PF_RGB8_Z24, GX_ZC_LINEAR); GX_SetZMode(GX_ENABLE, GX_ALWAYS, GX_ENABLE); GX_SetColorUpdate(GX_TRUE); GX_SetAlphaUpdate(GX_FALSE); Mtx44 m; guOrtho(m, 1, -1, -1, 1, 0.4, 0.6); GX_LoadProjectionMtx(m, GX_ORTHOGRAPHIC); GX_ClearVtxDesc(); GX_SetVtxDesc(GX_VA_POS, GX_INDEX8); GX_SetVtxDesc(GX_VA_TEX0, GX_INDEX8); GX_SetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XYZ, GX_F32, 0); GX_SetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_TEX_ST, GX_F32, 0); GX_SetArray(GX_VA_POS, verts, 3 * sizeof(float)); GX_SetArray(GX_VA_TEX0, tex_coords, 2 * sizeof(float)); GX_SetNumTexGens(1); GX_SetNumChans(0); GX_SetTevOp(GX_TEVSTAGE0, GX_REPLACE); GX_SetTevOrder(GX_TEVSTAGE0, GX_TEXCOORD0, GX_TEXMAP0, GX_COLORNULL); GX_InvVtxCache(); GX_Flush(); }