• Stars
    star
    217
  • Rank 182,446 (Top 4 %)
  • Language
    C++
  • License
    MIT License
  • Created about 4 years ago
  • Updated 7 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A minimal self-contained Dear ImGui starter project for Windows, Linux and macOS.

cimgui-sokol-starterkit

A minimal cross-platform starter-kit to write simple Dear ImGui tools for Windows, Linux and macOS in C.

WASM version (see below for build instructions)

Clone:

> git clone https://github.com/floooh/cimgui-sokol-starterkit
> cd cimgui-sokol-starterkit

Build:

> mkdir build
> cd build

> cmake ..
> cmake --build .

To build a Release version on Linux and Mac:

> cmake -DCMAKE_BUILD_TYPE=MinSizeRel ..
> cmake --build .

To build a Release version on Windows with the VisualStudio toolchain:

> cmake ..
> cmake --build . --config MinSizeRel

NOTE: on Linux you'll also need to install the 'usual' dev-packages needed for X11+GL development.

Run:

On Linux and macOS:

> ./demo

On Windows with the Visual Studio toolchain the exe is in a subdirectory:

> Debug\demo.exe
> MinSizeRel\demo.exe

Build and Run WASM/HTML version via Emscripten (Linux, macOS)

Setup the emscripten SDK as described here:

https://emscripten.org/docs/getting_started/downloads.html#installation-instructions

Don't forget to run source ./emsdk_env.sh after activating the SDK.

And then in the cimgui-sokol-starterkit directory:

mkdir build
cd build
emcmake cmake -DCMAKE_BUILD_TYPE=MinSizeRel ..
cmake --build .

To run the compilation result in the system web browser:

> emrun demo.html

...which should look like this.

(this procedure should also work on Windows with make in the path, but is currently untested)

IDE Support

Visual Studio (Windows)

On Windows, cmake will automatically create a Visual Studio solution file in the build directory, which can be opened (inside the build directory) with:

> cmake --open .

Xcode (macOS)

Replace cmake .. with cmake -GXcode .. and open the generated Xcode project:

> cmake -GXcode ..
> cmake --open .

Visual Studio Code (Windows, Linux, macOS)

Use the MS C/C++ extension together with the MS CMake Tools extension and start Visual Studio code from the project's root directory. The CMake extension will detect the CMakeLists.txt file and take over from there.

Notes:

The repository contains snapshots of the following libraries:

I'm not planning to do frequent updates to newer versions of those files, so the versions contained in here may be behind. Updating your own copies is trivial though, just copy the new files from the original repositories over the files contained here.

