PDA

View Full Version : Software textures.



Manux
12-22-2008, 12:39 PM
Hello,

I wondered, is it possible to keep a texture in the RAM instead of having to send it every frame to the GPU, such as a SDL Surface?

Since for each new frame I need to do calculations to change pixels on the surface, Is it possible to do this?

Thanks for your time.

_NK47
12-22-2008, 01:19 PM
"I wondered, is it possible to keep a texture in the RAM instead of having to send it every frame to the GPU, such as a SDL Surface?"
dont know about SDL surfaces but you dont send textures to GPU every frame. they reside (if resident) in the GPU memory. simple.

"Since for each new frame I need to do calculations to change pixels on the surface, Is it possible to do this?"
you can directly update texture data with glTexSubImage2D().

ZbuffeR
12-22-2008, 01:31 PM
A software texture would be extremenly slow.

Use PBO extension to have better parallelism of the texture upload.

k_szczech
12-23-2008, 03:28 AM
Unless this is some kind of data stream that simply must be passed by CPU, I suggest you rather try looking for a way to update textures directly on the GPU (by rendering to texture using shaders).

That's simply because updating texture will be the bottleneck of your application.

Manux
12-24-2008, 08:14 AM
Ok thanks I'll look into that.

Rosario Leonardi
12-25-2008, 12:46 PM
Read the PBO Texture Performance tutorial on the nVidia site

http://developer.download.nvidia.com/SDK/9.5/Samples/samples.html#TexturePerformancePBO

I'm makeing a FFmpeg<->openGL library and I find it very useful (old.. but useful).

satan
12-28-2008, 04:41 AM
I'm makeing a FFmpeg<->openGL library
Closed or open source? If the latter, where can I find it?

Rosario Leonardi
12-28-2008, 07:27 AM
Actually is vaporware in my harddisk :D
I started last week and is still in pre-pre-pre-alpha, in Christmas I didn't found a lot of time to develop.
When it will be more mature I'll send you a private message and maybe make it opensource (no problem for me). ;)

I hope to get something "usable" in a week.