From: Marten Richter Date: Thu, 17 May 2012 10:30:23 +0000 (+0200) Subject: OpenGL ES does not need power of 2 texture, code removed X-Git-Url: https://git.vomp.tv/gitweb/?a=commitdiff_plain;h=de4f628137f575eec7648a0fc6407af87649c122;p=vompclient-marten.git OpenGL ES does not need power of 2 texture, code removed --- 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);