[SDL] DirectX 7?

David Olofson david.olofson at reologica.se
Mon Sep 30 06:53:01 PDT 2002


On Friday 27 September 2002 01:22, David Moffatt wrote:
> One other thing I forgot to mention is in 2D games I like to be able to
> manipulate indivdual pixels in the images. Would this still be possible
> using the 3D API?

Yes, but it doesn't come for free. At least OpenGL allows you to upload 
rectangles within textures, so you don't have to update the whole texture 
if you only change a few pixels every frame.

Just keep in mind that texture uploading is often just as slow as 
software rendering to VRAM, so you shouldn't pump more pixels than 
corresponding to a 320x240 screen or so per frame. This is usually not a 
problem, since you don't *have* to update procedural textures at the full 
rendering frame rate, and you can even update a part of a texture each 
frame. Just "double buffer" each procedural texture, so you can have one 
for rendering and one for "slow update", and then switch.


//David Olofson - Programmer, Composer, Open Source Advocate

.- Coming soon from VaporWare Inc...------------------------.
| The Return of Audiality! Real, working software. Really!  |
| Real time and off-line synthesis, scripting, MIDI, LGPL...|
`-----------------------------------> (Public Release RSN) -'
.- M A I A -------------------------------------------------.
|    The Multimedia Application Integration Architecture    |
`----------------------------> http://www.linuxdj.com/maia -'
   --- http://olofson.net --- http://www.reologica.se ---




More information about the SDL mailing list