Results 1 to 4 of 4

Thread: Texturing problem

  1. #1
    Member Newbie
    Join Date
    Nov 2002
    Location
    Germany
    Posts
    48

    Texturing problem

    I have a strange problem with OpenGL. I just can't bring my polygons to be textured. Here are the steps I take:

    Init a float array with red values.
    glEnable(GL_TEXTURE_1D);
    glTexImage1D() pointing to that array.
    Drawing the polygon using glTexCoord*() and glVertex*() for every vertex.

    The polygon appears with the color set by glColor*(). Can anyone help?
    Knowledge is Power

  2. #2
    Senior Member Regular Contributor
    Join Date
    Apr 2001
    Location
    Fort Collins, Colorado
    Posts
    446

    Re: Texturing problem

    Are you binding the texture before you draw?
    Look at glBindTexture if you're not...

    Hope that helps.

  3. #3
    Senior Member Regular Contributor
    Join Date
    Mar 2002
    Location
    California, USA
    Posts
    167

    Re: Texturing problem

    If your trying to texture polygons, you will probably want to use glTexImage2D rather than 1D because 1D textures have a height or width of 1. 1D textures are single pixel high or wide, so thats probably why your not seeing it.

    Old GLman

  4. #4
    Member Newbie
    Join Date
    Nov 2002
    Location
    Germany
    Posts
    48

    Re: Texturing problem

    I've solved my problem, thanks. I was using one-dimensional textures just to see, if it works, since they are much simpler to code.
    Knowledge is Power

Similar Threads

  1. Texturing Problem
    By Henners in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 07-23-2010, 07:17 AM
  2. ogl texturing problem
    By gl_CodER in forum OpenGL: Advanced Coding
    Replies: 8
    Last Post: 03-06-2006, 02:05 PM
  3. texturing problem
    By powerpad in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 03-30-2005, 07:46 AM
  4. Problem with Texturing...
    By Setzer in forum OpenGL: Basic Coding
    Replies: 7
    Last Post: 07-19-2002, 10:16 PM
  5. MDI and texturing problem?
    By asdiel in forum OpenGL: Advanced Coding
    Replies: 3
    Last Post: 12-06-2000, 10:40 AM

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