Results 1 to 4 of 4

Thread: stupid question about texturing

  1. #1
    Member Contributor
    Join Date
    Apr 2002
    Location
    kremnica, slovakia, europe, earth, sol :-)
    Posts
    99

    stupid question about texturing

    how is the damn glBindTexture() working??? i don't understand in at all! ok... i understand what glBindTexture() should do when i use an used texture name.

    but what happens when parameter is unused texture...??? how can i then bind name with some real bitmap???

    plz, hlp!!!

  2. #2
    Senior Member OpenGL Pro
    Join Date
    Oct 2000
    Location
    Fargo, ND
    Posts
    1,753

    Re: stupid question about texturing

    Usually to intialize textures you have something like so... (Pseudocode)

    Code :
    foreach texture
    {
        glBindTexture(someUniqueTexID);  // can get unique texIDs with glGenTextures
     
        glTexParameter(); // use this to set mag/min filter and wrap parameters
     
        glTexImage2d(); // use this to specify the texture data
    }
    Then for drawing you just do:
    Code :
    glBindTexture(texID);
    drawObject();
    Deiussum
    Software Engineer and OpenGL enthusiast

  3. #3
    Senior Member OpenGL Guru
    Join Date
    Jun 2000
    Location
    Gastonia, NC, USA
    Posts
    2,068

    Re: stupid question about texturing

    You have to load the bitmap texture first before you can bind it, openGL does not have any texture file loading routines.
    So you have ether write one or use someone elses.

    I have an example with a TGA bitmap loader, which I use in my examples on my wet site.
    GLblackjack and glBall.
    http://www.angelfire.com/linux/nexusone/

    Originally posted by miko:
    how is the damn glBindTexture() working??? i don't understand in at all! ok... i understand what glBindTexture() should do when i use an used texture name.

    but what happens when parameter is unused texture...??? how can i then bind name with some real bitmap???

    plz, hlp!!!

  4. #4
    Member Contributor
    Join Date
    Apr 2002
    Location
    kremnica, slovakia, europe, earth, sol :-)
    Posts
    99

    Re: stupid question about texturing

    tnx, you help me much!

Similar Threads

  1. stupid stupid question - Installing OpenGL?
    By JonnyW in forum OpenGL: Linux
    Replies: 3
    Last Post: 02-01-2004, 05:44 PM
  2. Quite a stupid question, but anyway...
    By ID_t1000 in forum OpenGL: Basic Coding
    Replies: 5
    Last Post: 01-29-2003, 05:26 AM
  3. Stupid C question...
    By MrShoe in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 10-02-2001, 03:54 AM
  4. stupid question about texturing techniques
    By lpVoid in forum OpenGL: Basic Coding
    Replies: 8
    Last Post: 09-02-2001, 03:07 PM
  5. Maybe a stupid question
    By J_Ramone in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 02-04-2001, 12:29 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean