Skip to content

Instantly share code, notes, and snippets.

@lhog
lhog / COZ profiler by pako
Created Jan 30, 2022
COZ profiler by pako
View COZ profiler by pako
1st add: find_package(coz-profiler), add library dl, include coz.h and COZ_PROGRESS; in gameFrame()
2nd: compile with clang RelwithDebug or maybe gcc with some correct -gdwarf-4 settings
3rd: run: "coz run --- ./spring ./demos/2022xxx.sdfz"
4th: use /skip 10000 to profile synced code and maybe pause to profile drawing
From a6cfcbd9141146a5c84c38182a4cd6086608947e Mon Sep 17 00:00:00 2001
From: You Name <your@example.com>
View gist:3ebd67b0bfab358c25ce8b67a73fa98f
docker run -it verybadsoldier/springrts-build:latest dev -b BAR105-winres2 -p linux-64
./engine/105.1.1-739-ga241485\ bar/spring --isolation --write-dir /home/ak/Documents/Beyond\ All\ Reason --menu="rapid://byar-chobby:test"
@lhog
lhog / resolution_test.lua
Created Jan 9, 2022
resolution_test.lua
View resolution_test.lua
function widget:GetInfo()
return {
name = "Resolution Testing",
desc = "Debug changing fulscreen/borderless/resolution",
layer = 0,
enabled = true,
}
end
local windowType = {
@lhog
lhog / FixedPipelineState.cpp
Created Dec 9, 2021
FixedPipelineState backup
View FixedPipelineState.cpp
#include "FixedPipelineState.h"
#include <array>
#include <stdexcept>
#include "System/type2.h"
#include "System/float4.h"
#include "System/StringHash.h"
#include "Rendering/GlobalRendering.h"
View CUS_GL4.lua
function widget:GetInfo()
return {
name = "CUS GL4",
author = "ivand",
layer = 0,
enabled = true,
}
end
--inputs
View triangle
#include <glad/glad.h>
#include <GLFW/glfw3.h>
#include <vector>
#include <algorithm>
#include <iostream>
void framebuffer_size_callback(GLFWwindow* window, int width, int height);
void processInput(GLFWwindow *window);
View gfx_test_unitshape_instanceing_allmodels
function widget:GetInfo()
return {
name = "Unitshapes Rendering",
version = "v0.2",
desc = "Unitshapes Rendering",
author = "ivand",
date = "2020",
license = "GPL",
layer = 0,
enabled = false,
View test_unitshape_instancing.lua
function widget:GetInfo()
return {
name = "Test Unitshapes Rendering",
version = "v0.2",
desc = "Test Unitshapes Rendering",
author = "ivand",
date = "2020",
license = "GPL",
layer = 0,
enabled = true,
View map_grass
function widget:GetInfo()
return {
name = "Map Grass GL4",
version = "v0.001",
desc = "Instanced rendering of garbagegrass",
author = "Beherith",
date = "2021.04.12",
license = "CC-BY-NC-ND 4.0",
layer = -1000000000000,
View map_edge_extension2.lua
function widget:GetInfo()
return {
name = "Map Edge Extension",
version = "v0.7",
desc = "Draws a mirrored map next to the edges of the real map",
author = "ivand",
date = "2020",
license = "GPL",
layer = 0,