From de4f628137f575eec7648a0fc6407af87649c122 Mon Sep 17 00:00:00 2001 From: Marten Richter Date: Thu, 17 May 2012 12:30:23 +0200 Subject: [PATCH] OpenGL ES does not need power of 2 texture, code removed --- osdopengl.cc | 4 ++-- surfaceopengl.cc | 11 +++-------- 2 files changed, 5 insertions(+), 10 deletions(-) mode change 100644 => 100755 osdopengl.cc mode change 100644 => 100755 surfaceopengl.cc diff --git a/osdopengl.cc b/osdopengl.cc old mode 100644 new mode 100755 index 27008d0..b03d8e7 --- a/osdopengl.cc +++ b/osdopengl.cc @@ -254,8 +254,8 @@ GLuint OsdOpenGL::CreateShader(const GLchar * source, GLenum type) void OsdOpenGL::InitVertexBuffer(float scalex,float scaley) { Video* video=Video::getInstance(); - float texx=((float)video->getScreenWidth())/1024.f; - float texy=((float)video->getScreenHeight())/1024.f; + float texx=1.f;//((float)video->getScreenWidth())/1024.f; + float texy=1.f;((float)video->getScreenHeight())/1024.f; OSDCOLOR osdcolor={1.f,1.f,1.f,1.f}; // osdvertices[0].c=osdcolor; diff --git a/surfaceopengl.cc b/surfaceopengl.cc old mode 100644 new mode 100755 index 034b782..ad5fbfe --- a/surfaceopengl.cc +++ b/surfaceopengl.cc @@ -62,14 +62,9 @@ int SurfaceOpenGL::create(UINT width, UINT height) if (this == screen) { // We do not need locking here, since the osd calls this - sheight = 64; - swidth = 64; - while (sheight < height) { // should be a power of 2 - sheight *= 2; - } - while (swidth < width) { // should be a power of 2 - swidth *= 2; - } + + swidth=width; + sheight=height; glGenTextures(1, &gltexture); glBindTexture(GL_TEXTURE_2D, gltexture); -- 2.39.5