Clipping
I have 3 Pixel routines
1- Regular pixel
2- Alpha blended pixel
3- Additive blended pixel
Bassicly each routine you give them x,y coords colors and shades and they draw a pixel at x,y
Inside the routines I check for clipping bassicly to c if the x,y location provided is not in the rectangle specified.
I did testing to c if the fram rate drops when i do a pixel level clip test and it didn''t seem to affect the frame rate infact also when I would move the pixels of screen the frame rates would climb.
What I did is, draw a 400x400 box using pixel lavel clipping meenning through the for loops test everytime for the clipping for each pixel and then I used the same routine but with out any pixel clipping ofcourse i never moved the box of screen. The results where exactly the same. But when I tested for clipping and moved the box of screen the frame rate climbed for that routin.
Does it really matter? I dont c the dif
Or should I actually calculate the right width and height once outside the for loops and blit the right sized box
Hardcore Until The End.
If I am following you are doing, this is what's happening.
The time it takes to test a pixel and reject it is faster than just drawing a pixel. So, if enough pixels are rejected, they more than make up for the time it takes to draw the other pixels.
Still, individual pixel rejection is not a good practice. It only looks good in this example. You should determine only which pixels should be drawn and draw them without clipping, just like you mentioned at the end.
Edited by - I-Shaolin on 1/26/00 11:50:44 PM
The time it takes to test a pixel and reject it is faster than just drawing a pixel. So, if enough pixels are rejected, they more than make up for the time it takes to draw the other pixels.
Still, individual pixel rejection is not a good practice. It only looks good in this example. You should determine only which pixels should be drawn and draw them without clipping, just like you mentioned at the end.
Edited by - I-Shaolin on 1/26/00 11:50:44 PM
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement