1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-07-04 10:03:36 +00:00

Set texture size for TexrectDrawer shader. It is necessary for GLES2.

This commit is contained in:
Sergey Lipskiy 2017-02-13 16:24:28 +07:00
parent 276018a2fc
commit 42bad7958a
2 changed files with 3 additions and 0 deletions

View File

@ -563,6 +563,8 @@ namespace glsl {
void setTextureSize(u32 _width, u32 _height) override
{
if (m_textureSizeLoc < 0)
return;
m_useProgram->useProgram(m_program);
glUniform2f(m_textureSizeLoc, (GLfloat)_width, (GLfloat)_height);
gDP.changed |= CHANGED_COMBINE;

View File

@ -79,6 +79,7 @@ void TexrectDrawer::init()
m_programTex.reset(gfxContext.createTexrectDrawerDrawShader());
m_programClear.reset(gfxContext.createTexrectDrawerClearShader());
m_programTex->setTextureSize(m_pTexture->realWidth, m_pTexture->realHeight);
m_vecRectCoords.reserve(256);
}