Skip to content

Instantly share code, notes, and snippets.

View iddev5's full-sized avatar
Making some projects...

Ayush iddev5

Making some projects...
View GitHub Profile
@valignatev
valignatev / xcb_opengl.c
Last active March 10, 2025 00:03
setting up and using modern OpenGL 4.5 core context on X11 with EGL and xcb, without xlib or glx
// This is @mmozeiko's libx + EGL example ported to xcb + EGL
// Original code: https://gist.github.com/mmozeiko/911347b5e3d998621295794e0ba334c4
// It requires EGL_EXT_platform_xcb extension, so if your system is circa the end of 2021 or newer you should be fine.
// Also, I don't know if it works on nvidia. LMK if you test it
// example how to set up OpenGL core context on X11 with EGL
// and use basic functionality of OpenGL 4.5 version
// to compile on Ubuntu first install following packages: build-essential libxcb1-dev libgl-dev libegl-dev, then run:
@andrewrk
andrewrk / build.zig
Created February 20, 2023 16:20
sprinkling a little zig into a C project to help with debugging
const std = @import("std");
pub fn build(b: *std.Build) void {
// Standard target options allows the person running `zig build` to choose
// what target to build for. Here we do not override the defaults, which
// means any target is allowed, and the default is native. Other options
// for restricting supported target set are available.
const target = b.standardTargetOptions(.{});
// Standard optimization options allow the person running `zig build` to select