Skip to content

Instantly share code, notes, and snippets.

Nicolas Lelong rotoglup

Block or report user

Report or block rotoglup

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
pixelmager / gpuview.txt
Last active Jun 19, 2019
gpuview links
View gpuview.txt
View gob.h
// My investigations on the C standard compliance of Gob and related techniques:
#pragma once
#include <stdint.h>
#pragma pack(push, 8)
#if __cplusplus >= 201103L || (__cplusplus && _MSC_VER >= 1900)
View fibers.c
#include <stdio.h>
#include <errno.h>
#include <stdlib.h>
#include <stdint.h>
#include <assert.h>
#include <string.h>
#define streq(a, b) (!strcmp((a), (b)))
#ifndef __USE_GNU
#define __USE_GNU
pervognsen / mu.cpp
Last active Jan 28, 2019
Mu as of the second stream
View mu.cpp
#include "mu.h"
#include <malloc.h>
#include <math.h>
#include <stdio.h>
#include <stdarg.h>
#define NO_STRICT
dwilliamson /
Last active Feb 7, 2019
Minimal Code Generation for STL-like Containers

This is my little Christmas-break experiment trying to (among other things) reduce the amount of generated code for containers.


The C++ STL is still an undesirable library for many reasons I have extolled in the past. But it's also a good library. Demons lie in this here debate and I have no interest in revisiting it right now.

The goals that I have achieved with this approach are:

aras-p / GraphicsCapsGLES.h
Created Apr 26, 2015
Part of runtime flags that kick in different things on our GL implementaton
View GraphicsCapsGLES.h
int maxAASamplesConst; // gles2 img/apple/ext extensions all use different constants (facepalm)
int halfConst; // gles2 and gles3 have different constants for half float type
int texSRGBAConst; // gles2 (without 'internal format' ext) and gles3 have different constants for SRGB RGBA texture type
int texSRGBConst; // gles2 (without 'internal format' ext) and gles3 have different constants for SRGB RGB texture type
int etcFormatConst; // gles2/gles3 have different standard etc formats
bool isPvrGpu;
bool isMaliGpu;
bool isAdrenoGpu;
bool isTegraGpu;
View Tetrahedra-based Volumetric Meshes.txt
Below I collected relevant links and papers more or less pertaining to the subject of tetrahedral meshes.
It's an ever-growing list.
Relevant links:
ocornut / printf_tips.cpp
Last active Feb 7, 2019
C/C++ tips for using printf-style functions
View printf_tips.cpp
// C/C++ tips for using printf-style functions
// Lots of manipulation can be expressed simply and fast with printf-style formatting
// Also helps reducing the number of temporaries, memory allocations or copies
// ( If you are looking for a simple C++ string class that is printf-friendly and not heap-abusive,
// I've been using this one: )
// If you are interested in a FASTER implementation of sprintf functions, see stb_sprintf.h
// How to concatenate non-zero terminated strings
View SDL_opengl_load.h
#ifndef _SDL_opengl_load_h
#define _SDL_opengl_load_h
#define glBlendColor SDL_glBlendColor
#define glBlendEquation SDL_glBlendEquation
dwilliamson / SH.h
Last active Oct 28, 2018
Shared SH Library for C++/HLSL/OpenCL/CUDA using pycgen to generate/document optimal transforms
View SH.h
// References
// [1] Sloan, P.-P., Luna, B., and Snyder, J. 2005.
// Local, deformable precomputedradiance transfer.
// ACM Trans. Graph. 24, 3, 1216–1223
// [2] Stupid Spherical Harmonics (SH) Tricks
// Peter-Pike Sloan, Microsoft Corporation
You can’t perform that action at this time.