I have a windowed Blitz program for setting up my software's options. I'm using Cyberseth's BMPFont lib (http://www.blitzcoder.com/cgi-bin/showcase/showcase_showentry.pl?id=cyberseth05162003013142&comments=no) to render text in a textbox. I clear the backbuffer, write the text to the backbuffer, then copy the backbuffer to a texture on a quad for the textbox with a call to this function...
It works fine, until all of a sudden I've received a report and picture that shows it isn't working properly. Instead of writing text to the backbuffer and copying that to the textbox with lovely writing, the textbox shows the backbuffer with the UI drawn on. Either it's copying the backbuffer after the UI has been drawn, or is not clearing the biffer and writing the text, or it's copying the front buffer instead of the backbuffer.
I need some info from the client on their system which will have to wait until tomorrow, but I'm wondering if anyone has any ideas or similar experience? Could some chipsets return the frontbuffer instead of the backbuffer in windowed mode, for example? I can see I'm not directly addressing the backbuffer prior to CLS and text-drawing operations, but I understand the buffer is still the backbuffer as that's how it works on the other computers tested.
Function TG_Change_Text(indx%,replacement_text$, forced%=0) ; FUNCTION : updates texts(indx) with new text ; Force forces the graphics draw without the speed optimization of checking for duplication of graphics If texts(indx)\txt$<>replacement_text$ Or forced ; If changing the text texts(indx)\txt$=replacement_text$ Cls If texts(indx)\txt$<>"" BMPText font_gothic, (texts(indx)\siz_x/2), (texts(indx)\siz_y/2), texts(indx)\txt$,1,1 Else BMPText font_gothic, (texts(indx)\siz_x/2), (texts(indx)\siz_y/2), texts(indx)\default_txt$,1,1 EndIf CopyRect 0,0,texts(indx)\siz_x,texts(indx)\siz_y,0,0,BackBuffer(),TextureBuffer(texts(indx)\texture) EntityTexture(texts(indx)\sprite,texts(indx)\texture) EndIf End Function
It works fine, until all of a sudden I've received a report and picture that shows it isn't working properly. Instead of writing text to the backbuffer and copying that to the textbox with lovely writing, the textbox shows the backbuffer with the UI drawn on. Either it's copying the backbuffer after the UI has been drawn, or is not clearing the biffer and writing the text, or it's copying the front buffer instead of the backbuffer.
I need some info from the client on their system which will have to wait until tomorrow, but I'm wondering if anyone has any ideas or similar experience? Could some chipsets return the frontbuffer instead of the backbuffer in windowed mode, for example? I can see I'm not directly addressing the backbuffer prior to CLS and text-drawing operations, but I understand the buffer is still the backbuffer as that's how it works on the other computers tested.