Skip to content
GitLab
    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
    Projects Groups Topics Snippets
  • Register
  • Sign in
  • Lazarus Lazarus
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 2,095
    • Issues 2,095
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 15
    • Merge requests 15
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • FPC
  • LazarusLazarus
  • LazarusLazarus
  • Issues
  • #34401
Closed
Open
Issue created Oct 07, 2018 by FPC Admin account@fpc_adminOwner

QT OpenGL support

Original Reporter info from Mantis: crlab @neurolabusc1
  • Reporter name: Chris Rorden

Description:

Zeljko recently added updated GLGtkGlxContext to support QT5 (instead of just QT4). However, the current GLGtkGlxContext has two limitations:

 1. It ignores the TOpenGLContext MajorVersion and MinorVersion, so it does not support more recent versions of OpenGL.
 2. It ignores TOpenGLContext.Multisampling, so lines look jagged.

I have attached a patch that fixes issue 1: this will allow QT to support modern versions of OpenGL. The code includes the compiler switch
{$DEFINE ModernGL}
if this line is commented out, you can see the previous behavior. Note that with this line commented out you will be limited to an old version of OpenGL (on my Linux QT4 setup, I am limited to OpenGL 3.0 without this patch), with the patch I get the most recent version supported by my hardware (4.6).

This patch does not appear to fix issue 2. I did copy much of the boilerplate from glgtkglxcontext.pas for supporting multisampling, and the new code does appear to identify a BestFBConfig that supports multisampling, but there must be some other adjustment to enable multisampling.

Steps to reproduce:

See attached project
 1.) Without this patch, when compiled to QT4/5 the caption reports "OpenGL 3.0" with the patch it supports the version supported by your system. Likewise, if you compile to GTK2 it uses the most recent version. Note that this project only uses OpenGL 3.0 so it runs with or without the patch, but projects that use more recent features only work with this patch.
 2.) Note that the lines look jagged when you compile to the QT widgetset, but look smooth when compiled to GTK2 (as the project uses multisampling).
 

Mantis conversion info:

  • Mantis ID: 34401
  • OS: Ubuntu
  • OS Build: 16.04
  • Build: 59267
  • Platform: Linux
  • Version: 1.9 (SVN)
  • Fixed in revision: 59285 (#8e4a89db),59293 (#83a10f8e)
Assignee
Assign to
Time tracking