Skip to content

Instantly share code, notes, and snippets.

View IwakuraRein's full-sized avatar

Lain IwakuraRein

View GitHub Profile
@ConsciousMachines
ConsciousMachines / Main.cpp
Last active October 5, 2025 16:14
basic ImGui + CUDA + OpenGL
// based on https://gist.github.com/kamino410/09df4ecdf37b03cbd05752a7b2e52d3a
// this adds ImGui to an application with CUDA and OpenGL. the thing is, once you use CUDA, ImGui renders very strangely.
// after 9 hours of debugging I found that putting glBindBuffer before and after the draw call fixes this!
//glBindBuffer(GL_PIXEL_UNPACK_BUFFER, pbo); // THE MAGIC LINE #1
//glDrawPixels(WIDTH, HEIGHT, GL_RGBA, GL_UNSIGNED_BYTE, 0);
//glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0); // THE MAGIC LINE #2
#include "imgui/imgui.h" // version 1.78 and 1.60
#include "imgui/imgui_impl_glfw.h"
@edjdavid
edjdavid / pp_motion_interp.md
Created August 13, 2020 12:39
PotPlayer Motion Interpolation