Software textures.

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.

“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().

A software texture would be extremenly slow.

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

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.

Ok thanks I’ll look into that.

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).

Closed or open source? If the latter, where can I find it?

Actually is vaporware in my harddisk :smiley:
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). :wink:

I hope to get something “usable” in a week.