mirror of
https://github.com/IllusionMan1212/cudoku.git
synced 2026-10-24 02:12:25 +00:00
MSAA
This commit is contained in:
@@ -58,6 +58,7 @@ int init_x11(Display **display, Window *window, const char* title, int window_wi
|
|||||||
GLint visual_attributes[] = {
|
GLint visual_attributes[] = {
|
||||||
GLX_RENDER_TYPE, GLX_RGBA_BIT,
|
GLX_RENDER_TYPE, GLX_RGBA_BIT,
|
||||||
GLX_DOUBLEBUFFER, 1,
|
GLX_DOUBLEBUFFER, 1,
|
||||||
|
GLX_SAMPLES, 4, // MSAA
|
||||||
None
|
None
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -97,6 +98,7 @@ int init_x11(Display **display, Window *window, const char* title, int window_wi
|
|||||||
glad_glXSwapIntervalEXT(*display, *window, 1);
|
glad_glXSwapIntervalEXT(*display, *window, 1);
|
||||||
// we enable blending for text
|
// we enable blending for text
|
||||||
glEnable(GL_BLEND);
|
glEnable(GL_BLEND);
|
||||||
|
glEnable(GL_MULTISAMPLE);
|
||||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||||
glViewport(0, 0, win_attrs.width, win_attrs.height);
|
glViewport(0, 0, win_attrs.width, win_attrs.height);
|
||||||
resize_x11_window(*display, *window);
|
resize_x11_window(*display, *window);
|
||||||
|
|||||||
Reference in New Issue
Block a user