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(CMakeParseArguments) | |
function(create_test target_name) | |
set(options) | |
set(single_value_args FILE OUTPUT_DIR NAME) | |
set(multi_value_args LINK_LIBS) | |
cmake_parse_arguments( | |
create_test | |
"${options}" |
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
# Tested only on Mac OS X Mavericks with GLEW v1.10.0. | |
function(build_glew root_dir) | |
set(glew_lib GLEW) | |
if (APPLE) | |
set(glew_platform_libs "-framework AGL" "-framework OpenGL") | |
elseif (WIN32) | |
set(glew_lib glew32) | |
set(glew_platform_libs opengl32 glu32) | |
else() |
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
separate_arguments(FILES) | |
foreach (file ${FILES}) | |
if (LOAD_SHADERS_DYNAMICALLY) | |
file( | |
COPY ${SOURCE_DIR}/${file} | |
DESTINATION ${DESTINATION_DIR} | |
) | |
else() | |
set(filename ${SOURCE_DIR}/${file}) |
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
import inspect | |
import os | |
def get_module_name_from_path(path): | |
if not os.path.exists(path): | |
raise ValueError("The path '%s' is not a valid path." % path) | |
path = os.path.abspath(path) | |
full_names = [] |
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
int shorterSide = std::min(width, height); | |
GLfloat marginX = 1.0f + GLfloat(width - shorterSide) / (GLfloat)shorterSide; | |
GLfloat marginY = 1.0f + GLfloat(height - shorterSide) / (GLfloat)shorterSide; | |
glm::mat4 projection = glm::ortho(-marginX, marginX, -marginY, marginY); |
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 <algorithm> | |
#include <array> | |
#include <cmath> | |
#include <random> | |
#include <iomanip> | |
#include <ios> | |
#include <iostream> | |
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
#ifndef DISTANCE_H | |
#define DISTANCE_H | |
#include <algorithm> | |
#include <cassert> | |
#include <cmath> | |
#include <limits> | |
#include "floatingpointtraits.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 <iomanip> | |
#include <iostream> | |
#include <string> | |
#include <type_traits> | |
#include <utility> | |
template<typename T> | |
struct Functions; |
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
#ifndef MULTIDIMENSIONALARRAY_H | |
#define MULTIDIMENSIONALARRAY_H | |
#include <array> | |
#include <cstddef> | |
#include <type_traits> | |
// https://github.com/christophercrouzet/m3ta | |
#include <m3ta/nestedinitializerlists> | |
#include <m3ta/pass> |
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
#ifndef STRIDES_H | |
#define STRIDES_H | |
#include <cstddef> | |
#include <m3ta/concatenateintegersequences> | |
#include <m3ta/integersequence> | |
#include <m3ta/reverseintegersequence> | |
OlderNewer