Can I get more speed Updating Textures each frame?
Blitz3D Forums/Blitz3D Beginners Area/Can I get more speed Updating Textures each frame?
| ||
I have a couple of questions : 1. I'm creating my shadows using copyrect from the backbuffer (ortho cam) to the texturebuffer which works fine. I read once that there was another flag you can use when creating the texture (256 I think) which holds the texture in vmem so should make the process faster - can anyone give me more detail? The 256 flag doesn't seem to do much for me - is it possible that my computer doesn't support this or is it GFX card related - I only have a naff GF2? Is this a v1.85 feature or was it already in v1.83? 2. I also have a texture which I update various pixels each frame. The original colors of the texture are held in an array. I hold all the pixels I want to change and their new r,g,b values in a list and only update these pixels each frame. I know I can speed this up using lockbuffer and then writepixel fast but what is the quickest way of doing this? The r,g,b values in the list are derived from the original r,g,b values - e.g. new r = old r *.75 I hope this makes sense to someone - if you can help I'd appreciate it! Stevie |
| ||
1. It's most likely that on your gfx card it just doesn't make much difference. Others might notice it more tho. 2. You are near enough doing it correctly. An array for calculations etc is good idea. Just use un/lockbuffer and writepixelfast (with care!) for maximum speed. |
| ||
GF2's do get a significant speed boost from using flag 256, but only with particular driver versions. I had some drivers for my old GF2 where they actually made updating textures *slower* with flag 256 set. Then I changed to a different driver version and was surprised to get quite a speed boost. I can't recommend a specific set of drivers now, unfortunately as it was quite a long time ago ( 1 year plus ) but I would guess somewhere around 39.xx Detonators. |
| ||
Sybixus - Now that I think about it - it did run slower. I'm sure I have only the original drivers installed but I'm a bit of a donkey when it comes to installing new things and I'm liable to make an arse of it!! I take it I can access historical drivers from the Nvidia site? Is anyone out there still using a lowly GF2 with XP Pro OS that could confirm what drivers they use and whether flag 256 gives them a speed up? |
| ||
Yes Nvidia host all the driver versions on their website. It's been a while since I used my GF2, but I think you'd find it hard to go wrong if you're only using default drivers for the card at the moment. Something around 39.xx should be pretty good for a GF2, but by all means wait a while and see if someone with a GF2 can confirm the best version for the card. |