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
//this repro mangles the value of v.y in the pass_and_log function | |
//prints 0.20000 0.00000 | |
//should print 0.20000 0.10000 | |
//compiler: Microsoft (R) C/C++ Optimizing Compiler Version 19.29.30139 for x64 (VS 2019 latest as of 2/1/22) | |
//compile command: cl /O2 /Ob1 repro.cpp | |
#include <cstdio> | |
struct vec2 { float x; float y; }; |
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
#pragma once | |
#include <initializer_list> | |
template<class T> | |
class DArray | |
{ | |
public: | |
size_t size = 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
cmake_minimum_required(VERSION 3.17) | |
include(FetchContent) | |
project(GnomeTower | |
VERSION 0.0.1 | |
DESCRIPTION "Lead your gnome civilization to the skies" | |
LANGUAGES CXX | |
) | |
# |
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
//generated via stb_voxel_render.h stbvox_get_vertex_shader() using the following #defines: | |
// | |
//#define STBVOX_CONFIG_MODE 0 | |
//#define STBVOX_CONFIG_DISABLE_TEX2 | |
// | |
#version 150 | |
in uvec4 attr_face; | |
in uint attr_vertex; | |
uniform vec3 transform[3]; | |
uniform vec4 camera_pos; |
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
/* | |
This file attempts to use stb_voxel_render.h to minimally create a voxel mesh. | |
The resuting mesh should be a simple voxel sphere w/ 32 unit diameter. | |
(This will serve as the testing ground for implementing GL_EXT_multiview into | |
stb_voxel_render.h, whose progress can be found on the voxel_vr branch of this fork: | |
https://github.com/Phildo/stb/tree/voxel_vr ) | |
*/ | |
#define STBVOX_CONFIG_MODE 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
/* | |
This is an example of modelling someone's lottery ticket collection. | |
I find this an interesting/worthwhile problem domain as the constraints are easy to understand, | |
but detials in both design and implementation prove more difficult than intuition might suggest. | |
Also, it is a sufficiently isolated to tend well towards existing as a TDD kata. | |
The constraints are as follows: | |
1. A lottery ticket takes the form of 6 balls. The first 5 range from 1-59, and the final ranges from 1-35. |