Directx equivalent of picturebox.pset

Started by
0 comments, last by TheAdmiral 17 years, 1 month ago
I am trying to find if there is any directx equivalent to the picturebox's pset function. I want to color a few individual pixels of a picture box using directx8.
Advertisement
This is a common source of confusion and frustration for DirectX developers who have newly migrated from GDI and the likes.

There is no particularly efficient method for dynamic per-pixel access of DirectX surfaces. The functionality can be emulated by using LockRect (and it works very well), but this strongly undermines hardware acceleration.

A few workarounds exist, such as rendering D3DPT_POINTLISTs or cannibalising pixel shaders, but you're advised to stick to straightforward shaded/textured geometry as your primary source of visual effects.

Admiral
Ring3 Circus - Diary of a programmer, journal of a hacker.

This topic is closed to new replies.

Advertisement