Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Setting 0,0 point in top left corner with qt and open gl
Qt 6.11 is out! See what's new in the release blog

Setting 0,0 point in top left corner with qt and open gl

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 414 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • AsvvA Offline
    AsvvA Offline
    Asvv
    wrote on last edited by Asvv
    #1

    Hello, i want to setting like the topic says:

    QMatrix4x4 mtrx;
    mtrx.ortho(0.0f,1024.0f,0.0f,768.0f,-1.0f,1.0f);
    m_program.setUniformValue(matrixUniform,mtrx);
    

    when i set X and Y of rectangle to 0,0 open gl drawing it in bottom left corner, as i said before i need point 0,0 in top left corner
    and

    QMatrix4x4 mtrx;
    mtrx.ortho(0.0f,1024.0f,768.0f,0.0f,-1.0f,1.0f);
    m_program.setUniformValue(matrixUniform,mtrx);
    

    this piece of code does not drawing anything in my QGLWidget in any position i set.
    Can someone tell me where is the problem, thanks in advance

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved