fix android view resize on keyboard, also allow all device orientations
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#include "log.h"
|
||||
#include "node_viewport.h"
|
||||
#include "shader.h"
|
||||
#include "app.h"
|
||||
|
||||
void NodeViewport::draw()
|
||||
{
|
||||
@@ -17,7 +18,7 @@ void NodeViewport::draw()
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
auto box = m_clip * root()->m_zoom;
|
||||
glm::ivec4 c = (glm::ivec4)glm::vec4(box.x, (int)(vp[3] - box.y - box.w), box.z, box.w);
|
||||
glViewport(c.x, c.y, c.z, c.w);
|
||||
glViewport(c.x + App::I.off_x, c.y + App::I.off_y, c.z, c.w);
|
||||
TextureManager::get(m_tex_id).bind();
|
||||
m_sampler->bind(0);
|
||||
glEnable(GL_BLEND);
|
||||
|
||||
Reference in New Issue
Block a user