Thread: Trying to write individual pixels to the screen

  1. #1
    Registered User
    Join Date
    Apr 2004

    Trying to write individual pixels to the screen

    I am trying to write individual pixels onto the screen, preferrably in a window, but that isnt necessary. I need no other drawing tools, just pixels.

    I need to be able to do this very fast as I want to display the ouput from things like fluid dynamics systems in real time and other things which will gobble up processing power.

    I know I can write to the video memory, but I do not understand how.

    I am pretty new to C++ but have coded before, so I understand the basics at least.

    Can anyone point me in the direction of some good resources?

    I have looked at opengl, but cannot get writing pixels to work, I can do points, but these are incredibly slow.

    I am coding in dev-cpp, would anyone recommend any other good packages (free ones)?


  2. #2
    carry on JaWiB's Avatar
    Join Date
    Feb 2003
    Seattle, WA
    There's probably some simple graphics libraries out there that you could use, but right now all I can think of is Allegro (a google search could probably find that pretty easily).

    Also you could try DirectX, but it may be a bit complicated for a new C++ programmer. The SDK is at msdn. I think you can get it to work with Dev-C++ (I was able to use the DirectX 8.0 sdk at least)

    You should probably search the game programming board also


    You could also look at SDL. If I remember correctly it isn't too complex, although I never used it much
    Last edited by JaWiB; 04-13-2004 at 05:55 PM.
    "Think not but that I know these things; or think
    I know them not: not therefore am I short
    Of knowing what I ought."
    -John Milton, Paradise Regained (1671)

    "Work hard and it might happen."

  3. #3
    The Defective GRAPE Lurker's Avatar
    Join Date
    Feb 2003
    Find the address of the video buffer and have fun!
    Do not make direct eye contact with me.

  4. #4
    Registered User
    Join Date
    Apr 2004

    Thank you

    I installed SDL, and had many problems.

    After reading the how-to's it worked perfectly!

    Runs nice'n'fast, and I can really easily write pixels to he screen once now I have found the function for it.


Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Render text
    By Livijn in forum C++ Programming
    Replies: 6
    Last Post: 07-06-2007, 03:32 PM
  2. Freeze the screen
    By chris1985 in forum Windows Programming
    Replies: 3
    Last Post: 01-13-2005, 06:15 PM
  3. creating image from pixels stored in file
    By Kristian25 in forum Windows Programming
    Replies: 3
    Last Post: 01-21-2003, 01:08 PM
  4. Output to screen display issues
    By spazjr01 in forum C++ Programming
    Replies: 3
    Last Post: 12-16-2002, 04:45 PM
  5. need help in making graphics in C++
    By Unregistered in forum A Brief History of
    Replies: 10
    Last Post: 10-21-2001, 12:14 PM
Website Security Test