1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-19 13:40:49 +03:00

0029337: Visualization, TKOpenGl - visual artifacts on Intel Broadwell GPU

Enable multiple draw buffers in shader program only if its required by specific application.

occSetFragColor() - a new GLSL function has been introduced
as an alternative to setting occFragColor/occFragCoverage variables.
This commit is contained in:
apl
2017-11-27 15:16:21 +03:00
committed by apn
parent 12d71ad6a5
commit b17e5bae1a
12 changed files with 201 additions and 75 deletions

View File

@@ -441,18 +441,13 @@ void OpenGl_Context::SetDrawBuffers (const Standard_Integer theNb, const Standar
Standard_Boolean useDefaultFbo = Standard_False;
for (Standard_Integer anI = 0; anI < theNb; ++anI)
{
#if !defined(GL_ES_VERSION_2_0)
const Standard_Integer aDrawBuffer = !myIsStereoBuffers ? stereoToMonoBuffer (theDrawBuffers[anI]) : theDrawBuffers[anI];
#else
const Standard_Integer aDrawBuffer = theDrawBuffers[anI];
#endif
if (aDrawBuffer < GL_COLOR_ATTACHMENT0 && aDrawBuffer != GL_NONE)
if (theDrawBuffers[anI] < GL_COLOR_ATTACHMENT0 && theDrawBuffers[anI] != GL_NONE)
{
useDefaultFbo = Standard_True;
}
else if (aDrawBuffer != GL_NONE)
else if (theDrawBuffers[anI] != GL_NONE)
{
myDrawBuffers.SetValue (anI, aDrawBuffer);
myDrawBuffers.SetValue (anI, theDrawBuffers[anI]);
}
}
if (arbFBO != NULL && useDefaultFbo)