Jump to content
  • Advertisement
Sign in to follow this  
mishal153

any explanation on this arguement on directX

This topic is 5010 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

someone i know told me that it's not possible to plot a pixel in direcX. He was prety confident and confused me a lot. wat do u have to say to that?

Share this post


Link to post
Share on other sites
Advertisement
It is possible. There are several ways of doing it but the main idea is "lock". You must lock a texture/surface and access it directly. It implies that you know the texture/surface format and convert your RGBA color value to that format.

#1 : Lock the backbuffer, modify the pixels you want, unlock it and swap buffers. BUT, i think you must create a special backbuffer (lockable) and that it has a performance penalty (not sure about that).

#2 : Create a texture with specific flags (lockable/dynamic, don't know details about that) and modify it the same way as in #1. Now, draw a quad on the whole screen, using the texture you modified.

Now, I don't have details, search google about texture lock direct3d and you should find informations about that.

Hope it helps.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!