questions about copyrect and cubemapping

Blitz3D Forums/Blitz3D Beginners Area/questions about copyrect and cubemapping

mrjh(Posted 2006) [#1]
Hi, I am new to Blitz3d and so am quite confused. One problem I have run into is the slowness of the copyrect command. I was wondering if there is any way to make this command faster or if there is a simmilar command that does basically the same thing. Any suggestions or tips would be most welcome.

Also, I have had some problems with Cubemapping. I am not sure weather I am doing something wrong or if this is a known glitch of cubemapping, but I have an island with water all around, and I can see the reflection of the water behind the island. I was going to post a screenshot, but I don't know how. Could someone fill me in on that as well?


WolRon(Posted 2006) [#2]
if there is any way to make this command faster
Have you tried locking the buffers first?

If you are copying from the Backbuffer (or a buffer stored in video memory) then it WILL be slow. READING from video memory is always slow. If this is the case, try reading from RAM instead.


mrjh(Posted 2006) [#3]
try reading from RAM instead.


How can I do that?


Stevie G(Posted 2006) [#4]
If you set the texture flag to +256 you automatically load it into vmem which is faster in general for copyrect'ing to.

Stevie


big10p(Posted 2006) [#5]
I don't think using CopyRect on locked buffers is a good idea, WolRon. The manual states that the Read/Write/Copy pixel commands are all that should be used. Or, am I wrong?


Ross C(Posted 2006) [#6]
Copyrect won't work if you lock the buffers i'm afraid. The 256 flag is the way to go. I think tho, it can cause artifacts on some setups. Lee Page's Tattoo app had these problems.


mrjh(Posted 2006) [#7]
Thanks for the advise. I should have told you that I was already using flag 256, but I didn't know it made that much of a difference because I used it from the beginning. Thanks for letting me know it is important thow, I will make sure to keep using it in all of my programs.


jfk EO-11110(Posted 2006) [#8]
using flag 256 forces to turn off mipmapping, this will make rendering slower generally. So I think it isn't a good idea to use it everywhere. It only makes sense for textures you plan to edit at runtime, eg. for cubemapping.

There is an example on speed-optimized cubemapping in the code archives.