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. [QOpenGLWidget] Add several textutes to line
Forum Updated to NodeBB v4.3 + New Features

[QOpenGLWidget] Add several textutes to line

Scheduled Pinned Locked Moved General and Desktop
2 Posts 1 Posters 547 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.
  • D Offline
    D Offline
    debian
    wrote on last edited by
    #1

    Hello!
    I have to output several network stream 1920x1080@25, I use qt-5.5.1.
    Now I use QGraphicsView, follow my code:
    // initilaize
    _scene = new QGraphicsScene;
    ui->image->setViewport(new QOpenGLWidget(this));
    ui->image->setViewportUpdateMode(QGraphicsView::SmartViewportUpdate);
    ui->image->setScene(_scene);
    // add image
    _image[pos] = _scene->addPixmap(QPixmap::fromImage(image));
    _image[pos]->setOffset(pos * 1920, 0);
    All work, but very slow.

    For improve performance I think use qopenglwidget, but I not understand how can I set texture position, I should output image in line. Or may be I can solve with QGraphicsScene?
    Can you help me?

    Thank you excuse my bad english.

    1 Reply Last reply
    0
    • D Offline
      D Offline
      debian
      wrote on last edited by
      #2

      Ok, I think QGLContext::drawTexture() can solve my problem.
      Unfortunately now I always have incorrect QOpenGLContext.
      glxinfo output:
      name of display: :0.1
      display: :0 screen: 0
      direct rendering: Yes
      server glx vendor string: NVIDIA Corporation
      server glx version string: 1.4
      ................
      OpenGL vendor string: NVIDIA Corporation
      OpenGL renderer string: GeForce GTX 650 Ti/PCIe/SSE2
      OpenGL version string: 4.4.0 NVIDIA 331.67
      OpOpenGL vendor string: NVIDIA Corporation
      OpenGL renderer string: GeForce GTX 650 Ti/PCIe/SSE2
      OpenGL version string: 4.4.0 NVIDIA 331.67
      OpenGL shading language version string: 4.40 NVIDIA via Cg compiler

      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