hi,
i`m having a problem with blinking text after printing using pspDebugScreenPrintf together with gu functions,
i had a look in /samples/gu/logic, where it works fine, and did everything in the same way, but the bug didn`t dissapear,
is there any particualr reason for that?
sorry for not posting the code, but it`s very messy,
i`ll be grateful for any advices,
thanks,
wojciech
why pspDebugScreenPrintf + gu = blinking text?
I have had the same problem, so I just print what ever before the flipScreen();, or I just use this:
And if you need an integer in it, or any other buffer inside of it:
If you have a boolean that points to printing the text or whatever you want when something happens (A Pause menu for example), just print the text off screen until the time has come:
This would print the text on to the screen, but off to the right hand side by 1 pixel, until START is pressed, and PAUSE mode is initiated, thus meaning what ever you had sprintf(); do/display, display it right in the middle of the screen in the color Green.
if I made any mistakes, it's because I'm in a hurry, but they are all minor if there are any...
Code: Select all
// You need graphics.h
printTextToScreen(posx, posy, const char string, u32 color*);
flipScreen();
Code: Select all
char TextBuff[200];
sprintf(TextBuff, " %i/%s/%d etc.", int/array/etc.);
printTextToScreen(TextBuff);
flipScreen();
Code: Select all
#define TRUE 1
char TextBuff[200];
int pause = 0;
int textX = 273; //The text will be off screen
int textY = 136; //the text will be in the right Y co-ord spot though
sprintf(TextBuff, " %i/%s/%d etc.", int/array/etc.); /*Feed the text intoa ----------------------------------------------------------->Buffer*/
printTextToScreen(textX, textY, TextBuff, RGB(0, 255, 0)); //Print Text to Screen
flipScreen();
if(SceCtrlData.Buttons & PSP_CTRL_START) { //Start = Pause
pause = TRUE;
} else if(pause==TRUE) { //If pause is true
textX = 230;
}
if I made any mistakes, it's because I'm in a hurry, but they are all minor if there are any...
w.kosma: I don't know what your specific problem is, but pspDebugScreenPrintf is, as its name would suggest, meant for debugging. It's writing directly to what it thinks is the video ram (not the back buffer), and that probably conflicts with whatever the GU is doing. You probably want to find a cleaner way of printing text.
-ReK
-ReK
a good way would be to render to GU_PROJECTION matrix mode and sceGumOrtho (....), such as a bitmap font drawing poly quads (2 tris) for each char, instead of bitblt'ing the chars directly into (v/eram)?
pretty much a universal method, do some research on how bitmap fonts are achieved in opengl, which will pretty much transfer across to the sce API, looking at the functions available and required.
"bitmap font opengl" in googly is a good place to start
if i have some time later i may try and knock up a sample, but it shouldn't be to difficult looking at it.
lee
pretty much a universal method, do some research on how bitmap fonts are achieved in opengl, which will pretty much transfer across to the sce API, looking at the functions available and required.
"bitmap font opengl" in googly is a good place to start
if i have some time later i may try and knock up a sample, but it shouldn't be to difficult looking at it.
lee
<,<;