Skip to content

Instantly share code, notes, and snippets.

View galloscript's full-sized avatar

David Gallardo galloscript

View GitHub Profile
@galloscript
galloscript / xvector.h
Last active January 11, 2020 21:57
xvector - pod aware container
/*
* @file xvector.h
* @author David Gallardo Moreno
* @brief POD aware container, uses if constexpr to evaluate the code path to copy/move/destroy the xvector data.
*/
#pragma once
#include <stdint.h>
#include <stdlib.h>
@galloscript
galloscript / FObjectPool.h
Last active January 26, 2019 10:48
C++ Raw Pool and Object Pool Implementation in my Sandbox Library
/*
* @file FObjectPool.h
* @author David Gallardo Moreno
*/
#ifndef __SBX_OBJECT_POOL_H__
#define __SBX_OBJECT_POOL_H__
#include <Library/FRawPool.h>
#include "types.h"
#include "opsys.h"
#include "texture.h"
#include "opdata.h"
#include "rtlib.h"
#include "math3d_2.h"
// for text stuff
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
@galloscript
galloscript / builder.js
Last active May 8, 2017 20:40
WIP Builder script to compile and link c++ projects without dependencies with IDE project. Can be launched from an IDE with custom build tool target, but all the dependencies must be handled by the target.js file and builder.js
/*
@file builder.js (WIP)
@author David Gallardo @galloscript
@brief Builder script to compile and link c++ projects without dependencies with IDE project.
Can be launched from an IDE with custom build tool target, but all the dependencies
must be handled by the target.js file and builder.js
*/
/*
Example emtest.target.js
@galloscript
galloscript / BorderlessWindowMacOSXFile.m
Last active May 17, 2020 04:22
Frameless GLFW/ImGui window in MacOSX
//Get the native window
NSWindow* cocoaWindow = glfwGetCocoaWindow(glfwWindowPtr);
NSUInteger lWindowStyle = NSWindowStyleMaskTitled |
NSWindowStyleMaskClosable |
NSWindowStyleMaskMiniaturizable |
NSWindowStyleMaskResizable |
NSWindowStyleMaskUnifiedTitleAndToolbar |
NSWindowStyleMaskFullSizeContentView;
//Set the style mask
@galloscript
galloscript / imgui_color_gradient.cpp
Last active July 12, 2024 11:34
Gradient color generator and editor for ImGui
//
// imgui_color_gradient.cpp
// imgui extension
//
// Created by David Gallardo on 11/06/16.
#include "imgui_color_gradient.h"
#include "imgui_internal.h"