Image disappears after a certain amount of time

Blitz3D Forums/Blitz3D Beginners Area/Image disappears after a certain amount of time

OwlEpicurus(Posted 2009) [#1]
In the game I am programming, I have a function to create text boxes. It works fine most of the time, but if it is continously called for a number of loops through the main program, the image for textbox disappears. It is used as an image buffer, so the program crashes. Here is the code for the function:


The image for the textbox is generated only a few lines before it is used for imagebuffer(). As I mentioned earlier the function works fine for the first few minutes worth of loops that it is called up.


Ross C(Posted 2009) [#2]
The only thing i can think of, without tsting it more thoroughly, is your setting the drawing buffer to the image buffer at the end there, but not setting it back to the backbuffer, for drawing to the main screen again.

Also, your clearing the imagebuffer, with the CLS right after it, which would clear the entire image. Combined with not actually setting back to the BackBuffer(), this may cause your issues.


OwlEpicurus(Posted 2009) [#3]
That seems to have fixed it. Thanks.