Did anyone ever speed up Rendering to a Texture?

Blitz3D Forums/Blitz3D Programming/Did anyone ever speed up Rendering to a Texture?

John Pickford(Posted 2005) [#1]
I remember a while back someone posting a DLL to speed this up. It didn't seem much different in my quick test though. Has anyone cracked this?

My game renders into up to 12 largish texture per frame (for shadows and other stuff) and the copyrect seems to be a fairly major bottleneck. The shadows alone seem to account for 30% of the total FPS.

If there's a way to speed this up it would be appreciated.


Oddball(Posted 2005) [#2]
You could try locking the buffers and looping a CopyPixelFast. I found this to be slightly faster than CopyRect. Also just locking the buffers before using CopyRect speeds things up. Doubt any of these will give you the kind of speed increase you're looking for though.


jfk EO-11110(Posted 2005) [#3]
Do you already use the Bit flag 256 for the texture?


Ross C(Posted 2005) [#4]
locking the buffers causes an error when using copyrect over here


Oddball(Posted 2005) [#5]
locking the buffers causes an error when using copyrect over here
Really? Sorry. Works for me, just thought it'd work for everyone. Are you unlocking the buffers again before using other functions on them?


big10p(Posted 2005) [#6]
Yeah, it's 'unsafe' to use anything other than the read/write/copy pixel commands on locked buffers.


Oddball(Posted 2005) [#7]
Anyway, back on topic. Is this what you were talking about John. And here's the thread. I see you've posted in the thread. Don't know if this has been improved since you last checked it out.