Trying to write individual pixels to the screen

This is a discussion on Trying to write individual pixels to the screen within the C++ Programming forums, part of the General Programming Boards category; Hello, I am trying to write individual pixels onto the screen, preferrably in a window, but that isnt necessary. I ...

  1. #1
    Registered User
    Join Date
    Apr 2004
    Posts
    2

    Trying to write individual pixels to the screen

    Hello,
    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)?

    Thanks
    Ian

  2. #2
    carry on JaWiB's Avatar
    Join Date
    Feb 2003
    Location
    Seattle, WA
    Posts
    1,972
    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

    Edit:

    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 06: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."
    -XSquared

  3. #3
    The Defective GRAPE Lurker's Avatar
    Join Date
    Feb 2003
    Posts
    949
    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
    Posts
    2

    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.


    Thanks,
    Ian

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, 04:32 PM
  2. Freeze the screen
    By chris1985 in forum Windows Programming
    Replies: 3
    Last Post: 01-13-2005, 07:15 PM
  3. creating image from pixels stored in file
    By Kristian25 in forum Windows Programming
    Replies: 3
    Last Post: 01-21-2003, 02:08 PM
  4. Output to screen display issues
    By spazjr01 in forum C++ Programming
    Replies: 3
    Last Post: 12-16-2002, 05:45 PM
  5. need help in making graphics in C++
    By Unregistered in forum A Brief History of Cprogramming.com
    Replies: 10
    Last Post: 10-21-2001, 01:14 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21