This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
include <iostream> | |
#include <thread> | |
#include <mutex> | |
#include <condition_variable> | |
std::mutex mtx; | |
std::mutex mtx2; | |
std::condition_variable cv; | |
std::condition_variable cv2; | |
bool threadsRunning = false; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifdef GL_ES | |
precision mediump float; | |
#endif | |
#extension GL_EXT_gpu_shader4 : enable | |
uniform sampler2D u_texture; | |
uniform vec2 g_Resolution; | |
varying vec2 v_texCoords; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <GL/glew.h> | |
#include <GLFW/glfw3.h> | |
#include <vector> | |
#include <cmath> | |
#include <cstdio> | |
#include <limits> | |
#include <chrono> | |
#include <thread> | |
#include <mutex> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <immintrin.h> | |
#include <intrin.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
union Mat44 { | |
float m[4][4]; | |
__m128 row[4]; | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
TreeGen for 3DSMax written by Ryan James Smith aka "Virtuosic" on polycount forums. | |
This is creative commons, edit and redistribute as you please, just remember to give original credit | |
also, if you add some cool stuff, email me at [email protected] and let me know what you did so | |
i can be jealous i didn't think of it... Oh, and if you add something cool, sign your name below mine :D | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#version 330 core | |
#extension GL_ARB_shading_language_420pack: require | |
#extension GL_ARB_separate_shader_objects: require | |
#extension GL_ARB_shader_image_load_store: require | |
#extension GL_ARB_bindless_texture: require | |
#define ENABLE_BINDLESS_TEX | |
#define FRAGMENT_SHADER 1 | |
#define ps_main main | |
#define PS_FST 0 | |
#define PS_WMS 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
typedef struct{ | |
ALuint ID; | |
stb_vorbis* stream; | |
stb_vorbis_info info; | |
ALuint buffers[2]; | |
ALuint source; | |
ALenum format; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const int TICKS_PER_SECOND = 25; | |
const int MS_PER_TICK = 1000 / TICKS_PER_SECOND; | |
const int MAX_SKIPPED_FRAMES = 5; | |
void EngineInstance::run() { | |
this->last_tick_time = getTime() - TICKS_PER_SECOND; | |
while (this->shouldKeepRunning()) { | |
this->checkForUpdate(); |
NewerOlder