Orthodox C++ (sometimes referred as C+) is minimal subset of C++ that improves C, but avoids all unnecessary things from so called Modern C++. It's exactly opposite of what Modern C++ suppose to be.
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
static void gi_on_gpu(u8* in_bitmap, int w, int h) { | |
#define num_cascades 7 | |
static bool initialized; | |
static gpu_bindgroup_t texture_bindgroup[2]; | |
static gpu_bindgroup_t cascade_uniform_bindgroup[num_cascades]; | |
static gpu_bindgroup_t render_uniform_bindgroup; | |
static gpu_buffer_t vertex_buffer; | |
static gpu_buffer_t uniform_buffer; | |
static gpu_pipeline_t pipeline; |
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
--[[ | |
Creates a circle out of Beams. | |
You can let it use a default Beam object, but you probably want to pass it | |
your own via the BeamObject parameter. | |
local BeamCircle, Attachments, Beams = DrawBeamCircle({ | |
[REQUIRED] | |
CFrame = CFrame of center of circle, | |
Radius = Radius of circle, |
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
// | |
struct TerminalCell | |
{ | |
// cell index into GlyphTexture, should be two 16-bit (x,y) values packed: "x | (y << 16)" | |
uint GlyphIndex; | |
// 0xAABBGGRR encoded colors, nonzero alpha for Foreground indicates to render colored-glyph | |
// which means use RGB values from GlyphTexture directly as output, not as ClearType blending weights | |
uint Foreground; |
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 <SDL.h> | |
#include <cstdio> | |
#include <iostream> | |
#include <string> | |
#include <cstring> | |
#include <sstream> | |
#include <ctime> | |
const int MAX_RECORDING_DEVICES = 10; |
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
local LerpCIELUV do | |
-- Combines two colors in CIELUV space. | |
-- function<function<Color3 result>(float t)>(Color3 fromColor, Color3 toColor) | |
-- https://www.w3.org/Graphics/Color/srgb | |
local clamp = math.clamp | |
local C3 = Color3.new | |
local black = C3(0, 0, 0) |
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 "hemicube.h" | |
#define PACK_HEMICUBES 1 | |
static void get_hemicube_face_normal(int index, Vector3 *forward, Vector3 *left, Vector3 *up) { | |
// Unwrapped hemicube with positive-Z in the middle. | |
switch (index) { | |
case 0: *forward = Vector3(+1, 0, 0); *left = Vector3( 0, 1, 0); break; |