fix combobox issue, pad scissor by 1px
This commit is contained in:
@@ -63,6 +63,14 @@ void NodeCanvas::clear_context()
|
||||
|
||||
void NodeCanvas::draw()
|
||||
{
|
||||
// sanity checks
|
||||
float zoom = root()->m_zoom;
|
||||
if (zoom == 0.f)
|
||||
zoom = 1.f;
|
||||
auto box = m_clip * zoom;
|
||||
if (box.z == 0 || box.w == 0)
|
||||
return;
|
||||
|
||||
GLint vp[4];
|
||||
GLfloat cc[4];
|
||||
glGetIntegerv(GL_VIEWPORT, vp);
|
||||
@@ -73,8 +81,6 @@ void NodeCanvas::draw()
|
||||
|
||||
glDisable(GL_SCISSOR_TEST);
|
||||
|
||||
float zoom = root()->m_zoom;
|
||||
auto box = m_clip * zoom;
|
||||
glm::ivec4 c = (glm::ivec4)glm::vec4(box.x, (int)(vp[3] - box.y - box.w), box.z, box.w);
|
||||
|
||||
//m_canvas->m_cam_rot = m_pan * 0.003f;
|
||||
|
||||
Reference in New Issue
Block a user