Skip to content

Instantly share code, notes, and snippets.

@sphaero
sphaero / Nodes.cpp
Created December 12, 2018 15:07 — forked from ChemistAion/nodes.cpp
Second prototype of standalone node graph editor for ImGui
#include "Nodes.h"
namespace ImGui
{
template<int n>
struct BezierWeights
{
constexpr BezierWeights() : x_(), y_(), z_(), w_()
{
for (int i = 1; i <= n; ++i)
@spacechase0
spacechase0 / NodeGraph.cpp
Last active October 30, 2022 09:53
ImGui node graph
#include <any>
#include <cmath>
#include <imgui.h>
#include <imgui_internal.h>
#include "NodeGraph.hpp"
namespace
{
@ChemistAion
ChemistAion / nodes.cpp
Last active January 12, 2024 20:37
Second prototype of standalone node graph editor for ImGui
#include "nodes.h"
namespace ImGui
{
void ImGuiNodes::UpdateCanvasGeometry(ImDrawList* draw_list)
{
const ImGuiIO& io = ImGui::GetIO();
mouse_ = ImGui::GetMousePos();
@ChemistAion
ChemistAion / Nodes.cpp
Created January 25, 2018 15:02
Prototype of standalone node graph editor for ImGui
// Prototype of standalone node graph editor for ImGui
// Thread: https://github.com/ocornut/imgui/issues/306
//
// This is based on code by:
// @emoon https://gist.github.com/emoon/b8ff4b4ce4f1b43e79f2
// @ocornut https://gist.github.com/ocornut/7e9b3ec566a333d725d4
// @flix01 https://github.com/Flix01/imgui/blob/b248df2df98af13d4b7dbb70c92430afc47a038a/addons/imguinodegrapheditor/imguinodegrapheditor.cpp#L432
#include "Nodes.h"
@Vild
Vild / space.glsl
Last active September 19, 2019 04:21
Space GLSL shader - Shader Editor
// By Dan Printzell <github vild io>
// License: MPLv2
#ifdef GL_FRAGMENT_PRECISION_HIGH
precision highp float;
#else
precision mediump float;
#endif
uniform vec2 resolution;
uniform float time;
@dougbinks
dougbinks / ImGuiUtils.h
Created November 18, 2017 13:53
ImGuiUtils.h with TextURL
#pragma once
#include "RuntimeImGui.h"
#include "RuntimeInclude.h"
RUNTIME_MODIFIABLE_INCLUDE;
#include "IconsFontAwesome.h" // from https://github.com/juliettef/IconFontCppHeaders
#include "PlatformUtils.h"
namespace ImGui
@fulezi
fulezi / ImGuiHandler.cpp
Last active March 25, 2024 02:47 — forked from hb3p8/ImGuiHandler.cpp
ImGui OpenSceneGraph wrapper
#include "ImGuiHandler.hpp"
#include "imgui/imgui.h"
#include <iostream>
#include <osgUtil/GLObjectsVisitor>
#include <osgUtil/SceneView>
#include <osgUtil/UpdateVisitor>
@bkaradzic
bkaradzic / why_i_think_immediate_mode_gui_is_way_to_go_for_gamedev_tools.md
Last active April 5, 2024 05:40
Why I think Immediate Mode GUI is way to go for GameDev tools

Why I think Immediate Mode GUI is way to go for GameDev tools

Prerequisites

Before you continue, if you don't know what IMGUI is don't bother reading this post, just ignore it, don't write anything in comments section, etc. If you're curious about IMGUI see bottom of this post, otherwise continue whatever you were doing, this post it's not for you. Thanks!

If you know what IMGUI is, for context read following presentations and blog posts:

  • Insomniac’s Web Tools Postmortem
@Hebali
Hebali / GlslSobel.frag
Created January 12, 2017 17:25
GLSL Fragment Shader: Sobel Edge Detection
// Sobel Edge Detection Filter
// GLSL Fragment Shader
// Implementation by Patrick Hebron
uniform sampler2D texture;
uniform float width;
uniform float height;
void make_kernel(inout vec4 n[9], sampler2D tex, vec2 coord)
{
@obonyojimmy
obonyojimmy / keyboardcapture.go
Last active February 21, 2024 10:13
go lang keyboard capture
package main
import (
"fmt"
"syscall"
//~ "time"
"unsafe"
"golang.org/x/sys/windows"
)