02-09-2020, 04:58 AM
I have set raster callback function in the first part of game, and I don't need it in the second part. How to disable it? Setting it to NULL causes rendering errors.
Disable raster callback?
|
02-09-2020, 04:58 AM
I have set raster callback function in the first part of game, and I don't need it in the second part. How to disable it? Setting it to NULL causes rendering errors.
02-09-2020, 07:39 AM
Passing NULL to TLN_SetRasterCallback() is the way to disable raster effects.
Exactly what kind of "rendering errors" are you experiencing? Can you post some example?
02-09-2020, 05:22 PM
Using DisableBGColor() after disabling raster callback caused errors like this, using SetBGColor(0,0,0) instead fixed problem.
02-09-2020, 09:48 PM
I'm glad you found the cause so quickly!
In Tilengine you must specify a base background: either a solid color with TLN_SetBGColor() or a fixed bitmap with TLN_SetBGBitmap(). If not, pixels that are not covered by any background layer aren't cleared between frames, leaving the trace you see in the picture. This is not a bug, it's by design, to avoid unnecesary overdraw when you use a background layer that you know that it hasn't transparent pixels, so a base background is not needed. This is unrelated to raster effects. |
« Next Oldest | Next Newest »
|