Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Using Bitmap Textures In OpenGL...

SephirothSephiroth Fayetteville, NC, USAMember Posts: 1,035
OK, [b]HOW[/b] on earth do I load a bitmap for use in OpenGL? I have found a TON of tutorials but they either use non-standard OpenGL stuff (glut for example) which I do NOT want to use, or they use obsolete functions which no longer exist (ie: stuff from glaux.h). Can somebody [b][red]PLEASE[/red][/b] show me how to load a bitmap and use glGenTextures() and glBindTexture() to load a small 32x32 bitmap and display it on a polygon? And once again, I won't use glut or anything else a user would have to download to play my game and if it came from glaux.h, there's a 99% chance I don't have it because I just updated to the latest stuff. Thanks for the help.

-[italic][b][red]S[/red][purple]e[/purple][blue]p[/blue][green]h[/green][red]i[/red][purple]r[/purple][blue]o[/blue][green]t[/green][red]h[/red]

Comments

  • gautamgautam Member Posts: 642
    I'll try to write one texture function for a bitmap by Monday if possible.




  • SephirothSephiroth Fayetteville, NC, USAMember Posts: 1,035
    : I'll try to write one texture function for a bitmap by Monday if possible.
    :
    :
    :
    :
    Wow, thanks! I figured out everything in the glTexImage2d() function, EXCEPT for the last parameter. It is defined as a pointer to "pixels". What the heck is a "pixels" defined as?! If I could get something to get me that far, wrapping the image onto objects is EASY.

    -[italic][b][red]S[/red][purple]e[/purple][blue]p[/blue][green]h[/green][red]i[/red][purple]r[/purple][blue]o[/blue][green]t[/green][red]h[/red]


  • iDaZeiDaZe Member Posts: 464
    : : I'll try to write one texture function for a bitmap by Monday if possible.
    : :
    : :
    : :
    : :
    : Wow, thanks! I figured out everything in the glTexImage2d() function, EXCEPT for the last parameter. It is defined as a pointer to "pixels". What the heck is a "pixels" defined as?! If I could get something to get me that far, wrapping the image onto objects is EASY.
    :
    : -[italic][b][red]S[/red][purple]e[/purple][blue]p[/blue][green]h[/green][red]i[/red][purple]r[/purple][blue]o[/blue][green]t[/green][red]h[/red]
    :
    :

    Found a couple of pages about glTexImage2d(), hopefully the anwser is in there somewhere

    http://tc1.chemie.uni-bielefeld.de/doc/OpenGL/hp/Reference/glTexImage2D.html

    http://www.eecs.tulane.edu/www/graphics/doc/OpenGL-Man-Pages/glTexImage2D.html

    I believe the function is also explaned in lesson 36 of nehe's tutorials

    http://nehe.gamedev.net/tutorials/lesson36.asp

    Hope you'll find what your looking for :-)

    ps. I still can't get a picture from te link you posted :-(

  • iDaZeiDaZe Member Posts: 464
    : : : I'll try to write one texture function for a bitmap by Monday if possible.
    : : :
    : : :
    : : :
    : : :
    : : Wow, thanks! I figured out everything in the glTexImage2d() function, EXCEPT for the last parameter. It is defined as a pointer to "pixels". What the heck is a "pixels" defined as?! If I could get something to get me that far, wrapping the image onto objects is EASY.
    : :
    : : -[italic][b][red]S[/red][purple]e[/purple][blue]p[/blue][green]h[/green][red]i[/red][purple]r[/purple][blue]o[/blue][green]t[/green][red]h[/red][/b][/italic]
    : :
    : :
    :
    : Found a couple of pages about glTexImage2d(), hopefully the anwser is in there somewhere
    :
    : http://tc1.chemie.uni-bielefeld.de/doc/OpenGL/hp/Reference/glTexImage2D.html
    :
    : http://www.eecs.tulane.edu/www/graphics/doc/OpenGL-Man-Pages/glTexImage2D.html
    :
    : I believe the function is also explaned in lesson 36 of nehe's tutorials
    :
    : http://nehe.gamedev.net/tutorials/lesson36.asp
    :
    : Hope you'll find what your looking for :-)
    :
    : ps. I still can't get a picture from te link you posted :-(
    :


    btw, you forgot [ /b][ /italic ] at the end of your name ;-)

  • SephirothSephiroth Fayetteville, NC, USAMember Posts: 1,035
    : ps. I still can't get a picture from te link you posted :-(
    :
    http://www.geocities.com/shrew_ii/programming/aoy_se-10.20.01.jpg

    That's the full address, and it works for me by clicking it. If clicking it won't work, type it in and it will work like a charm. I think geosh*ties has some kind of blocking program that won't allow direct linking to some types of files from external sites. I guess it's to stop people from getting accounts there and at angelfire, then using the geo site for image/file storage only.


    -[italic][b][red]S[/red][purple]e[/purple][blue]p[/blue][green]h[/green][red]i[/red][purple]r[/purple][blue]o[/blue][green]t[/green][red]h[/red]


  • gautamgautam Member Posts: 642
    It doesn't find the page on clicking.

    It only seems works with right click and save target as. Well thats the only way it worked for me.

    : : ps. I still can't get a picture from te link you posted :-(
    : :
    : http://www.geocities.com/shrew_ii/programming/aoy_se-10.20.01.jpg
    :
    : That's the full address, and it works for me by clicking it. If clicking it won't work, type it in and it will work like a charm. I think geosh*ties has some kind of blocking program that won't allow direct linking to some types of files from external sites. I guess it's to stop people from getting accounts there and at angelfire, then using the geo site for image/file storage only.
    :
    :
    : -[italic][b][red]S[/red][purple]e[/purple][blue]p[/blue][green]h[/green][red]i[/red][purple]r[/purple][blue]o[/blue][green]t[/green][red]h[/red]
    :
    :


  • iDaZeiDaZe Member Posts: 464
    Ah yes, that works ... wow, psychadelic ;-)

    : It doesn't find the page on clicking.
    :
    : It only seems works with right click and save target as. Well thats the only way it worked for me.
    :
    : : : ps. I still can't get a picture from te link you posted :-(
    : : :
    : : http://www.geocities.com/shrew_ii/programming/aoy_se-10.20.01.jpg
    : :
    : : That's the full address, and it works for me by clicking it. If clicking it won't work, type it in and it will work like a charm. I think geosh*ties has some kind of blocking program that won't allow direct linking to some types of files from external sites. I guess it's to stop people from getting accounts there and at angelfire, then using the geo site for image/file storage only.
    : :
    : :
    : : -[italic][b][red]S[/red][purple]e[/purple][blue]p[/blue][green]h[/green][red]i[/red][purple]r[/purple][blue]o[/blue][green]t[/green][red]h[/red]
    : :
    : :
    :
    :


  • SephirothSephiroth Fayetteville, NC, USAMember Posts: 1,035
    : Ah yes, that works ... wow, psychadelic ;-)

    I am [b][red]*NOT*[/red][/b] responsible for you people going into siezures while looking at that screenshot!


    -[italic][b][red]S[/red][purple]e[/purple][blue]p[/blue][green]h[/green][red]i[/red][purple]r[/purple][blue]o[/blue][green]t[/green][red]h[/red]


Sign In or Register to comment.