questions about copyrect and cubemapping

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

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?

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.

try reading from RAM instead.


How can I do that?

If you set the texture flag to +256 you automatically load it into vmem which is faster in general for copyrect'ing to.

Stevie

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?

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.

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.

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.