Skip to content

Instantly share code, notes, and snippets.

@progschj
progschj / instruction_table.h
Created January 20, 2014 10:19
WiP x64 instruction encoding
typedef enum mnemonic_enum_t {
UNKNOWN=0,
ADC=1,
ADD,
AND,
BSF,
BSR,
BSWAP,
BT,
BTC,
#include "glterm.h"
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <GL/glew.h>
#include <SDL2/SDL.h>
#include <png.h>
#include "glterm.h"
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <GL/glew.h>
#include <SDL2/SDL.h>
#include <png.h>
#ifndef FIXED_H
#define FIXED_H
typedef int64_t fixed_t;
static const fixed_t fixed_precision = 20ll;
static const fixed_t fixed_one = 1ll<<fixed_precision;
static const fixed_t fixed_half = 1ll<<(fixed_precision-1);
static const double fixed_factor = fixed_one;
static const double fixed_inverse_factor = 1.0/fixed_factor;
/* OpenGL example code - Compute Shader N-body
*
* N-body simulation with compute shaders.
*
* Autor: Jakob Progsch
*/
#include <GLXW/glxw.h>
#include <GLFW/glfw3.h>
#ifndef MATH_UTIL_H
#define MATH_UTIL_H
#include <math.h>
#include <float.h>
static const float PI = 3.14159265358979323846f;
static inline float dot3(const float *a, const float *b) {
return a[0]*b[0] + a[1]*b[1] + a[2]*b[2];

EXT_INSTANCE_ARRAY_MATRIX

Introduces the "arrayMatrix" instance subtype.

Parameters:

Name Type Description
group GROUP Group to be instanced, required
array.transform ARRAY1D of FLOAT32_MAT4 Array of transforms, required
array.id ARRAY1D of UINT32 optional array of ids