mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-09-19 20:18:07 +00:00
opengl: explicitly set EGL_SURFACE_TYPE
Co-authored-by: Daniel Kinzler <kinzler.daniel@gmail.com>
This commit is contained in:
@@ -59,6 +59,11 @@ pub fn init(alloc: Allocator, opts: rendererpkg.Options) !OpenGL {
|
||||
// Choose a config. We need a config that is renderable with
|
||||
// OpenGL and a RGBA8 color buffer.
|
||||
const config = egl.Config.choose(display, &.{
|
||||
// EGL_SURFACE_TYPE defaults to EGL_WINDOW_BIT even though
|
||||
// we are rendering exclusively through surfaceless mode.
|
||||
// This is no problem on Mesa but we need to specify this
|
||||
// explicitly for proprietary Nvidia drivers.
|
||||
egl.c.EGL_SURFACE_TYPE, 0,
|
||||
egl.c.EGL_RENDERABLE_TYPE, egl.c.EGL_OPENGL_BIT,
|
||||
egl.c.EGL_RED_SIZE, 8,
|
||||
egl.c.EGL_GREEN_SIZE, 8,
|
||||
|
||||
Reference in New Issue
Block a user