Sign in to follow this  
mishal153

any explanation on this arguement on directX

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
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

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