From 4e7ddbbe85ee36b4b8ccc7c11b55122bfb89cc93 Mon Sep 17 00:00:00 2001 From: Niels Martin Hansen Date: Wed, 28 Mar 2007 15:17:47 +0000 Subject: [PATCH] Fix for non-pixelshader video rendering Originally committed to SVN as r961. --- aegisub/video_context.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aegisub/video_context.cpp b/aegisub/video_context.cpp index 8dc224b6f..effb631f8 100644 --- a/aegisub/video_context.cpp +++ b/aegisub/video_context.cpp @@ -474,7 +474,7 @@ GLuint VideoContext::GetFrameAsTexture(int n) { } // Load texture data - glTexSubImage2D(GL_TEXTURE_2D,0,0,0,frame.pitch[0],frame.h,format,GL_UNSIGNED_BYTE,frame.data[0]); + glTexSubImage2D(GL_TEXTURE_2D,0,0,0,frame.pitch[0]/frame.GetBpp(0),frame.h,format,GL_UNSIGNED_BYTE,frame.data[0]); if (glGetError() != 0) throw _T("Error uploading primary plane"); // UV planes for YV12