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
pixelmager / gpuview.txt
Last active Jun 19, 2019
gpuview links
View gpuview.txt
http://nvidia.custhelp.com/app/answers/detail/a_id/3507/~/generating-an-event-trace-log-for-gpuview
https://graphics.stanford.edu/~mdfisher/GPUView.html
https://msdn.microsoft.com/en-us/library/windows/desktop/jj585574(v=vs.85).aspx
https://docs.microsoft.com/en-us/windows/desktop/direct2d/profiling-directx-applications
http://www.slideserve.com/libitha/using-gpuview-to-understand-your-directx-11-game-jon-story-developer-relations-engineer-amd
https://developer.nvidia.com/content/are-you-running-out-video-memory-detecting-video-memory-overcommitment-using-gpuview
https://knarkowicz.wordpress.com/2013/05/25/simple-gpuview-custom-event-markers/
https://software.intel.com/en-us/articles/removing-cpu-gpu-sync-stalls-in-galactic-civilizations-3
View gob.h
// My investigations on the C standard compliance of Gob and related techniques:
// https://gist.github.com/pervognsen/5249a405fe7d76ded1cf08ed50fa9176
#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
pervognsen / mu.cpp
Last active Jan 28, 2019
Mu as of the second stream
View mu.cpp
#include "mu.h"
#define _CRT_SECURE_NO_WARNINGS
#include <malloc.h>
#define _USE_MATH_DEFINES
#include <math.h>
#define _NO_CRT_STDIO_INLINE
#include <stdio.h>
#include <stdarg.h>
#define NO_STRICT
@dwilliamson
dwilliamson / Doc.md
Last active Feb 7, 2019
Minimal Code Generation for STL-like Containers
View Doc.md

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

THIS CODE WILL CONTAIN BUGS AND IS ONLY PRESENTED AS AN EXAMPLE.

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
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:
http://en.wikipedia.org/wiki/Types_of_mesh
http://en.wikipedia.org/wiki/Tetrahedron
http://en.wikipedia.org/wiki/Simplicial_complex
@ocornut
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: https://github.com/ocornut/Str )
// If you are interested in a FASTER implementation of sprintf functions, see stb_sprintf.h
// https://github.com/nothings/stb/blob/master/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
extern PFNGLBLENDCOLORPROC SDL_glBlendColor;
#define glBlendColor SDL_glBlendColor
extern PFNGLBLENDEQUATIONPROC SDL_glBlendEquation;
#define glBlendEquation SDL_glBlendEquation
extern PFNGLDRAWRANGEELEMENTSPROC SDL_glDrawRangeElements;
@dwilliamson
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.