This file contains 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 <shader.hpp> | |
#include <iostream> | |
namespace Graphic { | |
Shader::Shader(const char *vs, const char *fs) { | |
vertexShaderID = glCreateShader(GL_VERTEX_SHADER); | |
glShaderSource(vertexShaderID, 1, &vs, NULL); | |
glCompileShader(vertexShaderID); |
This file contains 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
class CameraHandler { | |
public: | |
CameraHandler(); | |
Handler<CameraHandler> *getArcballHandler(); | |
void handleKey(Handler<CameraHandler> *, int, int); | |
void handleMouseButton(Handler<CameraHandler> *, int, int); | |
void handleMousePosition(Handler<CameraHandler> *, int, int); | |
void handleMouseWheel(Handler<CameraHandler> *, int); |
This file contains 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
// Let's make a server, Posix Style ! | |
#include <iostream> | |
#include <string.h> | |
#include <sys/time.h> | |
#include <sys/types.h> | |
#include <sys/socket.h> | |
#include <netinet/in.h> | |
#include <netdb.h> |
This file contains 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
microengine.o: microengine.h microengine.c | |
g++ -c microengine.C -I. -I../common | |
main.o: microengine.h main.c | |
g++ -c main.c -I. -I../common | |
all: main.o microengine.o | |
g++ main.o microengine.o -lGL -lglfw -lm -lpthread -o speedcoding |
This file contains 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
font.o: font.h font.c | |
g++ -c font.c -I. | |
main.o: main.c font.h | |
g++ -c main.c -I. | |
all: main.o font.o | |
g++ main.o font.o -o speedcoding -lexpat -lglfw -lSOIL | |
This file contains 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
/** | |
* Consumer generic class. | |
* Delegates the following services: | |
* - evaluate : returns if the run method must be exited. | |
* - process : process the item buffer. | |
* - compute : compute the internal state. | |
* The 'target' concept must implement the method: | |
* bool swap(I **, unsigned *); | |
* and the constructor : | |
* T::T(K *); |
This file contains 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
/* | |
* thread.h | |
* by Stoned Xander (2011) | |
*/ | |
#ifndef THREAD_H_ | |
#define THREAD_H_ | |
#ifdef WITH_PTHREAD | |
#include <pthread.h> |
This file contains 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 <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <vector> | |
typedef struct { | |
unsigned int x; | |
unsigned int y; | |
unsigned char direction; | |
} Coordinate; |
This file contains 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
#define DEVEL_BUFFER_SIZE 128 | |
/** | |
* Priority queue solver. | |
* <P> implements the concept of ordered list. | |
* <T> implements the concept of weighted solution. | |
* <E> is an environment object (should be reentrant). | |
*/ | |
template <class P, class T, typename E> void solve(T**seeds, | |
int seedSize, |