I tried to keep the CMake file as simple as possible (unfortunately it's not quite as simple as I had liked, because of some cross-platform differences).

All the important code is in demo.c.

Enjoy!

More Repositories

1

sokol

minimal cross-platform standalone C headers
C
6,780
star
2

oryol

A small, portable and extensible C++ 3D coding framework
C++
1,990
star
3

chips

8-bit chip and system emulators in standalone C headers
C
967
star
4

sokol-samples

Sample code for https://github.com/floooh/sokol
C
605
star
5

pacman.c

Simple Pacman clone written in C99.
C
494
star
6

fips

High-level build system for distributed, multi-platform C/C++ projects.
Python
468
star
7

chips-test

Tests and sample code for https://github.com/floooh/chips
C
378
star
8

sokol-zig

Zig bindings for the sokol headers (https://github.com/floooh/sokol)
C
343
star
9

v6502r

visual6502 remixed
C
305
star
10

pacman.zig

Simple Pacman clone written in Zig.
Zig
227
star
11

sokol-tools

Command line tools for use with sokol headers
C++
216
star
12

bookmarks

Links to stuff that looks useful.
147
star
13

qoiview

QOI image viewer on top of the Sokol headers
C
126
star
14

emu-info

Various emulator-related infos from all over the net.
Assembly
115
star
15

yakc

Yet another KC emulator
Assembly
107
star
16

sokol-odin

Odin bindings for the sokol headers (https://github.com/floooh/sokol)
C
85
star
17

sokol-nim

nim bindings for https://github.com/floooh/sokol
C
82
star
18

oryol-samples

Oryol extension module samples
C++
82
star
19

rz80

Z80 chip family emulator library written in Rust.
Rust
76
star
20

fbxc

FBX cruncher (FBX + rules => JSON + vertex data blob)
C++
65
star
21

gliml

Minimalistic image loader library for GL projects
C++
63
star
22

sokol-rust

Rust bindings for the sokol headers (https://github.com/floooh/sokol)
C
60
star
23

altai

Modern WebGL wrapper in TypeScript
TypeScript
55
star
24

kc85.zig

A KC85 emulator written in Zig
Zig
52
star
25

tiny8bit

WebPage for https://github.com/floooh/chips-test
HTML
39
star
26

chipz

8-bit emulator experiments in Zig
Zig
34
star
27

docker-c64

C64 emulator running in docker
C
33
star
28

vscode-kcide

Retro assembly IDE for VSCode
TypeScript
29
star
29

sokol-zig-imgui-sample

Sample to use sokol-zig bindings with Dear ImGui
Zig
24
star
30

sokol-tools-bin

Binaries and fips integration for https://github.com/floooh/sokol-tools
Python
23
star
31

oryol-animation

Oryol animation and skinned-character-rendering modules
C++
19
star
32

visualz80remix

[WIP] WASM for https://github.com/floooh/v6502r with Z80 netlist
HTML
18
star
33

oryol-imgui

Dear Imgui wrapper module for Oryol
C++
18
star
34

fips-bgfx

fipsified version of bgfx (https://github.com/bkaradzic/bgfx)
CMake
17
star
35

vscode-emscripten-debugging

Example repository for Emscripten WASM debugging in VSCode
C
15
star
36

sokol-webgpu

HTML
15
star
37

floooh.github.io

Move blog and personal web page over to github (work in progress)
HTML
15
star
38

sokol-nim-samples

Example code for https://github.com/floooh/sokol-nim
Nim
14
star
39

visual6502remix

Webpage for https://github.com/floooh/v6502r
HTML
11
star
40

virtualkc

Webpage for the YAKC KC85 emulator
HTML
10
star
41

oryol-tools

Asset exporter tools for Oryol engine
C++
10
star
42

drahtgitter

A toolkit for converting and processing 3d data in python.
Python
9
star
43

oryol-tbui

Integrate TurbobadgerUI with Oryol
C++
8
star
44

sokol-html5

webpage for https://github.com/floooh/sokol-samples
HTML
7
star
45

objc-ast-experiments

C
7
star
46

fips-libcurl

Precompiled, stripped down libcurl libs for Oryol
C
7
star
47

visual2a03remix

webpage for the Ricoh 2A03 simulation
HTML
7
star
48

fibs

Nothing to see here, move along :)
TypeScript
7
star
49

kc85sdk

Experimental C-SDK for KC85 home computers
Python
7
star
50

tiny8bitvs

Experiment to integrate a 'chips' WASM emulator into a VSCode tab.
TypeScript
6
star
51

kcide-sample

Sample project for VSCode KC IDE extension
Assembly
6
star
52

fips-soloud

fipsified version of Soloud audio lib (https://github.com/jarikomppa/soloud)
CMake
6
star
53

voxel-test

Place to experiment with stb_voxel_renderer.h and Oryol
C
5
star
54

oryol-nuklear

Integrate Nuklear UI with Oryol engine
C++
5
star
55

oryol-test-app

Oryol testing app in its own repo
C++
5
star
56

fibs-hello-world

Most minimal fibs test project.
TypeScript
5
star
57

emsc-interop-demo

Simple example to demonstrate calling a C function from Javascript.
HTML
5
star
58

easmx

A fork of the asmx assembler usable as embeddable library.
C
5
star
59

sokol-wgpu-preview

Temporary sneak preview website for sokol WebGPU samples.
HTML
4
star
60

oryol-fileformats

Structure definitions for Oryol binary file formats.
C++
4
star
61

headeronly-perf

C
4
star
62

hcasm

8-bit home computer assembler in Typescript
TypeScript
4
star
63

fibs-libs

Collection of fibs project wrappers for common 3rd-party libraries.
TypeScript
4
star
64

oryol-sound

Legacy Oryol sound module (uses OpenAL)
C++
3
star
65

docker-kc85

A KC85/4 emulator in Docker.
C
3
star
66

fips-nuklear

fips build system wrapper for nuklear UI (https://github.com/vurtun/nuklear)
Python
3
star
67

chef-emscripten

Chef cookbook to setup an emscripten build environment.
Ruby
3
star
68

oryol-webgl2

Webpage files for bleeding edge WebGL2 Oryol samples.
HTML
3
star
69

fips-hello-world

Test project for fips build system.
Python
3
star
70

fips-cjson

fipsified cJSON lib
CMake
2
star
71

fips-bullet

fips wrapper for bullet phyiscs
CMake
2
star
72

chef-cmake

Chef cookbook for installing cmake from source tarball
Ruby
2
star
73

fips-spirvcross

fips wrapper for SPIRV-Cross
CMake
2
star
74

flohofwoe.www

JavaScript
2
star
75

fips-glfw

fipsified GLFW (https://github.com/glfw/glfw)
CMake
2
star
76

fibs-sokol-test

Fibs + sokol + sokol-shdc + stb
C
2
star
77

fips-vld

Fipsified VLD (Visual Leak Detector)
C
2
star
78

fips-zlib

fipsified zlib
C
2
star
79

fips-cpptoml

fipsified cpptoml (https://github.com/skystrife/cpptoml)
2
star
80

nvidia-driver-issue

C
1
star
81

fips-unittestpp

fipsified UnitTest++
C++
1
star
82

chef-nacl

Chef cookbook to install the Google Native Client SDK
Ruby
1
star
83

webgl2-test

WebGL2 bug repro tests (wip)
JavaScript
1
star
84

fips-remotery

fipsified version of Remotery (https://github.com/Celtoys/Remotery)
CMake
1
star
85

tmp-http-test

TypeScript
1
star
86

fibs-test

Top level test project for https://github.com/floooh/fibs
C
1
star
87

oryol-simple

The most simple Oryol Gfx app
Python
1
star
88

fips-lua

fips wrapper for lua
CMake
1
star
89

fips-glm

Fipsified glm lib (https://github.com/g-truc/glm)
1
star
90

fibs-utils

Common helpers and utilities for fibs projects.
TypeScript
1
star
91

tiny8bit-preview

Temporary preview webpage repo for https://github.com/floooh/chips-test
HTML
1
star
92

kcide-sample-kc854

Moved from https://github.com/floooh/kcide-sample/tree/main/kc854
Assembly
1
star