Faster Screen Clearing?

BlitzMax Forums/BlitzMax Beginners Area/Faster Screen Clearing?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Under the hood there are probably some differences between what parts of the graphics pipeline are needed for drawing a rect and for doing a clearscreen. When you do a clearscreen it probably only needs to know to write the clear-screen-color into all pixels in the backbuffer. It probably does not deal with the geometry part of the pipeline, generating fragments and all that. Then when you do your Rect, it has to process the pixels in the rect as geometry and convert it to fragments and then apply the color and do whatever method of interpolation is defined in the `shade model` (smooth shaded or flat shaded etc) and think about a number of other factors depending on which features are switched on, including detecting if blending is operational and various tests etc. Then it spits out the pixels. Presumably there is some sharing going on of the pipeline and the cls is using part of the pipeling causing the rect to stall a bit if called after it, while the other way around perhaps becomes more efficient based on which parts of the pipeline can run concurrently or whatever.