You are here:

C++/pixel output

Advertisement


Question
how do you turn on and change the color of individual pixels using c++, and no directx or anything.  How do I, for example, turn on one red pixel.  Also, how do I clear the screen later?  Thank you for your time.

(i use dev c++ for a compiler)

Answer
It is a bit hard if you want to do it under windows, as it doesn't let you directly access the display. You should either use an existing control (like a ActiveX), or DirectX. In DOS, you were able to directly access the display memory and set the bits that represent the colors in each display pixel.
There are so much related issues that cannot be explained here. I suggest you reading a book or tutorial about computer graphics using C++.

C++

All Answers


Answers by Expert:


Ask Experts

Volunteer


Sam

Expertise

You may ask me about simple to complicated C/C++ programming methods/style and most like questions about network programming in C++.

Experience

I'm a professional programer in C++ and network/internet programming.

©2016 About.com. All rights reserved.