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:
parent
276018a2fc
commit
42bad7958a
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user