Like Tree1Likes

Basic PC graphics

This is a discussion on Basic PC graphics within the Game Programming forums, part of the General Programming Boards category; Where can I go to learn about very basic PC graphics? From the ground up? No libraries etc. Just start ...

  1. #1
    Registered User
    Join Date
    Sep 2006
    Location
    Beaverton, Oregon, United States
    Posts
    167

    Basic PC graphics

    Where can I go to learn about very basic PC graphics? From the ground up? No libraries etc. Just start learning how to do software stuff without anything fancy like Open GL etc.

  2. #2
    Programming Wraith GReaper's Avatar
    Join Date
    Apr 2009
    Location
    Greece
    Posts
    1,625
    Read many different Video cards specifications( if you can find them ), and make an OS that actually lets you use them without a driver.
    Devoted my life to programming...

  3. #3
    Just a pushpin. bernt's Avatar
    Join Date
    May 2009
    Posts
    426
    Alternatively on Linux, open and write to the framebuffer device.
    Consider this post signed

  4. #4
    Programming Wraith GReaper's Avatar
    Join Date
    Apr 2009
    Location
    Greece
    Posts
    1,625
    Quote Originally Posted by bernt View Post
    Alternatively on Linux, open and write to the framebuffer device.
    The OP specifically said "No libraries". That includes the OS itself...
    Devoted my life to programming...

  5. #5
    Just a pushpin. bernt's Avatar
    Join Date
    May 2009
    Posts
    426
    The OP specifically said "No libraries". That includes the OS itself...
    Bah, of course, how could I forget.

    "If you wish to make a graphics pie from scratch, you must first invent the universe."
    Consider this post signed

  6. #6
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by A34Chris View Post
    Where can I go to learn about very basic PC graphics? From the ground up? No libraries etc. Just start learning how to do software stuff without anything fancy like Open GL etc.
    Assuming you are on windows...

    Start with ... TheForgers tutorial
    Then head over to ... MSDN Graphics
    And also ... GDI Tutorial

    But you should note that you're not going to get much in the way of graphics power or performance from the OS's built in API... you're going to have to go with DirectX, OpenGL or some other library to really get the full benefit.


    On linux... Well, I'm sure someone can give you some links to try...


    And of course there's always Google...

  7. #7
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Posts
    22,915
    There are 4 (3?) layers when it comes to graphics.
    Hardware --> Drivers --> Library --> Application.
    You are obviously not going to make hardware, nor write drivers, nor are you going to talk directly to the drivers, so that leaves the application.
    The library is DirectX/OpenGL/Win32 API/Linux API/Unix API/etc.
    Any game engine will lie on top of the library, so you will probably want to avoid that.

    However, note that OpenGL and DirectX do not wrap Windows API. They talk directly to the drivers.
    So, you will basically want to learn OpenGL/DirectX.

    Using Win32 API is both silly and stupid. GDI isn't hardware accelerated, it's deprecated and everything is moving towards DirectX in Windows.

    So, you now have enough information to know where to begin, at least, I believe.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  8. #8
    Registered User
    Join Date
    Sep 2006
    Location
    Beaverton, Oregon, United States
    Posts
    167
    Thank you guys. Just wanted to start very basic. Like learning how to make the screen change color in C or display a bitmap. Stuff like that. Baby steps.

  9. #9
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,598
    Unfortunately there really is not a way to start at the basic level anymore. In the old DOS days you could start from scratch but not in any modern OS. I can only recommend you go to Amazon and purchase a DirectX or OpenGL book. Whichever API you choose, DirectX or OpenGL, is completely up to you and both have their advantages and disadvantages. I would recommend a book but I do not want to steer you towards any API here. I can say learning GDI and GDI+ will get you nowhere and I do not recommend using those to learn about graphics since the design and usage of those systems is completely different than any graphics API you will use.
    CommonTater likes this.

  10. #10
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Yep, the real horsepower is in Direct X, OpenGL... maybe SDL...

    Still, Learning a bit of GDI is not a bad thing. There may come a time it's handy for debugging an older program or doing your own owner-drawn menus and things.

  11. #11
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Posts
    22,915
    Quote Originally Posted by CommonTater View Post
    ...or doing your own owner-drawn menus and things.
    That is, if you're targeting older Windows operating systems. Don't know if there's a better way to do it in current Windows versions, but it sure as heck isn't going to be a good idea in Windows 8. GDI is going away.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  12. #12
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,048
    At least for me, the SDL strikes a nice balance. You can read and write pixels directly like you might have done with DOS. You can stay safely in 2D and play around with basic input and output. And you can also just load images and display them and plug in OpenGL once you've learned how the SDL works and want to use it to build something larger. Something to consider, at least. The SDL is cross-platform and available at Simple DirectMedia Layer.
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  13. #13
    Internet Superhero
    Join Date
    Sep 2006
    Location
    Denmark
    Posts
    964
    Quote Originally Posted by dwks View Post
    At least for me, the SDL strikes a nice balance. You can read and write pixels directly like you might have done with DOS. You can stay safely in 2D and play around with basic input and output. And you can also just load images and display them and plug in OpenGL once you've learned how the SDL works and want to use it to build something larger. Something to consider, at least. The SDL is cross-platform and available at Simple DirectMedia Layer.
    SDL was how i started out, and for C i guess it really is the best way if one is not into straight OpenGL/DirectX.

    However, for C++, SDL is hopelessly cumbersome. Instead, i recommend SFML.

    It's completely object oriented, and there are ports for many other languages. It wraps OpenGL and thus is fully hardware accelerated, unlike SDL which runs on the CPU (unless one uses the OpenGL mode, in which case you have to write your own OpenGL code anyways, which defeats the purpose), as such SFML is many many times faster than SDL, and it is, if possible even simpler to learn and use than SDL is. It even supports stuff like shaders without having to write a single line of GL code (Atleast it used to do, i'm not sure if it still does.)
    There are a bunch of tutorials and a step-by-step guide to getting it to work with a bunch of different IDEs and compilers. Oh, and it's ofcourse avaliable for all major platforms.

    Sorry for the shameless plug, i'm not affiliated with the project, i just love using it.
    How I need a drink, alcoholic in nature, after the heavy lectures involving quantum mechanics.

  14. #14
    Registered User sagar474's Avatar
    Join Date
    Jun 2011
    Location
    Kakinada
    Posts
    56
    access the graphics memory with out operating system.
    study about graphic card.

  15. #15
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Posts
    22,915
    Right. As if that's going to happen.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

Page 1 of 2 12 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Basic Graphics in C++
    By JCML in forum C++ Programming
    Replies: 1
    Last Post: 09-28-2010, 07:32 PM
  2. Best way of drawing basic graphics
    By Jelte in forum C++ Programming
    Replies: 3
    Last Post: 05-18-2010, 06:15 PM
  3. Basic Graphics Libraries (C)
    By mkylman in forum Game Programming
    Replies: 15
    Last Post: 02-17-2010, 10:06 PM
  4. Basic Graphics programming in C, please help
    By AdRock in forum Game Programming
    Replies: 3
    Last Post: 03-24-2004, 11:38 PM
  5. Basic Graphics Tutorials ?
    By Syme in forum Game Programming
    Replies: 2
    Last Post: 12-07-2001, 09:00 PM

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