Skip to content

Instantly share code, notes, and snippets.

David Gallardo galloscript

  • Barcelona
View GitHub Profile
@galloscript
galloscript / xvector.h
Last active Jan 11, 2020
xvector - pod aware container
View xvector.h
/*
* @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 Jan 26, 2019
C++ Raw Pool and Object Pool Implementation in my Sandbox Library
View FObjectPool.h
/*
* @file FObjectPool.h
* @author David Gallardo Moreno
*/
#ifndef __SBX_OBJECT_POOL_H__
#define __SBX_OBJECT_POOL_H__
#include <Library/FRawPool.h>
View gist:2331bd0a10a6e0aee62f86fd21efb892
#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
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
View 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
Frameless GLFW/ImGui window in MacOSX
View BorderlessWindowMacOSXFile.m
//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 Mar 4, 2020
Gradient color generator and editor for ImGui
View imgui_color_gradient.cpp
//
// imgui_color_gradient.cpp
// imgui extension
//
// Created by David Gallardo on 11/06/16.
#include "imgui_color_gradient.h"
#include "imgui_internal.h"
You can’t perform that action at this time.