aboutsummaryrefslogtreecommitdiff
path: root/source/Irrlicht/COpenGLDriver.cpp
diff options
context:
space:
mode:
authorHerman Semenov <GermanAizek@yandex.ru>2022-09-02 09:40:02 +0300
committerGitHub <noreply@github.com>2022-09-02 08:40:02 +0200
commitd733e03430cf623d722b2efe87872b68bb3d4d1f (patch)
tree768d2ab2ecfb92b40d3acda1f2057a2cf5ea8f2e /source/Irrlicht/COpenGLDriver.cpp
parentf0766c845f85c2f467843f20cf811c62cd2402c7 (diff)
downloadirrlicht-d733e03430cf623d722b2efe87872b68bb3d4d1f.tar.xz
Fix glHint parameter, type size and add more null checks (#130)
Diffstat (limited to 'source/Irrlicht/COpenGLDriver.cpp')
-rw-r--r--source/Irrlicht/COpenGLDriver.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/Irrlicht/COpenGLDriver.cpp b/source/Irrlicht/COpenGLDriver.cpp
index 40f68b4..c01ece6 100644
--- a/source/Irrlicht/COpenGLDriver.cpp
+++ b/source/Irrlicht/COpenGLDriver.cpp
@@ -2615,7 +2615,7 @@ void COpenGLDriver::setBasicRenderStates(const SMaterial& material, const SMater
if ((material.AntiAliasing & EAAM_QUALITY) == EAAM_QUALITY)
glHint(GL_MULTISAMPLE_FILTER_HINT_NV, GL_NICEST);
else
- glHint(GL_MULTISAMPLE_FILTER_HINT_NV, GL_NICEST);
+ glHint(GL_MULTISAMPLE_FILTER_HINT_NV, GL_FASTEST);
}
#endif
}
@@ -3805,10 +3805,10 @@ IImage* COpenGLDriver::createScreenShot(video::ECOLOR_FORMAT format, video::E_RE
glPixelStorei(GL_PACK_INVERT_MESA, GL_FALSE);
else
#endif
- if (pixels)
+ if (pixels && newImage)
{
// opengl images are horizontally flipped, so we have to fix that here.
- const s32 pitch=newImage->getPitch();
+ const s32 pitch = newImage->getPitch();
u8* p2 = pixels + (ScreenSize.Height - 1) * pitch;
u8* tmpBuffer = new u8[pitch];
for (u32 i=0; i < ScreenSize.Height; i += 2)