/** Effectue un printf rapide avec effaement de couleur/ et rafraichissement **/ void fastPrintf(int x, int y, int color, char *str) { Xe_InvalidateState(xe); XeDrawSurface2(XeBgInfo, -1, -1, 2, 2, 0); XePrintf(-0.5, 0, str, 0.6, 0xFF0000);//Bleu #if 1 //Blanc .... Xe_SetClearColor(xe, ~0); Xe_Resolve(xe); while (!Xe_IsVBlank(xe)) ; Xe_Sync(xe); #endif }
void XenonGLDisplay() { Xe_SetBlendOp(xe, XE_BLENDOP_ADD); Xe_SetSrcBlend(xe, XE_BLEND_SRCALPHA); Xe_SetDestBlend(xe, XE_BLEND_INVSRCALPHA); // update vb cache !!! Xe_VB_Lock(xe, pVbGL, 0, XE_MAX_VERTICES, XE_LOCK_WRITE); Xe_VB_Unlock(xe, pVbGL); /* // Refresh texture cash unsigned int * pBitmap = Xe_Surface_LockRect(xe, pVideoSurface, 0, 0, 0, 0, XE_LOCK_WRITE); int i; for(i = 0;i<(vid.width*vid.height);i++) { //Make an ARGB bitmap unsigned int c = (pQ2Palette[vid.buffer[i]]) >> 8 | ( 0xFF << 24 ); pBitmap[i] = c; } Xe_Surface_Unlock(xe, pVideoSurface); // Select stream and shaders Xe_SetTexture(xe, 0, pVideoSurface); Xe_SetCullMode(xe, XE_CULL_NONE); Xe_SetStreamSource(xe, 0, pVBSw, 0, 10); Xe_SetShader(xe, SHADER_TYPE_PIXEL, pPixelShader, 0); Xe_SetShader(xe, SHADER_TYPE_VERTEX, pVertexShader, 0); // Draw Xe_DrawPrimitive(xe, XE_PRIMTYPE_RECTLIST, 0, 1); */ // Resolve Xe_Resolve(xe); while(!Xe_IsVBlank(xe)); Xe_Sync(xe); // Reset states Xe_InvalidateState(xe); Xe_SetClearColor(xe, 0); xe_NumVerts = xe_PrevNumVerts = 0; ShowFPS(); }
void updateIGM(int debut, int fin) { if(debut) Xe_InvalidateState(xe); //Dessine la scene XeDrawSurface2(igmBg, -1, -1, 2, 2, 1); //XeDrawSurface(igmBarr,-1,-1,1,1,1);//Barr en haut XeDrawSurface2(igmBarr, -1, 0.7, 2, .3, 1); //event sur la manette igmInput(); switch(menuselected) { case 0: drawMenuIcon(); break; case ITEM_RETURN_TO_MENU: drawReturnToMenu(); break; case ITEM_DISPLAY_INFO: drawInformation(); break; default: drawMenuIcon(); break; } if(fin) { Xe_SetClearColor(xe, ~0); /* resolve (and clear) */ Xe_Resolve(xe); /* wait for render finish */ while (!Xe_IsVBlank(xe)); Xe_Sync(xe); } nframe=1.0f; }
/** Effectue un printf rapide avec effaement de couleur/ et rafraichissement **/ void errorPrintf(int x, int y, int color, char *str) { Xe_InvalidateState(xe); XePrintf(-0.5, 0, str, 0.6, 0x0000FF);//Red #if 1 //Blanc .... Xe_SetClearColor(xe, ~0); Xe_Resolve(xe); while (!Xe_IsVBlank(xe)) ; Xe_Sync(xe); //Attends qu'une touche soit presser while (1) { struct controller_data_s c; if (get_controller_data(&c, 0)) { return;//Quit } } #endif }