Sign in to follow this  
spiffycrony

Directx equivalent of picturebox.pset

Recommended Posts

spiffycrony    122
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.

Share this post


Link to post
Share on other sites
TheAdmiral    1122
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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this