ALLEGRO Question

This is a discussion on ALLEGRO Question within the C Programming forums, part of the General Programming Boards category; Hello...after reading several posts on this board I went hunting and grabbed all the components of the DJGPP compiler as ...

  1. #1
    Unregistered
    Guest

    Question ALLEGRO Question

    Hello...after reading several posts on this board I went hunting and grabbed all the components of the DJGPP compiler as well as the Allegro add-on. I can get all the Allegro examples to run (this I take as proof that I have installed it correctly =) and if I follow an example exactly I get the correct result. But with the following example only gives me a white screen...no errors during compile and it ends cleanly
    #include <stlib.h>
    #include <stdlib.h>

    #include "allegro.h"

    int main()
    {
    BITMAP *scr_buff;
    allegro_init();
    install_keyboard;
    set_gfx_mode(GFX_VGA, 320, 200, 0, 0);
    set_pallete(desktop_pallete);
    scr_buff = create_bitmap(320, 200);
    clear(scr_buff);
    vline(scr_buff, 100, 20, 150, 255);
    // I have tried every primitive routine that uses the bitmap pointer
    // not sure if I am doing something wrong here
    destroy_bitmap(scr_buff);
    readkey();
    return 0;
    }

    Please if anyone has a suggestion let me know...it is getting very
    frustrating.
    BTW I am running win 98 and using a voodoo 3 2000 agp video card..maybe that has something to do with it.
    TIA

  2. #2
    Blank
    Join Date
    Aug 2001
    Posts
    1,034
    Your not drawing to the screen but to a backbuffer that
    you created. You therefore probably want to wait for a refresh
    and blit the backbuffer on to the screen.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Allegro Programming Question
    By xmltorrent in forum Game Programming
    Replies: 2
    Last Post: 08-24-2006, 03:45 PM
  2. Exam Question - Possible Mistake?
    By Richie T in forum C++ Programming
    Replies: 15
    Last Post: 05-08-2006, 04:44 PM
  3. Very simple question, problem in my Code.
    By Vber in forum C Programming
    Replies: 7
    Last Post: 11-16-2002, 03:57 PM
  4. Allegro Question
    By gnu-ehacks in forum Game Programming
    Replies: 2
    Last Post: 12-23-2001, 11:57 PM
  5. ALLEGRO Question
    By Unregistered in forum Game Programming
    Replies: 10
    Last Post: 10-22-2001, 02:27 PM

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