I’m writing an image class for a game I’m working on and some images I need rendered with different filters than others, is there a way to save OpenGL filter (GL_LINEAR, GL_NEAREST etc.) in a variable?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Well of course it is possible. But you can use any value you like, as long as you use the right token when doing the call to
glTexParameterifor actually setting the filter before commencing drawing with the texture in question. In later versions of OpenGL you can also use sampler objects to encapsulate a set of filtering settings.