Skip to main content
gamedev.net
🔒 Locked

Pixel operation

Started by Moquan 3 replies 300+ views
Original Post
Moquan
Moquan
How would you go about reading and writing pixels to the screen in DirectX? How do you read and write pixels from a surface/texture to a surface/texture? I''ve looked, but I can''t seem to come up with anything. Thanks! -Moquan
Moquan
Moquan
Moquan
If it''s too difficult to explain, even a tutorial would be greatly appreciated. Thanks.

-Moquan
Moquan
Nypyren
Nypyren
Most surface classes have a "lock" function that either gives you access to a byte array or fills an array for you. Then you modify the array and finally unlock.
Muhammad Haggag
Muhammad Haggag
You can also render D3DPT_POINTLIST''s using DrawPrimitive with [transformed and lit vertices] or [untransformed vertices with orthogonal projection].
You can do that to the backbuffer or to a texture (if your card supports render to texture)

Peace,
Muhammad Haggag

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.