Skip to content

Instantly share code, notes, and snippets.

View nilspin's full-sized avatar

Nilay nilspin

View GitHub Profile
@nilspin
nilspin / gist:19a0c305268282c42c88
Created December 12, 2014 16:02
general mesh building class
/*
Copyright (C) 2005 by Jorrit Tyberghein
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
Gluint VAO,VBO,indexBuffer;
glGenVertexArrays(1,&VAO);
glBindVertexArrays(VAO);
glGenBuffers(1,&VBO);
glBindBuffer(GL_ARRAY_BUFFER, VBO);//Use this vbo first
glBufferData(GL_ARRAY_BUFFER,.....); //move this data to GPU in this call
glVertexAttribPointer(/*point to data within VBO appropriately*/);
glEnableVertexAttribArray(/*handle of attrib in question from previous line*/);
@nilspin
nilspin / octree.h
Last active February 16, 2017 09:56
Simple Octree class
#ifndef OCTREE_H
#define OCTREE_H
#include <memory>
#include <iostream>
#include <cstdint>
#include <bitset>
#include <glm/glm.hpp>
using namespace glm;
@nilspin
nilspin / non-working-octree.h
Created February 16, 2017 13:29
octree implementation using only references, not working due to forward declaration.
#ifndef OCTREE_H
#define OCTREE_H
#include <memory>
#include <iostream>
#include <cstdint>
#include <bitset>
#include <vector>
#include <glm/glm.hpp>
# -*- mode: shell-script -*-
# Maintainer: Dylon Edwards <deltaecho at archlinux dot us>
pkgbase=open3d-git
pkgname=( {,python-}open3d-git )
pkgver=r2163.db3880ab
pkgrel=1
pkgdesc="A Modern Library for 3D Data Processing"
arch=('x86_64')
url="http://www.open3d.org"
//g++ -DBUILD_WITH_EASY_PROFILER -g jobSystem.cpp -pthread -leasy_profiler
#include<iostream>
#include<memory>
#include<vector>
#include<queue>
#include<thread>
#include<mutex>
#include<condition_variable>
#include<chrono>
#include<random>
@nilspin
nilspin / init.vim
Created October 30, 2019 16:27
Neovim config
let mapleader =","
if ! filereadable(expand('~/.config/nvim/autoload/plug.vim'))
echo "Downloading junegunn/vim-plug to manage plugins..."
silent !mkdir -p ~/.config/nvim/autoload/
silent !curl "https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim" > ~/.config/nvim/autoload/plug.vim
endif
call plug#begin('~/.config/nvim/plugged')
Plug 'tpope/vim-surround'
" Plugins will be downloaded under the specified directory.
"call plug#begin('~/.vim/plugged')
" Declare the list of plugins.
"Plug 'tpope/vim-sensible'
"Plug 'junegunn/seoul256.vim'
"let g:seoul256_background = 236
"colorscheme seoul256