mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-14 17:28:07 +00:00
render/opengl/linux/glx: publish chosen visual + colormap to os layer
This commit is contained in:
committed by
Ryan Fleury
parent
2e5a97ebf9
commit
eee1a64d14
@@ -50,12 +50,22 @@ r_ogl_os_init(CmdLine *cmdln)
|
|||||||
}
|
}
|
||||||
GLXFBConfig framebuffer_config = framebuffer_configs[0];
|
GLXFBConfig framebuffer_config = framebuffer_configs[0];
|
||||||
XFree(framebuffer_configs);
|
XFree(framebuffer_configs);
|
||||||
|
|
||||||
//- rjf: construct set-window-attributes
|
//- extract visual/colormap from chosen fbconfig, publish to os layer
|
||||||
XSetWindowAttributes set_window_attributes = {0};
|
{
|
||||||
set_window_attributes.background_pixmap = None;
|
XVisualInfo *vi = glXGetVisualFromFBConfig(lnx_wm_state->display, framebuffer_config);
|
||||||
set_window_attributes.border_pixel = 0;
|
if(vi == 0)
|
||||||
set_window_attributes.event_mask = StructureNotifyMask;
|
{
|
||||||
|
wm_graphical_message(1, str8_lit("Fatal Error"), str8_lit("Could not get visual from GLX framebuffer config."));
|
||||||
|
abort_self(1);
|
||||||
|
}
|
||||||
|
lnx_wm_state->window_visual = vi->visual;
|
||||||
|
lnx_wm_state->window_depth = vi->depth;
|
||||||
|
lnx_wm_state->window_colormap = XCreateColormap(lnx_wm_state->display,
|
||||||
|
XRootWindow(lnx_wm_state->display, vi->screen),
|
||||||
|
vi->visual, AllocNone);
|
||||||
|
XFree(vi);
|
||||||
|
}
|
||||||
|
|
||||||
//- rjf: construct context
|
//- rjf: construct context
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user