Graphics Mode!

This is a discussion on Graphics Mode! within the Game Programming forums, part of the General Programming Boards category; Hey, First thing that i want to say is: I use Microsoft Visual C++ 6 and Windows XP Home Edition. ...

  1. #1
    Registered User
    Join Date
    Sep 2002
    Posts
    70

    Graphics Mode!

    Hey,

    First thing that i want to say is: I use Microsoft Visual C++ 6 and Windows XP Home Edition.

    Ok, Now to the question: I want a way to switch to 800x600x32Bit True Colour, Graphics Mode. What i mean by this is that i can not use standard cout & cin, and other console functions, i have to make a function that draws pixels to the screen. But i want acess to other things such as fstream.h
    etc...

    So this is what i want, NOTE: I do not want to use Allegro to do this, i don't know how to use Allegro.

    Ok, I want a function to switch to 800x600x32 from a Windows Console Program, and a function to Draw Pixels onto the screen, and finally a function to exit the pogram.

    That is all, i know this might sound like i'm trying to get somebody to write code for me, but i am a beginner, and please, help out.....

    I do not want tutorials, i just want the three functions that i have asked about...As a matter of fact, if anybody knows where to get a good tutorial on how to make the three functions i have asked for, then please tell me about it.

    But i would like example code very much, so please, help

    Ciao

  2. #2
    Registered User
    Join Date
    Nov 2002
    Posts
    4
    What API are you using ?

    GLUT?

  3. #3
    Registered User
    Join Date
    Sep 2002
    Posts
    70
    What is an API??

    I am a beginner

  4. #4
    Registered User
    Join Date
    Nov 2002
    Posts
    4
    API - Application Programming Interface.

    Basically an API is a set of functions that extend what are available to you already. If you use OpenGL you can get the GLUT API which cuts down on the amount of coding you need to do. When functions from the api are called they set up certain things by themselves. When you use GLUT you dont need to worry about device and render contexts and your code is platform independant.
    Another API is SDL which I believe is what is used in the tutorials on http://www.gametutorials.com.

    If you want to check out GLUT go to http://nehe.gamedev.com and download the tutorials using the GLUT API which can be found at the bottom of the tutorials.

    One of the glut functions can be used to switch to game mode with you desired settings.


    API's are the best way to code because if you learn one you can cut down on the time you spend on different applications.

  5. #5
    Registered User
    Join Date
    Sep 2002
    Posts
    70
    Hey,

    I don't want to use an API just yet. Because i am not dealing with 3D Graphics at the moment.

    I want to go into a 2D Graphics mode.....So if anybody can help.....

  6. #6
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145
    Graphics is no easy task, especially not to a 'beginner'. If you really want to attempt graphics now, head over to gamedev.net as they have tutorials/examples/stuff.

    If you develop in DirectX, there are some pretty nice tutorials in the SDK.
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

  7. #7
    fry
    fry is offline
    Registered User fry's Avatar
    Join Date
    Mar 2002
    Posts
    128
    I don't want to use an API just yet. Because i am not dealing with 3D Graphics at the moment.
    You can still use an API for 2d graphics. Allegro and SDL are basically only good for 2d (you can use them with OpenGL though).

    If you want to do graphics, then by far the easiest method would be to get Allegro or SDL, even though i know you said you didn't want to. For a beginner, these are by far the two easiest to learn, and get decent results quickly Allegro is my personal recommendation, but both should be fine.

    Allegro
    SDL
    IDE: Dev C++ 5
    Lib: Allegro
    OS: Windows 2000

  8. #8
    Registered User
    Join Date
    Sep 2002
    Posts
    69
    Check out the PDF and links in my signature... They have lots of information.

    The Programming Linux Games stuff should help you a lot with SDL (yes, you can use it in Windows too!).

    If you like, I can post a simple C program that draws something on the screen.
    D. Olson
    The Mandrake eXPerience
    Battle Pong

    IDE: kate 2.0
    Compiler: gcc 3.2
    Graphics/Input/Net: SDL 1.2.5 (pdf)
    3D Audio: OpenAL (pdf)


    I am a signature virus. Please add me to your signature so that I may multiply

  9. #9
    Rambling Man
    Join Date
    Jan 2002
    Posts
    1,050
    You can visit my links page at my webiste to get a lot of useful links. I have links to where you can get all four major APIs (DirectX, OpenGL, Allegro, SDL), as well as, other useful links. If you decide to use Allegro, I have two basic tutorials on Allegro programs that you could refer to.

    Btw, there are more APIs than just the four that I mentioned.

    EDIT: Oh, I read over where you said that you don't want to use Allegro. Well, Allegro is probably the easiest API out there to use, so if you don't want to use Allegro because of its complexity I'm not sure if you'll like the other APIs at all. SDL is fairly simple, too, but Allegro is still a bit easier.

  10. #10
    Registered User
    Join Date
    Sep 2002
    Posts
    70
    could you please post a program that switches to 800x600x32bit colour, and draws some pixels on the screen.

    Please

    Cya.

  11. #11
    Rambling Man
    Join Date
    Jan 2002
    Posts
    1,050
    could you please post a program that switches to 800x600x32bit colour, and draws some pixels on the screen.
    With Allegro? If so, yeah. Go to my website and look at the tutorials for it. You won't believe how incredibly easy it is! Not to mention that the docs for Allegro are very good. If you're looking for a simple API, which it seems you are, Allegro is a good choice. SDL wouldn't be a bad choice, either, but from what I know Allegro is still a little bit easier.

  12. #12
    Registered User
    Join Date
    Sep 2002
    Posts
    70
    Hey,

    The tutorials look good, and i am going to use Allegro. BUT i don't have it installed. How do i install it for Microsoft Visual C++ 6.0 Enterprise??

    I have no clue.

    Please help

  13. #13
    fry
    fry is offline
    Registered User fry's Avatar
    Join Date
    Mar 2002
    Posts
    128
    Allegro.cc That has info for installing on various systems.

    Also, for tutorials, you might like to check out Loomsoft.net for some tutes on creating your first bitmaps and stuff I found it rather useful when i started. Loomsoft Tutorial
    IDE: Dev C++ 5
    Lib: Allegro
    OS: Windows 2000

  14. #14
    Registered User
    Join Date
    Sep 2002
    Posts
    70
    Ohhhh man, i would want to use allegro, but it's just too much work to get it working with Visual C++ 6.

    Is there a way to change the graphics mode & draw pixels on the screen WITHOUT an api??

    Surely there is, could somebody help out.....

  15. #15
    Registered User
    Join Date
    Sep 2002
    Posts
    70
    Ok i am going to use allegro, but i don't know how to compile it, i want to compile it for djgpp??

    Does anybody know where to get a precompiled version??

Page 1 of 3 123 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. using gotoxy() in graphics mode
    By sureshkumarct in forum C Programming
    Replies: 1
    Last Post: 01-08-2007, 01:18 PM
  2. Handling mouse in graphics mode in Turbo C/DOS
    By sureshkumarct in forum C Programming
    Replies: 2
    Last Post: 12-24-2006, 09:36 AM
  3. Replies: 1
    Last Post: 07-28-2003, 01:56 PM
  4. text input in graphics mode
    By jamie in forum C++ Programming
    Replies: 1
    Last Post: 03-17-2003, 10:33 PM
  5. Input a string in graphics mode?
    By Vegettų in forum C++ Programming
    Replies: 3
    Last Post: 03-08-2002, 06:34 PM

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