switchbrew / libnx

Library for Switch Homebrew

Home Page:https://switchbrew.github.io/libnx/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Missing options in OpenGL for Anisotropic Filtering

niko1point0 opened this issue · comments

I tried to do Anisotropic FIltering on Nintendo Switch with the following lines:

GLfloat maxAnisotropy = 0.0f;
glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &maxAnisotropy);
glSamplerParameteri(sampler, GL_TEXTURE_MAX_ANISOTROPY_EXT, maxAnisotropy);

The compiler gave me an error, saying that GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT and GL_TEXTURE_MAX_ANISOTROPY_EXT were not defined. However, on Windows, I got the integer values that they hold (34046 and 34047), then I tried this code on Switch:

GLfloat maxAnisotropy = 0.0f;
glGetFloatv(34047, &maxAnisotropy);
glSamplerParameteri(sampler, 34046, maxAnisotropy);

And then Anisotropic Filtering worked perfectly fine on Nintendo Switch. I would really like it if GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT and GL_TEXTURE_MAX_ANISOTROPY_EXT can be defined in libnx, so that this feature can be easily used by anyone who wants to use the filtering feature

commented

Wrong repo, should report in switch-mesa instead. Plus, there's little we can do for things that are unsupported or problematic in nouveau (we only ported it, we didn't write it).

Ok. Thank you

The reason I am posting this is because there is nothing problematic about the feature, the feature itself works just fine, except the variables are not defined