Bug 1560771 - Give proper line width range for core profile r=jgilbert

Because glLineWidth is deprecated in newer versions of core opengl,
we currently ignore lineWidth when using core profile.  We should
probably also make ALIASED_LINE_WIDTH_RANGE match this behavior to
lessen confusion.

Differential Revision: https://phabricator.services.mozilla.com/D41117

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Greyson Gilbert 2019-08-09 20:32:20 +00:00
parent 715bf97a70
commit 03e40ae283

View File

@ -468,7 +468,12 @@ bool WebGLContext::InitAndValidateGL(FailureReason* const out_failReason) {
////////////////
gl->fGetFloatv(LOCAL_GL_ALIASED_LINE_WIDTH_RANGE, mGLAliasedLineWidthRange);
if (gl->IsCoreProfile()) {
mGLAliasedLineWidthRange[0] = 1.0f;
mGLAliasedLineWidthRange[1] = 1.0f;
} else {
gl->fGetFloatv(LOCAL_GL_ALIASED_LINE_WIDTH_RANGE, mGLAliasedLineWidthRange);
}
const GLenum driverPName = gl->IsCoreProfile()
? LOCAL_GL_POINT_SIZE_RANGE