Results 1 to 3 of 3

Thread: Texture problems

  1. #1
    Junior Member Newbie
    Join Date
    Oct 2002
    Location
    Chicago, IL, USA
    Posts
    4

    Texture problems

    I'm writing a program with VisualC++ 6.0, it loads many textures and
    bind them with glBind but executing the program many times the texture
    aspect get worse like near columns in the bitmap were shifted ,the
    problem appear and disappear also if I resize the Opengl window.
    I tried the program on a Tnt2 M64 using various driver versions and the
    problem remains.
    I think that is not a driver problem but I have no idea what can I try
    in my code.
    Any suggestions?
    Thanks

  2. #2
    Senior Member Regular Contributor
    Join Date
    Mar 2000
    Location
    Germany
    Posts
    183

    Re: Texture problems

    Hi Andres!

    Hm, do you mean each time you start your programm the texturing get worse?

    Or has your window every time a different size? Than it could be that perspective correct texturemapping is not enabled.

    If you could post a code snipped or so, the community will probably able to help you.

    Or do you have screenshots showing the problem?

    What kind of system (OS, graphics card) are you using?

    Regards,

    LG

  3. #3
    Junior Member Newbie
    Join Date
    Oct 2002
    Location
    Chicago, IL, USA
    Posts
    4

    Re: Texture problems

    This is the code I use for binding a texture
    void Bitmap::MakeBind(int genBind)
    {
    glEnable(GL_TEXTURE_2D);
    if(genBind)
    glGenTextures(1,&bindId);
    glBindTexture(GL_TEXTURE_2D,bindId);
    glPixelStorei(GL_PACK_ALIGNMENT,1);
    glPixelStorei(GL_UNPACK_ALIGNMENT,1);
    glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTE R,GL_LINEAR);
    glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTE R,GL_LINEAR);
    if(isRGBA)
    glTexImage2D(GL_TEXTURE_2D,0,4,getWidth(),getHeigh t(),0,GL_RGBA,GL_UNSIGNED_BYTE,(GLubyte*)data);
    else glTexImage2D(GL_TEXTURE_2D,0,3,getWidth(),getHeigh t(),0,GL_RGB,GL_UNSIGNED_BYTE,(GLubyte*)data);
    glTexEnvf(GL_TEXTURE_ENV,GL_TEXTURE_ENV_MODE,GL_MO DULATE);
    }
    The problem occur also when I set the view with glOrtho
    Sometimes the texture is correctly displayed but when I resize the window it can happen that
    the near columns of the texture lose alignment.
    The problem continues if I restart the program maybe because the driver were broken during debug
    with VisualStudio.
    I use Microsoft VisualC++ 6.0 on Win98 with a Tnt2 M64

Similar Threads

  1. Problems Texture Mapping with Float Texture
    By CelticBlues in forum OpenGL: GLSL
    Replies: 21
    Last Post: 02-08-2009, 04:13 AM
  2. More texture problems: here we go....again!
    By gui24a in forum OpenGL: Basic Coding
    Replies: 6
    Last Post: 08-25-2008, 12:30 PM
  3. Texture Problems ...
    By Saintex in forum OpenGL: Basic Coding
    Replies: 8
    Last Post: 07-22-2002, 07:38 AM
  4. Texture Problems
    By spectrum in forum OpenGL: Basic Coding
    Replies: 8
    Last Post: 01-09-2002, 02:58 AM
  5. AVI texture problems
    By dmsy in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 05-12-2000, 01:09 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