You are not logged in.
I am running an example Sokol program: https://github.com/floooh/sokol-samples … ube-sapp.c
I get this error:
[sapp][panic][id:35] ../../sokol/sokol_app.h:10351:0:
LINUX_GLX_CREATE_CONTEXT_FAILED: Failed to create GL context via glXCreateContextAttribsARB
Is the graphics card too old to support this command?
inxi -Ga
Graphics:
Device-1: Intel 3rd Gen Core processor Graphics vendor: Apple driver: i915
v: kernel arch: Gen-7 process: Intel 22nm built: 2012-13 ports:
active: LVDS-1 empty: DP-1, DP-2, DP-3, HDMI-A-1, HDMI-A-2, HDMI-A-3,
VGA-1 bus-ID: 00:02.0 chip-ID: 8086:0166 class-ID: 0300
Device-2: Apple FaceTime HD Camera (Built-in) driver: uvcvideo type: USB
rev: 2.0 speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 1-1.1:3
chip-ID: 05ac:8509 class-ID: 0e02 serial: DJHC8806HWDH7FL0
Display: unspecified server: X.Org v: 21.1.14 driver: X:
loaded: modesetting alternate: fbdev,intel,vesa dri: crocus gpu: i915
display-ID: :0 screens: 1
Screen-1: 0 s-res: 1280x800 s-dpi: 96 s-size: 338x211mm (13.31x8.31")
s-diag: 398mm (15.69")
Monitor-1: LVDS-1 model: Apple Color LCD built: 2009 res: 1280x800 hz: 60
dpi: 114 gamma: 1.2 size: 286x179mm (11.26x7.05") diag: 337mm (13.3")
ratio: 16:10 modes: 1280x800
API: EGL v: 1.5 hw: drv: intel crocus platforms: device: 0 drv: crocus
device: 1 drv: swrast gbm: drv: crocus surfaceless: drv: crocus x11:
drv: crocus inactive: wayland
API: OpenGL v: 4.5 compat-v: 4.2 vendor: intel mesa v: 24.2.7-arch1.1
glx-v: 1.4 direct-render: yes renderer: Mesa Intel HD Graphics 4000 (IVB
GT2) device-ID: 8086:0166 memory: 1.46 GiB unified: yes
Last edited by subterrestrialspace (2024-12-03 07:58:14)
Offline
Does the mesa-amber package work better?
Para todos todo, para nosotros nada
Offline
mesa-amber returns the same error.
Offline
device: 1 drv: swrast gbm: drv: crocus surfaceless: drv: crocus x11:
Please post your Xorg log, https://wiki.archlinux.org/title/Xorg#General and the output of
glxinfo -B
Online
I figured out the issue. The library defaults to using GL 4.3, but the max core profile for the Intel 4000 is GL 4.2.
glxinfo -B
name of display: :0
display: :0 screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
Vendor: Intel Open Source Technology Center (0x8086)
Device: Mesa DRI Intel(R) HD Graphics 4000 (IVB GT2) (0x166)
Version: 21.3.9
Accelerated: yes
Video memory: 1536MB
Unified memory: yes
Preferred profile: core (0x1)
Max core profile version: 4.2
Max compat profile version: 3.0
Max GLES1 profile version: 1.1
Max GLES[23] profile version: 3.0
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) HD Graphics 4000 (IVB GT2)
OpenGL core profile version string: 4.2 (Core Profile) Mesa 21.3.9-arch.6 Amber
OpenGL core profile shading language version string: 4.20
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL version string: 3.0 Mesa 21.3.9-arch.6 Amber
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL ES profile version string: OpenGL ES 3.0 Mesa 21.3.9-arch.6 Amber
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00
In the sokol_main function I can set it to use an older version:
return (sapp_desc){
.gl_major_version = 4,
.gl_minor_version = 1,
.init_cb = init,
...
Offline
https://docs.mesa3d.org/envvars.html#en … N_OVERRIDE but the client likely will actually require 4.2 ?
Online