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 1 of 1

Thread: Why texture filtering doesn't work here?

  1. #1
    Newbie Newbie
    Join Date
    Mar 2018
    Posts
    1

    Why texture filtering doesn't work here?

    [SOLVED] Found that everything works just fine, it's just me changing filtering mode in other place.

    Hello, I trying to create RenderTarget's in OpenGL:
    Code :
    	glGenFramebuffers(1, &framebuffer_id);
     
    	glBindFramebuffer(GL_FRAMEBUFFER, framebuffer_id);
     
    	glGenTextures(1, &framebuffer_color_channel);
    	glBindTexture(GL_TEXTURE_2D, framebuffer_color_channel);
    	glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0);
     
    	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
    	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
     
    	glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, framebuffer_color_channel, 0);
    But when I try to render quad with framebuffer_color_channel texture on it, it looks like there is GL_NEAREST filter instead of GL_LINEAR. Is it normal? What can I do?
    Last edited by TonyForge; 03-09-2018 at 07:05 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
  •