Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenGL: fix mipmap for profile 3.2 #13270

Merged
merged 2 commits into from Dec 31, 2017

Conversation

@FernetMenta
Copy link
Member

commented Dec 30, 2017

see title

@fritsch

This comment has been minimized.

Copy link
Member

commented Dec 30, 2017

@VelocityRa

This comment has been minimized.

Copy link
Member

commented Dec 30, 2017

Shouldn't this be applied on GL 3.1 and onwards?

https://www.khronos.org/opengl/wiki/Common_Mistakes#Legacy_Generation

In GL 3.0, GL_GENERATE_MIPMAP is deprecated, and in 3.1 and above, it was removed. So for those versions, you must use glGenerateMipmap.

@fritsch

This comment has been minimized.

Copy link
Member

commented Dec 30, 2017

@VelocityRa

This comment has been minimized.

Copy link
Member

commented Dec 30, 2017

Not sure what you mean, this call is already there in the PR.
I mean

if (major > 3 || (major == 3 && minor > 1))

to this

if (major > 3 || (major == 3 && minor >= 1))

and m_profile32 to m_profile31.

Or go all the way and do 3.0 instead, since GL_GENERATE_MIPMAP is deprecated anyway (and 3.0 is the first version where glGenerateMipmap is supported).

@fritsch

This comment has been minimized.

Copy link
Member

commented Dec 30, 2017

Yes - I see. We should then go to check minor >= 0 and use the glGenerateMipmap

@VelocityRa

This comment has been minimized.

Copy link
Member

commented Dec 30, 2017

Yeah or just (major >= 3).

@fritsch

This comment has been minimized.

Copy link
Member

commented Dec 30, 2017

I sent a PR to this branch.

@FernetMenta FernetMenta merged commit 7d1d3e6 into xbmc:master Dec 31, 2017
1 check passed
1 check passed
default You're awesome. Have a cookie
Details
@FernetMenta FernetMenta deleted the FernetMenta:mipmap branch Dec 31, 2017
@Rechi Rechi added this to the L 18.0-alpha1 milestone Dec 31, 2017
@@ -40,6 +40,6 @@ class CGLTexture : public CBaseTexture

protected:
GLuint m_texture = 0;
bool m_profile32 = false;
bool m_profile30 = false;

This comment has been minimized.

Copy link
@FernetMenta

FernetMenta Dec 31, 2017

Author Member

@fritsch btw, a profile 3.0 does not exist. profiles were introduced with 3.2

This comment has been minimized.

Copy link
@fritsch

fritsch Dec 31, 2017

Member

Thx should I change it to m_oglversion?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.