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. Unable to clear screen using glClear
Forum Updated to NodeBB v4.3 + New Features

Unable to clear screen using glClear

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 1.0k Views 1 Watching
  • 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.
  • Q Offline
    Q Offline
    QuickSpan
    wrote on last edited by
    #1

    I have an opengl widget based on QGLWidget inside the mainwindow of an app which I'm using to draw some wireframe models. The models draw just fine, except that the call to glClear is being ignored. I'm stuck with a black background in the widget and a mess of lines resulting from the frame buffer not being cleared. I've placed the glClear call in paintGL, initializeGL, and in my drawing routines. It has no effect anywhere. PaintGL is being called on mouse move events. I'm using the Qt 4.8.5 libraries on a Linux system. Any idea why it won't clear the widget?

    BTW, the call I'm using is glClear(GL_COLOR_BUFFER_BIT || GL_DEPTH_BUFFER_BIT);

    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