From be94f22d85cc44317352f5ab1a38527d1b713f1a Mon Sep 17 00:00:00 2001 From: parasti Date: Sat, 9 Apr 2011 19:49:17 +0000 Subject: [PATCH] Set GL pixel row alignment to be 1, not the default 4 Fixes a few problems with non-multiple of 4 wide textures or framebuffer, namely, skewed/corrupted textures in one case and memory corruption when taking screenshots in the other. git-svn-id: https://s.snth.net/svn/neverball/trunk@3570 78b8d119-cf0a-0410-b17c-f493084dd1d7 --- share/video.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/share/video.c b/share/video.c index 8d9b23a..b71cc95 100644 --- a/share/video.c +++ b/share/video.c @@ -121,6 +121,9 @@ int video_mode(int f, int w, int h) GL_SEPARATE_SPECULAR_COLOR); glLightModeli(GL_LIGHT_MODEL_LOCAL_VIEWER, 1); + glPixelStorei(GL_PACK_ALIGNMENT, 1); + glPixelStorei(GL_UNPACK_ALIGNMENT, 1); + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glDepthFunc(GL_LEQUAL); -- 1.7.9.5