diff --git a/Source/Ember/Affine2D.h b/Source/Ember/Affine2D.h index 9b1e937..b935dc8 100644 --- a/Source/Ember/Affine2D.h +++ b/Source/Ember/Affine2D.h @@ -58,12 +58,12 @@ public: template Affine2D& operator = (const Affine2D& affine) { - A(T(affine.A())); - B(T(affine.B())); - C(T(affine.C())); - D(T(affine.D())); - E(T(affine.E())); - F(T(affine.F())); + A(static_cast(affine.A())); + B(static_cast(affine.B())); + C(static_cast(affine.C())); + D(static_cast(affine.D())); + E(static_cast(affine.E())); + F(static_cast(affine.F())); return *this; } diff --git a/Source/Ember/Ember.h b/Source/Ember/Ember.h index abdf5ca..445b8ad 100644 --- a/Source/Ember/Ember.h +++ b/Source/Ember/Ember.h @@ -107,45 +107,45 @@ public: m_FinalRasH = ember.m_FinalRasH; m_OrigFinalRasW = ember.m_OrigFinalRasW; m_OrigFinalRasH = ember.m_OrigFinalRasH; - m_OrigPixPerUnit = T(ember.m_OrigPixPerUnit); - m_RandPointRange = T(ember.m_RandPointRange); + m_OrigPixPerUnit = static_cast(ember.m_OrigPixPerUnit); + m_RandPointRange = static_cast(ember.m_RandPointRange); m_SubBatchSize = ember.m_SubBatchSize; m_FuseCount = ember.m_FuseCount; m_Supersample = ember.m_Supersample; m_TemporalSamples = ember.m_TemporalSamples; m_Symmetry = ember.m_Symmetry; - m_Quality = T(ember.m_Quality); - m_PixelsPerUnit = T(ember.m_PixelsPerUnit); - m_Zoom = T(ember.m_Zoom); - m_CamZPos = T(ember.m_CamZPos); - m_CamPerspective = T(ember.m_CamPerspective); - m_CamYaw = T(ember.m_CamYaw); - m_CamPitch = T(ember.m_CamPitch); - m_CamDepthBlur = T(ember.m_CamDepthBlur); - m_BlurCurve = T(ember.m_BlurCurve); + m_Quality = static_cast(ember.m_Quality); + m_PixelsPerUnit = static_cast(ember.m_PixelsPerUnit); + m_Zoom = static_cast(ember.m_Zoom); + m_CamZPos = static_cast(ember.m_CamZPos); + m_CamPerspective = static_cast(ember.m_CamPerspective); + m_CamYaw = static_cast(ember.m_CamYaw); + m_CamPitch = static_cast(ember.m_CamPitch); + m_CamDepthBlur = static_cast(ember.m_CamDepthBlur); + m_BlurCurve = static_cast(ember.m_BlurCurve); m_CamMat = ember.m_CamMat; - m_CenterX = T(ember.m_CenterX); - m_CenterY = T(ember.m_CenterY); - m_RotCenterY = T(ember.m_RotCenterY); - m_Rotate = T(ember.m_Rotate); - m_Brightness = T(ember.m_Brightness); - m_Gamma = T(ember.m_Gamma); - m_Vibrancy = T(ember.m_Vibrancy); - m_GammaThresh = T(ember.m_GammaThresh); - m_HighlightPower = T(ember.m_HighlightPower); - m_K2 = T(ember.m_K2); - m_Time = T(ember.m_Time); + m_CenterX = static_cast(ember.m_CenterX); + m_CenterY = static_cast(ember.m_CenterY); + m_RotCenterY = static_cast(ember.m_RotCenterY); + m_Rotate = static_cast(ember.m_Rotate); + m_Brightness = static_cast(ember.m_Brightness); + m_Gamma = static_cast(ember.m_Gamma); + m_Vibrancy = static_cast(ember.m_Vibrancy); + m_GammaThresh = static_cast(ember.m_GammaThresh); + m_HighlightPower = static_cast(ember.m_HighlightPower); + m_K2 = static_cast(ember.m_K2); + m_Time = static_cast(ember.m_Time); m_Background = ember.m_Background; m_Interp = ember.m_Interp; m_AffineInterp = ember.m_AffineInterp; - m_MinRadDE = T(ember.m_MinRadDE); - m_MaxRadDE = T(ember.m_MaxRadDE); - m_CurveDE = T(ember.m_CurveDE); + m_MinRadDE = static_cast(ember.m_MinRadDE); + m_MaxRadDE = static_cast(ember.m_MaxRadDE); + m_CurveDE = static_cast(ember.m_CurveDE); m_SpatialFilterType = ember.m_SpatialFilterType; - m_SpatialFilterRadius = T(ember.m_SpatialFilterRadius); + m_SpatialFilterRadius = static_cast(ember.m_SpatialFilterRadius); m_TemporalFilterType = ember.m_TemporalFilterType; - m_TemporalFilterExp = T(ember.m_TemporalFilterExp); - m_TemporalFilterWidth = T(ember.m_TemporalFilterWidth); + m_TemporalFilterExp = static_cast(ember.m_TemporalFilterExp); + m_TemporalFilterWidth = static_cast(ember.m_TemporalFilterWidth); m_PaletteMode = ember.m_PaletteMode; m_PaletteInterp = ember.m_PaletteInterp; m_Name = ember.m_Name; @@ -223,7 +223,7 @@ public: for (size_t i = 0; i < count; i++) { Xform xform; - xform.m_ColorX = T((oldsize + i) & 1); + xform.m_ColorX = static_cast((oldsize + i) & 1); xform.AddVariation(m_VariationList->GetVariationCopy(eVariationId::VAR_LINEAR)); AddXform(xform); } @@ -381,7 +381,7 @@ public: for (size_t i = 0; i < m_Xforms.size(); i++) if (GetXform(i) == xform) - return intmax_t(i); + return static_cast(i); return index; } @@ -394,11 +394,11 @@ public: /// The index of the matched xform if found, else -1. intmax_t GetTotalXformIndex(const Xform* xform, bool forceFinal = false) const { - size_t totalXformCount = TotalXformCount(forceFinal); + const auto totalXformCount = TotalXformCount(forceFinal); for (size_t i = 0; i < totalXformCount; i++) if (GetTotalXform(i, forceFinal) == xform) - return intmax_t(i); + return static_cast(i); return -1; } @@ -483,16 +483,16 @@ public: m_CamMat[1][2] = std::sin(m_CamPitch) * std::cos(-m_CamYaw); m_CamMat[2][2] = std::cos(m_CamPitch); - if (projBits & et(eProjBits::PROJBITS_BLUR)) + if (projBits & static_cast(eProjBits::PROJBITS_BLUR)) { - if (projBits & et(eProjBits::PROJBITS_YAW)) + if (projBits & static_cast(eProjBits::PROJBITS_YAW)) m_ProjFunc = &EmberNs::Ember::ProjectPitchYawDepthBlur; else m_ProjFunc = &EmberNs::Ember::ProjectPitchDepthBlur; } - else if ((projBits & et(eProjBits::PROJBITS_PITCH)) || (projBits & et(eProjBits::PROJBITS_YAW))) + else if ((projBits & static_cast(eProjBits::PROJBITS_PITCH)) || (projBits & static_cast(eProjBits::PROJBITS_YAW))) { - if (projBits & et(eProjBits::PROJBITS_YAW)) + if (projBits & static_cast(eProjBits::PROJBITS_YAW)) m_ProjFunc = &EmberNs::Ember::ProjectPitchYaw; else m_ProjFunc = &EmberNs::Ember::ProjectPitch; @@ -503,7 +503,7 @@ public: } } - m_BlurCoef = T(0.1) * m_CamDepthBlur; + m_BlurCoef = static_cast(0.1) * m_CamDepthBlur; } /// @@ -540,9 +540,9 @@ public: if ((onlyScaleIfNewIsSmaller && (width < m_OrigFinalRasW || height < m_OrigFinalRasH)) || !onlyScaleIfNewIsSmaller) { if (scaleType == eScaleType::SCALE_WIDTH) - m_PixelsPerUnit = m_OrigPixPerUnit * (T(width) / T(m_OrigFinalRasW)); + m_PixelsPerUnit = m_OrigPixPerUnit * (static_cast(width) / static_cast(m_OrigFinalRasW)); else if (scaleType == eScaleType::SCALE_HEIGHT) - m_PixelsPerUnit = m_OrigPixPerUnit * (T(height) / T(m_OrigFinalRasH)); + m_PixelsPerUnit = m_OrigPixPerUnit * (static_cast(height) / static_cast (m_OrigFinalRasH)); else m_PixelsPerUnit = m_OrigPixPerUnit; } @@ -577,7 +577,7 @@ public: /// void EqualizeWeights() { - T weight = T(1) / m_Xforms.size(); + T weight = static_cast(1) / m_Xforms.size(); for (auto& xform : m_Xforms) xform.m_Weight = weight; } @@ -648,9 +648,9 @@ public: { size_t count = 0, i = 0, j = 0; - while (auto xform = GetTotalXform(i++)) + while (const auto xform = GetTotalXform(i++)) for (j = 0; j < xform->TotalVariationCount(); j++) - if (auto var = xform->GetVariation(j)) + if (const auto var = xform->GetVariation(j)) count += var->StateParamCount(); return count; @@ -735,9 +735,9 @@ public: Palette::RgbToHsv(glm::value_ptr(embers[k].m_Palette[i]), t); for (size_t j = 0; j < 3; j++) - s[j] += float(coefs[k]) * t[j]; + s[j] += static_cast(coefs[k]) * t[j]; - s[3] += float(coefs[k]) * embers[k].m_Palette[i][3]; + s[3] += static_cast(coefs[k]) * embers[k].m_Palette[i][3]; } Palette::HsvToRgb(s, glm::value_ptr(m_Palette[i])); @@ -1165,15 +1165,15 @@ public: { size_t val = 0; - if (m_CamZPos != 0) val |= et(eProjBits::PROJBITS_ZPOS); + if (m_CamZPos != 0) val |= static_cast(eProjBits::PROJBITS_ZPOS); - if (m_CamPerspective != 0) val |= et(eProjBits::PROJBITS_PERSP); + if (m_CamPerspective != 0) val |= static_cast(eProjBits::PROJBITS_PERSP); - if (m_CamPitch != 0) val |= et(eProjBits::PROJBITS_PITCH); + if (m_CamPitch != 0) val |= static_cast(eProjBits::PROJBITS_PITCH); - if (m_CamYaw != 0) val |= et(eProjBits::PROJBITS_YAW); + if (m_CamYaw != 0) val |= static_cast(eProjBits::PROJBITS_YAW); - if (m_CamDepthBlur != 0) val |= et(eProjBits::PROJBITS_BLUR); + if (m_CamDepthBlur != 0) val |= static_cast(eProjBits::PROJBITS_BLUR); return val; } @@ -1240,11 +1240,11 @@ public: z = m_CamMat[1][2] * point.m_Y + m_CamMat[2][2] * z; zr = Zeps(1 - m_CamPerspective * z); sincos(t, &dsin, &dcos); - T prcx = point.m_X / ctr.CachedCarHalfX(); - T prcy = y / ctr.CachedCarHalfY(); - T dist = VarFuncs::Hypot(prcx, prcy) * 10; - T scale = m_BlurCurve ? (Sqr(dist) / (4 * m_BlurCurve)) : T(1); - T dr = rand.Frand01() * (m_BlurCoef * scale) * z; + const T prcx = point.m_X / ctr.CachedCarHalfX(); + const T prcy = y / ctr.CachedCarHalfY(); + const T dist = VarFuncs::Hypot(prcx, prcy) * 10; + const T scale = m_BlurCurve ? (Sqr(dist) / (4 * m_BlurCurve)) : static_cast(1); + const T dr = rand.Frand01() * (m_BlurCoef * scale) * z; point.m_X = (point.m_X + dr * dcos) / zr; point.m_Y = (y + dr * dsin) / zr; point.m_Z -= m_CamZPos; @@ -1258,17 +1258,17 @@ public: void ProjectPitchYawDepthBlur(Point& point, QTIsaac& rand, const CarToRas& ctr) { T dsin, dcos; - T t = rand.Frand01() * M_2PI; + const T t = rand.Frand01() * M_2PI; T z = point.m_Z - m_CamZPos; - T x = m_CamMat[0][0] * point.m_X + m_CamMat[1][0] * point.m_Y; - T y = m_CamMat[0][1] * point.m_X + m_CamMat[1][1] * point.m_Y + m_CamMat[2][1] * z; + const T x = m_CamMat[0][0] * point.m_X + m_CamMat[1][0] * point.m_Y; + const T y = m_CamMat[0][1] * point.m_X + m_CamMat[1][1] * point.m_Y + m_CamMat[2][1] * z; z = m_CamMat[0][2] * point.m_X + m_CamMat[1][2] * point.m_Y + m_CamMat[2][2] * z; - T zr = Zeps(1 - m_CamPerspective * z); - T prcx = x / ctr.CachedCarHalfX(); - T prcy = y / ctr.CachedCarHalfY(); - T dist = VarFuncs::Hypot(prcx, prcy) * 10; - T scale = m_BlurCurve ? (Sqr(dist) / (4 * m_BlurCurve)) : T(1); - T dr = rand.Frand01() * (m_BlurCoef * scale) * z; + const T zr = Zeps(1 - m_CamPerspective * z); + const T prcx = x / ctr.CachedCarHalfX(); + const T prcy = y / ctr.CachedCarHalfY(); + const T dist = VarFuncs::Hypot(prcx, prcy) * 10; + const T scale = m_BlurCurve ? (Sqr(dist) / (4 * m_BlurCurve)) : static_cast(1); + const T dr = rand.Frand01() * (m_BlurCoef * scale) * z; sincos(t, &dsin, &dcos); point.m_X = (x + dr * dcos) / zr; point.m_Y = (y + dr * dsin) / zr; @@ -1282,10 +1282,10 @@ public: /// Ignored void ProjectPitchYaw(Point& point, QTIsaac& rand, const CarToRas& ctr) { - T z = point.m_Z - m_CamZPos; - T x = m_CamMat[0][0] * point.m_X + m_CamMat[1][0] * point.m_Y; - T y = m_CamMat[0][1] * point.m_X + m_CamMat[1][1] * point.m_Y + m_CamMat[2][1] * z; - T zr = Zeps(1 - m_CamPerspective * (m_CamMat[0][2] * point.m_X + m_CamMat[1][2] * point.m_Y + m_CamMat[2][2] * z)); + const T z = point.m_Z - m_CamZPos; + const T x = m_CamMat[0][0] * point.m_X + m_CamMat[1][0] * point.m_Y; + const T y = m_CamMat[0][1] * point.m_X + m_CamMat[1][1] * point.m_Y + m_CamMat[2][1] * z; + const T zr = Zeps(1 - m_CamPerspective * (m_CamMat[0][2] * point.m_X + m_CamMat[1][2] * point.m_Y + m_CamMat[2][2] * z)); point.m_X = x / zr; point.m_Y = y / zr; point.m_Z -= m_CamZPos; @@ -1428,7 +1428,7 @@ public: m_FinalRasW = 100; m_FinalRasH = 100; m_Supersample = 1; - m_SpatialFilterRadius = T(0.5); + m_SpatialFilterRadius = static_cast(0.5); m_Zoom = 0; m_ProjFunc = &EmberNs::Ember::ProjectNone; m_CamZPos = 0; @@ -1443,10 +1443,10 @@ public: m_SubBatchSize = 10240; m_RandPointRange = 1; m_FuseCount = 15; - m_MaxRadDE = T(9.0); + m_MaxRadDE = static_cast(9.0); m_MinRadDE = 0; - m_CurveDE = T(0.4); - m_GammaThresh = T(0.01); + m_CurveDE = static_cast(0.4); + m_GammaThresh = static_cast(0.01); m_TemporalSamples = 100; m_SpatialFilterType = eSpatialFilterType::GAUSSIAN_SPATIAL_FILTER; m_AffineInterp = eAffineInterp::AFFINE_INTERP_LOG; @@ -1702,7 +1702,7 @@ public: //Gamma threshold used in gamma correction during final accumulation. //Xml field: "gamma_threshold". - T m_GammaThresh = T(0.01); + T m_GammaThresh = static_cast(0.01); //Value to control saturation of some pixels in gamma correction during final accumulation. //Xml field: "highlight_power". @@ -1760,13 +1760,13 @@ public: //The shape of the curve that governs how quickly or slowly the filter drops off as it moves away from the center point. //Xml field: "estimator_curve". - T m_CurveDE = T(0.4); + T m_CurveDE = static_cast(0.4); //Spatial Filter. //The radius of the spatial filter used in final accumulation. //Xml field: "filter". - T m_SpatialFilterRadius = T(0.5); + T m_SpatialFilterRadius = static_cast(0.5); //The type of spatial filter used in final accumulation: //Gaussian, Hermite, Box, Triangle, Bell, Bspline, Lanczos3 @@ -1871,7 +1871,7 @@ private: for (size_t k = 0; k < size; k++) t += coefs[k] * embers[k].*m; - this->*m = size_t(std::rint(t)); + this->*m = static_cast(std::rint(t)); } /// @@ -1886,7 +1886,7 @@ private: template ::*m> void InterpXform(Xform* xform, size_t i, const Ember* embers, const vector& coefs, size_t size) { - xform->*m = T(0); + xform->*m = static_cast(0); for (size_t k = 0; k < size; k++) xform->*m += coefs[k] * embers[k].GetTotalXform(i)->*m; diff --git a/Source/Ember/EmberMotion.h b/Source/Ember/EmberMotion.h index e0ecd49..e5401a9 100644 --- a/Source/Ember/EmberMotion.h +++ b/Source/Ember/EmberMotion.h @@ -132,8 +132,8 @@ public: { CopyCont(m_MotionParams, other.m_MotionParams); m_MotionFunc = other.m_MotionFunc; - m_MotionFreq = T(other.m_MotionFreq); - m_MotionOffset = T(other.m_MotionOffset); + m_MotionFreq = static_cast(other.m_MotionFreq); + m_MotionOffset = static_cast(other.m_MotionOffset); return *this; } diff --git a/Source/Ember/Isaac.h b/Source/Ember/Isaac.h index f4ae104..7a1f736 100644 --- a/Source/Ember/Isaac.h +++ b/Source/Ember/Isaac.h @@ -224,7 +224,7 @@ public: #ifdef ISAAC_FLAM3_DEBUG return (Rand() & 0xfffffff) / (floatType)0xfffffff; #else - return Frand(floatType(0), floatType(1)); + return Frand(static_cast(0), static_cast(1)); #endif } diff --git a/Source/Ember/Palette.h b/Source/Ember/Palette.h index b2a5ca3..ca0e59e 100644 --- a/Source/Ember/Palette.h +++ b/Source/Ember/Palette.h @@ -397,7 +397,7 @@ public: /// A vector holding the color values vector MakeRgbPaletteBlock(size_t height) { - size_t width = Size(); + const auto width = Size(); vector v(height * width * 3); if (v.size() == (height * Size() * 3)) @@ -406,9 +406,9 @@ public: { for (size_t j = 0; j < width; j++) { - v[(width * 3 * i) + (j * 3)] = byte(m_Entries[j][0] * T(255));//Palettes are as [0..1], so convert to [0..255] here since it's for GUI display. - v[(width * 3 * i) + (j * 3) + 1] = byte(m_Entries[j][1] * T(255)); - v[(width * 3 * i) + (j * 3) + 2] = byte(m_Entries[j][2] * T(255)); + v[(width * 3 * i) + (j * 3)] = static_cast(m_Entries[j][0] * T(255));//Palettes are as [0..1], so convert to [0..255] here since it's for GUI display. + v[(width * 3 * i) + (j * 3) + 1] = static_cast(m_Entries[j][1] * T(255)); + v[(width * 3 * i) + (j * 3) + 2] = static_cast(m_Entries[j][2] * T(255)); } } } diff --git a/Source/Ember/Xform.h b/Source/Ember/Xform.h index e9391a3..d5401e7 100644 --- a/Source/Ember/Xform.h +++ b/Source/Ember/Xform.h @@ -148,22 +148,22 @@ public: { m_Affine = xform.m_Affine; m_Post = xform.m_Post; - m_Weight = T(xform.m_Weight); - m_ColorX = T(xform.m_ColorX); - m_ColorY = T(xform.m_ColorY); - m_DirectColor = T(xform.m_DirectColor); - m_ColorSpeed = T(xform.m_ColorSpeed); - m_Animate = T(xform.m_Animate); - m_Opacity = T(xform.m_Opacity); + m_Weight = static_cast(xform.m_Weight); + m_ColorX = static_cast(xform.m_ColorX); + m_ColorY = static_cast(xform.m_ColorY); + m_DirectColor = static_cast(xform.m_DirectColor); + m_ColorSpeed = static_cast(xform.m_ColorSpeed); + m_Animate = static_cast(xform.m_Animate); + m_Opacity = static_cast(xform.m_Opacity); CacheColorVals(); m_HasPre = xform.HasPre(); m_HasPost = xform.HasPost(); m_HasPreOrRegularVars = xform.PreVariationCount() > 0 || xform.VariationCount() > 0; - m_Wind[0] = T(xform.m_Wind[0]); - m_Wind[1] = T(xform.m_Wind[1]); - m_MotionFreq = T(xform.m_MotionFreq); + m_Wind[0] = static_cast(xform.m_Wind[0]); + m_Wind[1] = static_cast(xform.m_Wind[1]); + m_MotionFreq = static_cast(xform.m_MotionFreq); m_MotionFunc = xform.m_MotionFunc; - m_MotionOffset = T(xform.m_MotionOffset); + m_MotionOffset = static_cast(xform.m_MotionOffset); ClearAndDeleteVariations(); //Must manually add them via the AddVariation() function so that @@ -207,9 +207,9 @@ public: if (useDefaults) { m_Weight = 0; - m_ColorSpeed = T(0.5); + m_ColorSpeed = static_cast(0.5); m_Animate = 1; - m_ColorX = T(count & 1); + m_ColorX = static_cast(count & 1); m_ColorY = 0; m_DirectColor = 1; m_Opacity = 1; @@ -562,7 +562,7 @@ public: //m_ColorSpeedCache = m_ColorX * (1 - m_ColorSpeed) / 2;//Apo style. //m_OneMinusColorCache = (1 + m_ColorSpeed) / 2; m_ColorSpeedCache = m_ColorSpeed * m_ColorX;//Flam3 style. - m_OneMinusColorCache = T(1.0) - m_ColorSpeed; + m_OneMinusColorCache = static_cast(1) - m_ColorSpeed; } /// diff --git a/Source/Fractorium/GLWidget.cpp b/Source/Fractorium/GLWidget.cpp index 3d44c74..adf41a6 100755 --- a/Source/Fractorium/GLWidget.cpp +++ b/Source/Fractorium/GLWidget.cpp @@ -232,7 +232,7 @@ void GLWidget::DrawQuad() //Only draw if the dimensions match exactly. if (m_TexWidth == m_Fractorium->m_Controller->FinalRasW() && m_TexHeight == m_Fractorium->m_Controller->FinalRasH() && - ((m_TexWidth * m_TexHeight) == GLint(finalImage->size()))) + ((m_TexWidth * m_TexHeight) == static_cast(finalImage->size()))) { glMatrixMode(GL_PROJECTION); glPushMatrix(); @@ -284,7 +284,7 @@ void GLWidget::DrawQuad() if (finalImage &&//Make absolutely sure all image dimensions match when copying host side buffer to GL texture. !finalImage->empty() && - ((m_TexWidth * m_TexHeight) == GLint(finalImage->size())) && + ((m_TexWidth * m_TexHeight) == static_cast(finalImage->size())) && (finalImage->size() == renderer->FinalDimensions())) this->glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, m_TexWidth, m_TexHeight, GL_RGBA, GL_FLOAT, finalImage->data()); } @@ -1243,8 +1243,8 @@ bool GLWidget::Allocate(bool force) if (doIt) { - m_TexWidth = GLint(w); - m_TexHeight = GLint(h); + m_TexWidth = static_cast(w); + m_TexHeight = static_cast(h); glEnable(GL_TEXTURE_2D); glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); @@ -1275,8 +1275,8 @@ bool GLWidget::Allocate(bool force) if (doIt) { - m_TexWidth = GLint(w); - m_TexHeight = GLint(h); + m_TexWidth = static_cast(w); + m_TexHeight = static_cast(h); this->glEnable(GL_TEXTURE_2D); if (doResize) @@ -1335,7 +1335,7 @@ void GLWidget::SetViewport() { if (m_Init && (m_ViewWidth != m_TexWidth || m_ViewHeight != m_TexHeight)) { - this->glViewport(0, 0, GLint(m_TexWidth), GLint(m_TexHeight)); + this->glViewport(0, 0, static_cast(m_TexWidth), static_cast(m_TexHeight)); #ifdef USE_GLSL m_Viewport = glm::ivec4(0, 0, m_TexWidth, m_TexHeight); #endif