Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • gtk gtk
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,606
    • Issues 1,606
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 219
    • Merge requests 219
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GNOMEGNOME
  • gtkgtk
  • Issues
  • #2616
Closed
Open
Issue created Apr 15, 2020 by Emmanuele Bassi@ebassi👣Maintainer

Add API to enable multisampling in GdkGLContext

A few people have been asking for this, both offline and online, in order to render with MSAA

When selecting features for a GL context, we need to add the appropriate attributes:

  • EGL_SAMPLE_BUFFERS and EGL_SAMPLES for EGL
  • GLX_SAMPLE_BUFFERS and GLX_SAMPLES for GLX
  • WGL_SAMPLE_BUFFERS_ARB and WGL_SAMPLES_ARB for Windows

Since those attributes take a parameter, we're going to need API in GdkGLContext similar to how we require a specific GL version; for instance:

void gdk_gl_context_set_multisampling (GdkGLContext *context,
                                       int           n_buffers);
int  gdk_gl_context_get_multisampling (GdkGLContext *context);

with:

  • n_buffers == 0 disabling multisampling explicitly
  • n_buffers > 0 enabling multisampling explicitly, with the given number of buffers
  • n_buffers < 0 using the implementation's default

If n_buffers > 0 we will add the [ SAMPLE_BUFFERS, 1 ] and [ SAMPLES, n_buffers ] attributes to the GL context creation.

Assignee
Assign to
Time tracking