Skip to content

Instantly share code, notes, and snippets.

#include <SFML/Graphics.hpp>
#include <iostream>
#include <memory>
#include <map>
#include <string>
#include <vector>
#include <array>
#include <random>
#include <stdexcept>
#include <cassert>
#include <iostream>
#include <iomanip>
#include <algorithm>
#include <limits>
class Game
{
enum class Player
{
none = '-',
#include <SFML/Window.hpp>
#include <iostream>
#include <random>
#include <array>
#include <gl/glut.h>
enum { MINE = 9 };
enum { TILE_SIZE = 20 };
enum { MARGIN = 40 };
#include <SDL2/SDL.h>
#include <GL/glew.h>
#include <string>
#include "Camera.hpp"
static void update_fps_counter(SDL_Window* window, const std::string& title) {
static std::string text_bar;
static Uint32 fps_lasttime = SDL_GetTicks();
static Uint32 fps_current;
static Uint32 fps_frames;
#include <iostream>
#include <memory>
#include <vector>
#include <algorithm>
#include <type_traits>
template< class ... > using void_t = void;
template< class T , class = void >
struct is_dereferenceable : std::false_type
#include <GL/glew.h>
#include <SFML/Window.hpp>
// Shader macro
#define GLSL(src) "#version 150 core\n" #src
// Vertex shader
const GLchar* vertexShaderSrc = GLSL(
in float inValue;
out float outValue;
@MORTAL2000
MORTAL2000 / GLSL-Noise.md
Created October 26, 2016 03:35 — forked from patriciogonzalezvivo/GLSL-Noise.md
GLSL Noise Algorithms

Generic 1,2,3 Noise

float rand(float n){return fract(sin(n) * 43758.5453123);}

float noise(float p){
	float fl = floor(p);
  float fc = fract(p);
	return mix(rand(fl), rand(fl + 1.0), fc);
}
#include <SFML/Graphics.hpp>
#include <GL/glew.h>
#include <iostream>
#include <cassert>
#include <stdexcept>
#include <cmath>
#define GLM_SWIZZLE
#include <glm/glm.hpp>
#include <glm/gtx/transform2.hpp>
#include <glm/gtc/type_ptr.hpp>
#include <SFML/Window.hpp>
#include <GL/glew.h>
#include <iostream>
#include <cassert>
#include <iostream>
#include <stdexcept>
#include <cmath>
void application()
{
#include <SFML/Graphics.hpp>
#include <iostream>
#include <iomanip>
#include <array>
#include <vector>
#include <utility>
#include <queue>
#include <tuple>
#include <set>
#include <algorithm>