Skip to content

Instantly share code, notes, and snippets.

View anderslanglands's full-sized avatar

Anders Langlands anderslanglands

View GitHub Profile
@justinian
justinian / profile.ps1
Last active November 17, 2022 23:44
Powershell init script to include vcvarsall.bat and set the window title.
# Load posh-git example profile
. '~\Documents\WindowsPowerShell\Modules\posh-git\profile.example.ps1'
$GitPromptSettings.EnableFileStatus = $false
$global:CurrentUser = [System.Security.Principal.WindowsIdentity]::GetCurrent()
function Prompt() {
Write-Host ("PS " + $(get-location) ) -nonewline -foregroundcolor Magenta
Write-VcsStatus
@allanmac
allanmac / assert_cuda.c
Last active July 23, 2024 09:06
A tiny example of CUDA + OpenGL interop with write-only surfaces and CUDA kernels. Uses GLFW+GLAD.
//
//
//
#include <stdlib.h>
#include <stdio.h>
//
//
//
@jamornsriwasansak
jamornsriwasansak / cuda-gltexture-interop.cu
Created September 19, 2017 20:27
CUDA and OpenGL texture interop. Quite painful to find a working solution.
//This software contains source code provided by NVIDIA Corporation.
#include "cuda_runtime.h"
#include "cuda_surface_types.h"
#include "surface_functions.h"
// must include in this order :(
#include "GL\glew.h"
#include "cuda_gl_interop.h"
#include "GLFW\glfw3.h"