Part of the Khronos Group

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 5 of 5

Thread: Textures not appearing on some NVidia cards

  1. #1
    Junior Member Newbie
    Join Date
    Oct 2004

    Textures not appearing on some NVidia cards

    Are there any known issues with NVidia cards and openGL textures? I've developed an opengl activex control in VB6 that displays terrain data and allows for draping a topographical image over the surface. The problem is that on some cards (the one I'm using is an NVidia GeForce 4200 Go (Dell Mobile)), the textures show up completely gray. Additionally, when the user rotates or zooms the scene, I generate a 2D texture of the scene so that it can be displayed while a wireframe box rotates with the mouse movement (to keep from having to render the entire scene during navigation). This texture is only displayed on some graphics cards as well, and on others (like my NVidia) the background is just white.

    Is there anything I can do to show the textures properly on all graphics cards? I can provide sample code if needed.

  2. #2
    Junior Member Regular Contributor
    Join Date
    Aug 2004
    Angers, France

    Re: Textures not appearing on some NVidia cards

    yes you can display a piece of code, pliz
    you can check there is some good tex loader in Cpp and other languages like VB
    The .Product will make you .Believe

  3. #3
    Junior Member Newbie
    Join Date
    Oct 2004

    Re: Textures not appearing on some NVidia cards

    This is the code that displays the 2D "snapshot" texture. glGetError returns 1282 when glEnd is called (if that helps).

    I should also add that the textures do show up properly if I turn my hardware acceleration to zero or the next lowest level.

    glColorMaterial faceFront, cmmAmbientAndDiffuse
    glEnable glcColorMaterial
    glEnable glcTexture2D
    glTexEnvf tetTextureEnv, tenTextureEnvMode, tepModulate
    glTexEnvf tetTextureEnv, tenTextureEnvMode, tepDecal

    'bind the frame buffer snapshot
    glBindTexture glTexture2D, TEX_FB

    'draw a quad onto which the texture (FB) is to be draped

    glBegin bmQuads

    glTexCoord2f 0, 0
    glVertex3f -mintWidth / 2, -mintHeight / 2, -mdblZmax
    glTexCoord2f 0, 1
    glVertex3f -mintWidth / 2, mintHeight / 2, -mdblZmax
    glTexCoord2f 1, 1
    glVertex3f mintWidth / 2, mintHeight / 2, -mdblZmax
    glTexCoord2f 1, 0
    glVertex3f mintWidth / 2, -mintHeight / 2, -mdblZmax


    glDisable glcTexture2D
    glDisable glcColorMaterial

  4. #4
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Grenoble - France

    Re: Textures not appearing on some NVidia cards

    If you look at the gl.h header, you will see that this error code means GL_INVALID_OPERATION.
    That is the operation is not allowed in the current state.
    Are you sure it is only the glEnd that triggers this error ?
    Nothing seems wrong in the code you provide, even if I do not understand what are 'bmQuads',tetTextureEnv, tenTextureEnvMode, tepDecal, etc.

    Are you sure you specify a power of two texture ? correct format ?

  5. #5
    Intern Newbie
    Join Date
    Jul 2004

    Re: Textures not appearing on some NVidia cards

    I may be wrong but aren't those coord CW? Shouldn't they be CCW?

Posting Permissions

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