Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 3 of 3

Thread: rim with textures lower than current viewport

  1. #1
    Junior Member Regular Contributor
    Join Date
    Sep 2008
    Posts
    127

    rim with textures lower than current viewport

    Hello,
    let's assume I have a current viewport set (glViewport(...))
    with 1200x800 and a texture has the same size. Then I have no
    rim at the border of the texture. You can see this at the picture

    On the top image u can see there is no rim. the rexture is as large as the current viewport. The bottom image shows a texture that is below the current viewport. Why do I have those rims ? The smaller the texture is, with respect to the current viewport, the greater gets the rim.

    regards,
    lobbel


  2. #2
    Member Regular Contributor
    Join Date
    Apr 2007
    Posts
    271

    Re: rim with textures lower than current viewport

    Try GL_CLAMP_TO_EDGE. For example:

    glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S,
    GL_CLAMP_TO_EDGE );

    This is core in OpenGL since OpenGL 1.2. Otherwise it is provided by extension GL_EXT_texture_edge_clamp or extension GL_SGIS_texture_edge_clamp.

  3. #3
    Junior Member Regular Contributor
    Join Date
    Sep 2008
    Posts
    127

    Re: rim with textures lower than current viewport

    Thanks,
    GL_CLAMP_TO_EDGE solved the problem.

    regards,
    lobbel

Posting Permissions

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