Results 1 to 14 of 14

Thread: Bitmaps and OpenGL

  1. #1

    Thread Starter
    Conquistador
    Join Date
    Dec 1999
    Location
    Australia
    Posts
    4,527

    Bitmaps and OpenGL

    I was wondering if anyone knew how to load a bitmap from a resource file and then draw it on screen with opengl?

    I've seen some examples around but they don't seem to cut it
    [Edit]Or I can't get them to work properly :$[/Edit]

    Thanks!

  2. #2
    KrisSiegel.com Kasracer's Avatar
    Join Date
    Jul 2003
    Location
    USA, Maryland
    Posts
    4,985
    I'd use the SDL library to work with OpenGL.

    Not exactly sure how to open the bitmap form a resource file though... why would you need to use a resource file anyway?

  3. #3

    Thread Starter
    Conquistador
    Join Date
    Dec 1999
    Location
    Australia
    Posts
    4,527
    so as to not have external files

  4. #4
    KrisSiegel.com Kasracer's Avatar
    Join Date
    Jul 2003
    Location
    USA, Maryland
    Posts
    4,985
    Originally posted by da_silvy
    so as to not have external files
    What's wrong with external files?

  5. #5

    Thread Starter
    Conquistador
    Join Date
    Dec 1999
    Location
    Australia
    Posts
    4,527
    That's not the point!


    Forget the file loading method

    How do I draw them !

  6. #6
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  7. #7

    Thread Starter
    Conquistador
    Join Date
    Dec 1999
    Location
    Australia
    Posts
    4,527
    they were theh examples that didn't cut it

    thanks anyway D:

  8. #8
    Addicted Member
    Join Date
    Oct 2003
    Posts
    149
    forget opengl and use directx

  9. #9
    KrisSiegel.com Kasracer's Avatar
    Join Date
    Jul 2003
    Location
    USA, Maryland
    Posts
    4,985
    Originally posted by abcdefg
    forget opengl and use directx
    Or how about no?

  10. #10

    Thread Starter
    Conquistador
    Join Date
    Dec 1999
    Location
    Australia
    Posts
    4,527
    I'm using opengl...

  11. #11
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    I'll try and find a tutorial.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  12. #12

    Thread Starter
    Conquistador
    Join Date
    Dec 1999
    Location
    Australia
    Posts
    4,527
    thanks

  13. #13
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    Ok, I found something extremly simple here:
    http://www.ncrg.aston.ac.uk/~cornfos...penglcode.html

    The opengl2d*.c files show some basic 2d drawing in OpenGL. All you have to do is to set the texture to the image you want displayed.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  14. #14
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    http://graphics.tu-bs.de/people/schuberth/opengl/oglut

    Of course, given that this is a 2-d game I recommend SDL instead.
    www.libsdl.org
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width