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

Fix errors.

This commit is contained in:
isk
2015-10-29 16:53:38 +03:00
committed by duv
parent ef51767a6c
commit a7dabcc955
2 changed files with 6 additions and 10 deletions

View File

@@ -2403,13 +2403,9 @@ Standard_Boolean OpenGl_View::runRaytraceShaders (const Standard_Integer
// Set frame accumulation weight // Set frame accumulation weight
myRaytraceProgram->SetUniform (theGlContext, myRaytraceProgram->SetUniform (theGlContext,
myUniformLocations[0][OpenGl_RT_uMaxRadiance], static_cast<Standard_ShortReal> (theCView.RenderParams.RadianceClampValue)); myUniformLocations[0][OpenGl_RT_uMaxRadiance], static_cast<Standard_ShortReal> (myRenderParams.RadianceClampValue));
// Set random number generator seed Standard_Integer aSamplesPerPixel =myRenderParams.SamplesPerPixel;
myRaytraceProgram->SetUniform (theGlContext,
myUniformLocations[0][OpenGl_RT_uFrameRndSeed], static_cast<Standard_Integer> (myRNG.NextInt() >> 2));
Standard_Integer aSamplesPerPixel = theCView.RenderParams.SamplesPerPixel;
if (aSamplesPerPixel == 0) if (aSamplesPerPixel == 0)
{ {
@@ -2423,8 +2419,8 @@ Standard_Boolean OpenGl_View::runRaytraceShaders (const Standard_Integer
{ {
for (int aPassIndex = 0; aPassIndex < aSamplesPerPixel; ++aPassIndex) for (int aPassIndex = 0; aPassIndex < aSamplesPerPixel; ++aPassIndex)
{ {
aRenderFramebuffer = myAccumFrames % 2 ? myRaytraceFBO1 : myRaytraceFBO2; aRenderFramebuffer = myAccumFrames % 2 ? myRaytraceFBO1[aFBOIdx] : myRaytraceFBO2[aFBOIdx];
anAccumFramebuffer = myAccumFrames % 2 ? myRaytraceFBO2 : myRaytraceFBO1; anAccumFramebuffer = myAccumFrames % 2 ? myRaytraceFBO2[aFBOIdx] : myRaytraceFBO1[aFBOIdx];
aRenderFramebuffer->BindBuffer (theGlContext); aRenderFramebuffer->BindBuffer (theGlContext);
@@ -2472,7 +2468,7 @@ Standard_Boolean OpenGl_View::runRaytraceShaders (const Standard_Integer
theGlContext, GL_TEXTURE0 + OpenGl_RT_DepthTexture); theGlContext, GL_TEXTURE0 + OpenGl_RT_DepthTexture);
myOutImageProgram->SetUniform (theGlContext, myOutImageProgram->SetUniform (theGlContext,
myUniformLocations[0][OpenGl_RT_uBilateralEnabled], theCView.RenderParams.IsGIFilteringEnabled ? 1 : 0); myUniformLocations[0][OpenGl_RT_uBilateralEnabled], myRenderParams.IsGIFilteringEnabled ? 1 : 0);
theGlContext->core20fwd->glDrawArrays (GL_TRIANGLES, 0, 6); theGlContext->core20fwd->glDrawArrays (GL_TRIANGLES, 0, 6);

View File

@@ -8522,7 +8522,7 @@ static Standard_Integer VRenderParams (Draw_Interpretor& theDI,
Standard_Boolean toEnable = Standard_True; Standard_Boolean toEnable = Standard_True;
if (++anArgIter < theArgNb if (++anArgIter < theArgNb
&& !parseOnOff (theArgVec[anArgIter], toEnable)) && !ViewerTest::ParseOnOff (theArgVec[anArgIter], toEnable))
{ {
--anArgIter; --anArgIter;
} }