code stringlengths 0 56.1M | repo_name stringlengths 3 57 | path stringlengths 2 176 | language stringclasses 672
values | license stringclasses 8
values | size int64 0 56.8M |
|---|---|---|---|---|---|
// stretchy_buffer.h - v1.04 - public domain - nothings.org/stb
// a vector<>-like dynamic array for C
//
// version history:
// 1.04 - fix warning
// 1.03 - compile as C++ maybe
// 1.02 - tweaks to syntax for no good reason
// 1.01 - added a "common uses" documentation section
// 1.0 - f... | orochi/stb | deprecated/stretchy_buffer.h | C++ | mit | 11,526 |
// stretchy buffer // init: NULL // free: sbfree() // push_back: sbpush() // size: sbcount() //
#define sbfree(a) ((a) ? free(stb__sbraw(a)),0 : 0)
#define sbpush(a,v) (stb__sbmaybegrow(a,1), (a)[stb__sbn(a)++] = (v))
#define sbcount(a) ((a) ? stb__sbn(a) : 0)
#define sbadd(a,n) (stb__sbmayb... | orochi/stb | deprecated/stretchy_buffer.txt | Text | mit | 1,129 |
Moved to https://github.com/nothings/single_file_libs | orochi/stb | docs/other_libs.md | Markdown | mit | 53 |
Lessons learned about how to make a header-file library
V1.0
September 2013 Sean Barrett
Things to do in an stb-style header-file library,
and rationales:
1. #define LIBRARYNAME_IMPLEMENTATION
Use a symbol like the above to control creating
the implementation. (I used a far-less-clear name
in my first header-file l... | orochi/stb | docs/stb_howto.txt | Text | mit | 7,130 |
# An interview with STB about stb_voxel_render.h
**Q:**
I suppose you really like Minecraft?
**A:**
Not really. I mean, I do own it and play it some, and
I do watch YouTube videos of other people playing it
once in a while, but I'm not saying it's that great.
But I do love voxels. I've been playing with voxel render... | orochi/stb | docs/stb_voxel_render_interview.md | Markdown | mit | 7,211 |
My collected rationales for placing these libraries
in the public domain:
1. Public domain vs. viral licenses
Why is this library public domain?
Because more people will use it. Because it's not viral, people are
not obligated to give back, so you could argue that it hurts the
development of it, and then beca... | orochi/stb | docs/why_public_domain.md | Markdown | mit | 5,070 |
// stb_c_lexer.h - v0.12 - public domain Sean Barrett 2013
// lexer for making little C-like languages with recursive-descent parsers
//
// This file provides both the interface and the implementation.
// To instantiate the implementation,
// #define STB_C_LEXER_IMPLEMENTATION
// in *ONE* source file, before #incl... | orochi/stb | stb_c_lexer.h | C++ | mit | 34,686 |
// stb_connected_components - v0.96 - public domain connected components on grids
// http://github.com/nothings/stb
//
// Finds connected components on 2D grids for testing reachability between
// two points, with fast updates when changing reachability (e.g. on one machi... | orochi/stb | stb_connected_components.h | C++ | mit | 37,299 |
// stb_divide.h - v0.94 - public domain - Sean Barrett, Feb 2010
// Three kinds of divide/modulus of signed integers.
//
// HISTORY
//
// v0.94 Fix integer overflow issues
// v0.93 2020-02-02 Write useful exit() value from main()
// v0.92 2019-02-25 Fix warning
// v0.91 2010-02-27 Fix euclide... | orochi/stb | stb_divide.h | C++ | mit | 14,507 |
/* stb_ds.h - v0.67 - public domain data structures - Sean Barrett 2019
This is a single-header-file library that provides easy-to-use
dynamic arrays and hash tables for C (also works in C++).
For a gentle introduction:
http://nothings.org/stb_ds
To use this library, do this in *one* C or C++ file:... | orochi/stb | stb_ds.h | C++ | mit | 69,015 |
// stb_dxt.h - v1.12 - DXT1/DXT5 compressor - public domain
// original by fabian "ryg" giesen - ported to C by stb
// use '#define STB_DXT_IMPLEMENTATION' before including to create the implementation
//
// USAGE:
// call stb_compress_dxt_block() for every block (you must pad)
// source should be a 4x4 block of ... | orochi/stb | stb_dxt.h | C++ | mit | 28,319 |
// stb_easy_font.h - v1.1 - bitmap font for 3D rendering - public domain
// Sean Barrett, Feb 2015
//
// Easy-to-deploy,
// reasonably compact,
// extremely inefficient performance-wise,
// crappy-looking,
// ASCII-only,
// bitmap font for use in 3D APIs.
//
// Intended for when you just want to get s... | orochi/stb | stb_easy_font.h | C++ | mit | 12,813 |
/* stbhw - v0.7 - http://nothings.org/gamedev/herringbone
Herringbone Wang Tile Generator - Sean Barrett 2014 - public domain
== LICENSE ==============================
This software is dual-licensed to the public domain and under the following
license: you are granted a perpetual, irrevocable license to copy, mod... | orochi/stb | stb_herringbone_wang_tile.h | C++ | mit | 43,167 |
// stb_hexwave - v0.5 - public domain, initial release 2021-04-01
//
// A flexible anti-aliased (bandlimited) digital audio oscillator.
//
// This library generates waveforms of a variety of shapes made of
// line segments. It does not do envelopes, LFO effects, etc.; it
// merely tries to solve the problem of generati... | orochi/stb | stb_hexwave.h | C++ | mit | 27,473 |
/* stb_image - v2.28 - public domain image loader - http://nothings.org/stb
no warranty implied; use at your own risk
Do this:
#define STB_IMAGE_IMPLEMENTATION
before you include this file in *one* C or C++ file to create the implementation.
// i.e. it should look like... | orochi/stb | stb_image.h | C++ | mit | 282,809 |
/* stb_image_resize - v0.97 - public domain image resizing
by Jorge L Rodriguez (@VinoBS) - 2014
http://github.com/nothings/stb
Written with emphasis on usability, portability, and efficiency. (No
SIMD or threads, so it be easily outperformed by libs that use those.)
Only scaling and translation is supp... | orochi/stb | stb_image_resize.h | C++ | mit | 116,516 |
/* stb_image_write - v1.16 - public domain - http://nothings.org/stb
writes out PNG/BMP/TGA/JPEG/HDR images to C stdio - Sean Barrett 2010-2015
no warranty implied; use at your own risk
Before #including,
#define STB_IMAGE_WRITE_IMPLEMENTATION
in the file that you... | orochi/stb | stb_image_write.h | C++ | mit | 71,221 |
// stb_include.h - v0.02 - parse and process #include directives - public domain
//
// To build this, in one source file that includes this file do
// #define STB_INCLUDE_IMPLEMENTATION
//
// This program parses a string and replaces lines of the form
// #include "foo"
// with the contents of a file named ... | orochi/stb | stb_include.h | C++ | mit | 9,186 |
// stb_leakcheck.h - v0.6 - quick & dirty malloc leak-checking - public domain
// LICENSE
//
// See end of file.
#ifdef STB_LEAKCHECK_IMPLEMENTATION
#undef STB_LEAKCHECK_IMPLEMENTATION // don't implement more than once
// if we've already included leakcheck before, undefine the macros
#ifdef malloc
#undef malloc
#u... | orochi/stb | stb_leakcheck.h | C++ | mit | 7,149 |
// stb_perlin.h - v0.5 - perlin noise
// public domain single-file C implementation by Sean Barrett
//
// LICENSE
//
// See end of file.
//
//
// to create the implementation,
// #define STB_PERLIN_IMPLEMENTATION
// in *one* C/CPP file that includes this file.
//
//
// Documentation:
//
// float stb_perlin_noise... | orochi/stb | stb_perlin.h | C++ | mit | 17,918 |
// stb_rect_pack.h - v1.01 - public domain - rectangle packing
// Sean Barrett 2014
//
// Useful for e.g. packing rectangular textures into an atlas.
// Does not do rotation.
//
// Before #including,
//
// #define STB_RECT_PACK_IMPLEMENTATION
//
// in the file that you want to have the implementation.
//
// Not nece... | orochi/stb | stb_rect_pack.h | C++ | mit | 20,199 |
// stb_sprintf - v1.10 - public domain snprintf() implementation
// originally by Jeff Roberts / RAD Game Tools, 2015/10/20
// http://github.com/nothings/stb
//
// allowed types: sc uidBboXx p AaGgEef n
// lengths : hh h ll j z t I64 I32 I
//
// Contributors:
// Fabian "ryg" Giesen (reformatting)
// github... | orochi/stb | stb_sprintf.h | C++ | mit | 58,223 |
// stb_textedit.h - v1.14 - public domain - Sean Barrett
// Development of this library was sponsored by RAD Game Tools
//
// This C header file implements the guts of a multi-line text-editing
// widget; you implement display, word-wrapping, and low-level string
// insertion/deletion, and stb_textedit will map user i... | orochi/stb | stb_textedit.h | C++ | mit | 54,016 |
// stb_tilemap_editor.h - v0.42 - Sean Barrett - http://nothings.org/stb
// placed in the public domain - not copyrighted - first released 2014-09
//
// Embeddable tilemap editor for C/C++
//
//
// TABLE OF CONTENTS
// FAQ
// How to compile/use the library
// Additional configuration macros
// API documenta... | orochi/stb | stb_tilemap_editor.h | C++ | mit | 146,564 |
// stb_truetype.h - v1.26 - public domain
// authored from 2009-2021 by Sean Barrett / RAD Game Tools
//
// =======================================================================
//
// NO SECURITY GUARANTEE -- DO NOT USE THIS ON UNTRUSTED FONT FILES
//
// This library does no range checking of the offsets found in ... | orochi/stb | stb_truetype.h | C++ | mit | 199,033 |
// Ogg Vorbis audio decoder - v1.22 - public domain
// http://nothings.org/stb_vorbis/
//
// Original version written by Sean Barrett in 2007.
//
// Originally sponsored by RAD Game Tools. Seeking implementation
// sponsored by Phillip Bennefall, Marc Andersen, Aaron Baker,
// Elias Software, Aras Pranckevicius, and Se... | orochi/stb | stb_vorbis.c | C++ | mit | 192,790 |
// stb_voxel_render.h - v0.89 - Sean Barrett, 2015 - public domain
//
// This library helps render large-scale "voxel" worlds for games,
// in this case, one with blocks that can have textures and that
// can also be a few shapes other than cubes.
//
// Video introduction:
// http://www.youtube.com/watch?v=2vn... | orochi/stb | stb_voxel_render.h | C++ | mit | 161,156 |
INCLUDES = -I..
CFLAGS = -Wno-pointer-to-int-cast -Wno-int-to-pointer-cast -DSTB_DIVIDE_TEST
CPPFLAGS = -Wno-write-strings -DSTB_DIVIDE_TEST
# Uncomment this line for reproducing OSS-Fuzz bugs with image_fuzzer
#CFLAGS += -O -fsanitize=address
all:
$(CC) $(INCLUDES) $(CFLAGS) ../stb_vorbis.c test_c_compilation.c te... | orochi/stb | tests/Makefile | Makefile | mit | 697 |
#define STB_C_LEX_C_DECIMAL_INTS Y // "0|[1-9][0-9]*" CLEX_intlit
#define STB_C_LEX_C_HEX_INTS Y // "0x[0-9a-fA-F]+" CLEX_intlit
#define STB_C_LEX_C_OCTAL_INTS Y // "[0-7]+" CLEX_intlit
#define STB_C_LEX_C_DECIMAL_FLOATS ... | orochi/stb | tests/c_lexer_test.c | C++ | mit | 3,710 |
# Microsoft Developer Studio Project File - Name="c_lexer_test" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Console Application" 0x0103
CFG=c_lexer_test - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project... | orochi/stb | tests/c_lexer_test.dsp | dsp | mit | 3,975 |
# FAQ
### How to run it?
There's no GUI. Find a directory with Minecraft Anvil files (.mca).
Copy a Minecraft "terrain.png" into that directory (do a google
image search). Run from that directory.
### How accurate is this as a Minecraft viewer?
Not very. Many Minecraft blocks are not handled correctly:
* N... | orochi/stb | tests/caveview/README.md | Markdown | mit | 3,448 |
#define _WIN32_WINNT 0x400
#include <assert.h>
#include <windows.h>
// stb.h
#define STB_DEFINE
#include "stb.h"
// stb_gl.h
#define STB_GL_IMPLEMENTATION
#define STB_GLEXT_DEFINE "glext_list.h"
#include "stb_gl.h"
// SDL
#include "sdl.h"
#include "SDL_opengl.h"
// stb_glprog.h
#define STB_GLPROG_IMPLEMENTATION
#d... | orochi/stb | tests/caveview/cave_main.c | C++ | mit | 15,920 |
// This file takes minecraft chunks (decoded by cave_parse) and
// uses stb_voxel_render to turn them into vertex buffers.
#define STB_GLEXT_DECLARE "glext_list.h"
#include "stb_gl.h"
#include "stb_image.h"
#include "stb_glprog.h"
#include "caveview.h"
#include "cave_parse.h"
#include "stb.h"
#include "sdl.h"
#includ... | orochi/stb | tests/caveview/cave_mesher.c | C++ | mit | 29,062 |
#include <assert.h>
#include <stdio.h>
#include <limits.h>
#include <stdlib.h>
#define FAST_CHUNK // disabling this enables the old, slower path that deblocks into a regular form
#include "cave_parse.h"
#include "stb_image.h"
#include "stb.h"
#define NUM_CHUNKS_PER_REGION 32 // only on one axis
#define NUM... | orochi/stb | tests/caveview/cave_parse.c | C++ | mit | 17,227 |
#ifndef INCLUDE_CAVE_PARSE_H
#define INCLUDE_CAVE_PARSE_H
typedef struct
{
unsigned char block;
unsigned char data;
unsigned char light:4;
unsigned char skylight:4;
} raw_block;
// this is the old fully-decoded chunk
typedef struct
{
int xpos, zpos, max_y;
int height[16][16];
raw_block rb[16][16]... | orochi/stb | tests/caveview/cave_parse.h | C++ | mit | 973 |
// This file renders vertex buffers, converts raw meshes
// to GL meshes, and manages threads that do the raw-mesh
// building (found in cave_mesher.c)
#include "stb_voxel_render.h"
#define STB_GLEXT_DECLARE "glext_list.h"
#include "stb_gl.h"
#include "stb_image.h"
#include "stb_glprog.h"
#include "caveview.h"
#inc... | orochi/stb | tests/caveview/cave_render.c | C++ | mit | 29,519 |
# Microsoft Developer Studio Project File - Name="caveview" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Application" 0x0101
CFG=caveview - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!M... | orochi/stb | tests/caveview/caveview.dsp | dsp | mit | 4,735 |
Microsoft Developer Studio Workspace File, Format Version 6.00
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
###############################################################################
Project: "caveview"=.\caveview.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
#######################... | orochi/stb | tests/caveview/caveview.dsw | dsw | mit | 510 |
#ifndef INCLUDE_CAVEVIEW_H
#define INCLUDE_CAVEVIEW_H
#include "stb.h"
#include "stb_voxel_render.h"
typedef struct
{
int cx,cy;
stbvox_mesh_maker mm;
uint8 *build_buffer;
uint8 *face_buffer;
int num_quads;
float transform[3][3];
float bounds[2][3];
uint8 sv_blocktype[34][34][18];
uint... | orochi/stb | tests/caveview/caveview.h | C++ | mit | 1,215 |
#ifndef __glext_h_
#define __glext_h_ 1
#ifdef __cplusplus
extern "C" {
#endif
/*
** Copyright (c) 2013 The Khronos Group Inc.
**
** Permission is hereby granted, free of charge, to any person obtaining a
** copy of this software and/or associated documentation files (the
** "Materials"), to deal in the Materials wit... | orochi/stb | tests/caveview/glext.h | C++ | mit | 729,795 |
GLARB(ActiveTexture,ACTIVETEXTURE)
GLARB(ClientActiveTexture,CLIENTACTIVETEXTURE)
GLARB(MultiTexCoord2f,MULTITEXCOORD2F)
GLEXT(TexImage3D,TEXIMAGE3D)
GLEXT(TexSubImage3D,TEXSUBIMAGE3D)
GLEXT(GenerateMipmap,GENERATEMIPMAP)
GLARB(DebugMessageCallback,DEBUGMESSAGECALLBACK)
GLCORE(VertexAttribIPointer,VERTEXATTRIBIPOINTER... | orochi/stb | tests/caveview/glext_list.h | C++ | mit | 1,194 |
orochi/stb | tests/caveview/main.c | C++ | mit | 0 | |
// stbgl - v0.04 - Sean Barrett 2008 - public domain
//
// Note that the gl extensions support requires glext.h. In fact, it works
// if you just concatenate glext.h onto the end of this file. In that case,
// this file is covered by the SGI FreeB license, and is not public domain.
//
// Extension usage:
//
// 1. Ma... | orochi/stb | tests/caveview/stb_gl.h | C++ | mit | 38,107 |
// stb_glprog v0.02 public domain functions to reduce GLSL boilerplate
// http://nothings.org/stb/stb_glprog.h especially with GL1 + ARB extensions
//
// Following defines *before* including have following effects:
//
// STB_GLPROG_IMPLEMENTATION
// creates the implementation
//
// STB_GLPRO... | orochi/stb | tests/caveview/stb_glprog.h | C++ | mit | 20,283 |
/*
SDL_windows_main.c, placed in the public domain by Sam Lantinga 4/13/98
The WinMain function -- calls your program's main() function
*/
#include "SDL_config.h"
#ifdef __WIN32__
//#include "../../core/windows/SDL_windows.h"
/* Include this so we define UNICODE properly */
#if defined(__WIN32__)
#define W... | orochi/stb | tests/caveview/win32/SDL_windows_main.c | C++ | mit | 5,518 |
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
/* fuzz target entry point, works without libFuzzer */
int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size);
int main(int argc, char **argv)
{
FILE *f;
char *buf = NULL;
long siz_buf;
if(argc < 2)
{
fprintf(stderr, "no in... | orochi/stb | tests/fuzz_main.c | C++ | mit | 970 |
#define STB_CONNECTED_COMPONENTS_IMPLEMENTATION
#define STBCC_GRID_COUNT_X_LOG2 10
#define STBCC_GRID_COUNT_Y_LOG2 10
#include "stb_connected_components.h"
#ifdef GRID_TEST
#include <windows.h>
#include <stdio.h>
#include <direct.h>
//#define STB_DEFINE
#include "stb.h"
//#define STB_IMAGE_IMPLEMENTATION
#include... | orochi/stb | tests/grid_reachability.c | C++ | mit | 9,291 |
# Microsoft Developer Studio Project File - Name="herringbone" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Console Application" 0x0103
CFG=herringbone - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project u... | orochi/stb | tests/herringbone.dsp | dsp | mit | 4,147 |
#define STB_HERRINGBONE_WANG_TILE_IMPLEMENTATION
#include "stb_herringbone_wang_tile.h"
#define STB_IMAGE_WRITE_IMPLEMENTATION
#include "stb_image_write.h"
// e 12 1 1 1 1 1 1 4 4
int main(int argc, char **argv)
{
stbhw_config c = { 0 };
int w,h, num_colors,i;
unsigned char *data;
if (argc == 1) goto ... | orochi/stb | tests/herringbone_generator.c | C++ | mit | 3,016 |
#include <stdio.h>
#define STB_HBWANG_MAX_X 500
#define STB_HBWANG_MAX_Y 500
#define STB_HERRINGBONE_WANG_TILE_IMPLEMENTATION
#include "stb_herringbone_wang_tile.h"
#define STB_IMAGE_IMPLEMENTATION
#include "stb_image.h"
#define STB_IMAGE_WRITE_IMPLEMENTATION
#include "stb_image_write.h"
int main(int argc, char ... | orochi/stb | tests/herringbone_map.c | C++ | mit | 2,496 |
# Microsoft Developer Studio Project File - Name="herringbone_map" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Console Application" 0x0103
CFG=herringbone_map - Win32 Debug
!MESSAGE This is not a valid makefile. To build this p... | orochi/stb | tests/herringbone_map.dsp | dsp | mit | 4,166 |
#define STBI_WINDOWS_UTF8
#define STB_IMAGE_WRITE_IMPLEMENTATION
#include "stb_image_write.h"
#define STB_IMAGE_IMPLEMENTATION
#include "stb_image.h"
#define STB_DEFINE
#include "stb.h"
//#define PNGSUITE_PRIMARY
#if 0
void test_ycbcr(void)
{
STBI_SIMD_ALIGN(unsigned char, y[256]);
STBI_SIMD_ALIGN(unsigned c... | orochi/stb | tests/image_test.c | C++ | mit | 6,124 |
# Microsoft Developer Studio Project File - Name="image_test" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Console Application" 0x0103
CFG=image_test - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project usi... | orochi/stb | tests/image_test.dsp | dsp | mit | 4,213 |
#ifdef __clang__
#define STBIWDEF static inline
#endif
#define STB_IMAGE_WRITE_STATIC
#define STB_IMAGE_WRITE_IMPLEMENTATION
#include "stb_image_write.h"
// using an 'F' since it has no rotational symmetries, and 6x5
// because it's a small, atypical size likely to trigger edge cases.
//
// conveniently, it's also sma... | orochi/stb | tests/image_write_test.c | C++ | mit | 1,874 |
#!/bin/bash -eu
# This script is meant to be run by
# https://github.com/google/oss-fuzz/blob/master/projects/stb/Dockerfile
$CXX $CXXFLAGS -std=c++11 -I. -DSTBI_ONLY_PNG \
$SRC/stb/tests/stbi_read_fuzzer.c \
-o $OUT/stb_png_read_fuzzer $LIB_FUZZING_ENGINE
$CXX $CXXFLAGS -std=c++11 -I. \
$SRC/stb/tests/s... | orochi/stb | tests/ossfuzz.sh | Shell | mit | 1,125 |
# Font character oversampling for rendering from atlas textures
TL,DR: Run oversample.exe on a windows machine to see the
benefits of oversampling. It will try to use arial.ttf from the
Windows font directory unless you type the name of a .ttf file as
a command-line argument.
## Benefits of oversampling
Oversampling... | orochi/stb | tests/oversample/README.md | Markdown | mit | 4,636 |
#pragma warning(disable:4244; disable:4305; disable:4018)
#include <assert.h>
#include <ctype.h>
#define STB_WINMAIN
#include "stb_wingraph.h"
#define STB_TRUETYPE_IMPLEMENTATION
#define STB_RECT_PACK_IMPLEMENTATION
#include "stb_rect_pack.h"
#include "stb_truetype.h"
#ifndef WINGDIAPI
#define CALLBACK __stdcall
... | orochi/stb | tests/oversample/main.c | C++ | mit | 8,567 |
# Microsoft Developer Studio Project File - Name="oversample" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Application" 0x0101
CFG=oversample - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE... | orochi/stb | tests/oversample/oversample.dsp | dsp | mit | 3,700 |
Microsoft Developer Studio Workspace File, Format Version 6.00
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
###############################################################################
Project: "oversample"=.\oversample.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###################... | orochi/stb | tests/oversample/oversample.dsw | dsw | mit | 514 |
// stb_wingraph.h v0.01 - public domain windows graphics programming
// wraps WinMain, ChoosePixelFormat, ChangeDisplayResolution, etc. for
// doing OpenGL graphics
//
// in ONE source file, put '#define STB_DEFINE' before including this
// OR put '#define STB_WINMAIN' to define a WinMain that calls stbwingraph_main(v... | orochi/stb | tests/oversample/stb_wingraph.h | C++ | mit | 24,875 |
#define STB_DEFINE
#include "stb.h"
#define STB_PG_IMPLEMENTATION
#include "stb_pg.h"
#define STB_IMAGE_IMPLEMENTATION
#include "stb_image.h"
#define STB_IMAGE_WRITE_IMPLEMENTATION
#include "stb_image_write.h"
static float *hf;
static int hf_width = 10001;
static int hf_height = 10001;
static float get_height(float x... | orochi/stb | tests/pg_test/pg_test.c | C++ | mit | 3,198 |
PngSuite
--------
Permission to use, copy, modify and distribute these images for any
purpose and without fee is hereby granted.
(c) Willem van Schaik, 1996, 2011
| orochi/stb | tests/pngsuite/PngSuite.LICENSE | license | mit | 167 |
filename,width,height,ncomp,error,hash
pngsuite/16bit/basi0g16.png,32,32,1,,0xfc8f2f99
pngsuite/16bit/basi2c16.png,32,32,3,,0x65567ed5
pngsuite/16bit/basi4a16.png,32,32,2,,0x198cf245
pngsuite/16bit/basi6a16.png,32,32,4,,0x3016e9b5
pngsuite/16bit/basn0g16.png,32,32,1,,0xfc8f2f99
pngsuite/16bit/basn2c16.png,32,32,3,,0x65... | orochi/stb | tests/pngsuite/ref_results.csv | csv | mit | 13,451 |
/* stb_lib.h - v1.00 - http://nothings.org/stb
no warranty is offered or implied; use this code at your own risk
============================================================================
You MUST
... | orochi/stb | tests/prerelease/stb_lib.h | C++ | mit | 106,783 |
#define _CRT_SECURE_NO_WARNINGS
#include <stdlib.h>
#include <stdio.h>
#if defined(_WIN32) && _MSC_VER > 1200
#define STBIR_ASSERT(x) \
if (!(x)) { \
__debugbreak(); \
} else
#else
#include <assert.h>
#define STBIR_ASSERT(x) assert(x)
#endif
#define STBIR_MALLOC stbir_malloc
#define STBIR_FREE stbir_free... | orochi/stb | tests/resample_test.cpp | C++ | mit | 39,332 |
#define STB_IMAGE_RESIZE_IMPLEMENTATION
#define STB_IMAGE_RESIZE_STATIC
#include "stb_image_resize.h"
// Just to make sure it will build properly with a c compiler
int main() {
}
| orochi/stb | tests/resample_test_c.c | C++ | mit | 181 |
# Microsoft Developer Studio Project File - Name="resize" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Console Application" 0x0103
CFG=resize - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE... | orochi/stb | tests/resize.dsp | dsp | mit | 4,029 |
#define STB_DEFINE
#include "stb.h"
#define STB_TRUETYPE_IMPLEMENTATION
#include "stb_truetype.h"
#define STB_IMAGE_WRITE_IMPLEMENTATION
#include "stb_image_write.h"
// used both to compute SDF and in 'shader'
float sdf_size = 32.0; // the larger this is, the better large font sizes look
float pixel_dist_sc... | orochi/stb | tests/sdf/sdf_test.c | C++ | mit | 4,626 |
/*
* Unit tests for "stb.h"
*/
#define _CRT_SECURE_NO_WARNINGS
//#include <windows.h>
#include <stdio.h>
#include <string.h>
#include <time.h>
#include <assert.h>
#include <stdlib.h>
#ifdef _WIN32
#include <crtdbg.h>
#endif
//#define STB_FASTMALLOC
#ifdef _DEBUG
#define STB_MALLOC_WRAPPER_DEBUG
#endif
#ifndef _M_A... | orochi/stb | tests/stb.c | C++ | mit | 124,964 |
# Microsoft Developer Studio Project File - Name="stb" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Console Application" 0x0103
CFG=stb - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MES... | orochi/stb | tests/stb.dsp | dsp | mit | 6,453 |
Microsoft Developer Studio Workspace File, Format Version 6.00
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
###############################################################################
Project: "c_lexer_test"=.\c_lexer_test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############... | orochi/stb | tests/stb.dsw | dsw | mit | 2,610 |
#define STB_C_LEX_C_DECIMAL_INTS Y
#define STB_C_LEX_C_HEX_INTS Y
#define STB_C_LEX_C_OCTAL_INTS Y
#define STB_C_LEX_C_DECIMAL_FLOATS Y
#define STB_C_LEX_C99_HEX_FLOATS Y
#define STB_C_LEX_C_IDENTIFIERS Y
#define STB_C_LEX_C_DQ_STRINGS Y
#define STB_C_LEX_C_SQ_STRINGS Y
#define STB_C_... | orochi/stb | tests/stb_c_lexer_fuzzer.cpp | C++ | mit | 2,081 |
#define WIN32_MEAN_AND_LEAN
#define WIN32_LEAN_AND_MEAN
//#include <windows.h>
#include <conio.h>
#define STB_DEFINE
#ifndef _M_AMD64
#define STB_NPTR
#endif
#define STB_ONLY
#include "stb.h"
//#include "stb_file.h"
int count;
void c(int truth, const char *error)
{
if (!truth) {
fprintf(stderr, "Test failed: ... | orochi/stb | tests/stb_cpp.cpp | C++ | mit | 2,233 |
# Microsoft Developer Studio Project File - Name="stb_cpp" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Console Application" 0x0103
CFG=stb_cpp - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMA... | orochi/stb | tests/stb_cpp.dsp | dsp | mit | 4,095 |
header_png="\x89PNG\x0d\x0a\x1a\x0a"
section_idat="IDAT"
section_iend="IEND"
section_ihdr="IHDR"
section_plte="PLTE"
section_trns="tRNS"
section_cgbi="CgBI"
| orochi/stb | tests/stb_png.dict | dict | mit | 158 |
#define STBI_WINDOWS_UTF8
#define STB_IMAGE_STATIC
#define STB_IMAGE_IMPLEMENTATION
#include "stb_image.h"
#define STB_IMAGE_WRITE_STATIC
#define STB_IMAGE_WRITE_IMPLEMENTATION
//#include "stb_image_write.h"
#define STBTT_STATIC
#define STB_TRUETYPE_IMPLEMENTATION
#include "stb_truetype.h"
| orochi/stb | tests/stb_static.c | C++ | mit | 293 |
#ifdef __cplusplus
extern "C" {
#endif
#define STB_IMAGE_IMPLEMENTATION
#include "../stb_image.h"
int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
{
int x, y, channels;
if(!stbi_info_from_memory(data, size, &x, &y, &channels)) return 0;
/* exit if the image is larger than ~80MB */
if(y... | orochi/stb | tests/stbi_read_fuzzer.c | C++ | mit | 502 |
# Microsoft Developer Studio Project File - Name="stblib" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Console Application" 0x0103
CFG=stblib - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE... | orochi/stb | tests/stblib.dsp | dsp | mit | 4,128 |
#include "prerelease/stb_lib.h"
#define STB_LIB_IMPLEMENTATION
#include "prerelease/stb_lib.h"
//#define STB_REGEX_IMPLEMENTATION
//#include "stb_regex.h"
int main(int argc, char **argv)
{
} | orochi/stb | tests/stblib_test.c | C++ | mit | 193 |
//#include "stb_regex.h"
//#include "stb_regex.h"
#include "prerelease/stb_lib.h"
#include "prerelease/stb_lib.h"
| orochi/stb | tests/stblib_test_companion.c | C++ | mit | 114 |
# Microsoft Developer Studio Project File - Name="stretch_test" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Console Application" 0x0103
CFG=stretch_test - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project... | orochi/stb | tests/stretch_test.dsp | dsp | mit | 4,057 |
[link]
-Xlinker advapi32.lib
[args]
-I .. -Wall -D_DEBUG
[compilers]
#clang for x64,vcvars_2015_x64,clang --analyze
clang for x64,vcvars_2015_x64,clang
clang for x86,vcvars_2015_x86,clang --target=i386-pc-windows-msvc
##### STATIC ANALYSIS
#
#[link]
#
#[args]
#-I .. -Wall -D_DEBUG
#
#[compilers]
#clang for x64,vc... | orochi/stb | tests/test.sbm | sbm | mit | 1,318 |
#define STB_SPRINTF_IMPLEMENTATION
#include "stb_sprintf.h"
#define STB_PERLIN_IMPLEMENTATION
#define STB_IMAGE_WRITE_IMPLEMENTATION
#define STB_C_LEXER_IMPLEMENTATIOn
#define STB_DIVIDE_IMPLEMENTATION
#define STB_IMAGE_IMPLEMENTATION
#define STB_HERRINGBONE_WANG_TILE_IMEPLEMENTATIOn
#define STB_IMAGE_RESIZE_IMPLEMENT... | orochi/stb | tests/test_c_compilation.c | C++ | mit | 1,221 |
#include "stb_c_lexer.h"
#define STB_C_LEX_C_DECIMAL_INTS Y // "0|[1-9][0-9]*" CLEX_intlit
#define STB_C_LEX_C_HEX_INTS Y // "0x[0-9a-fA-F]+" CLEX_intlit
#define STB_C_LEX_C_OCTAL_INTS Y // "[0-7]+" CLEX_intlit
#define S... | orochi/stb | tests/test_c_lexer.c | C++ | mit | 3,774 |
#define STB_IMAGE_WRITE_STATIC
#define STBIWDEF static inline
#include "stb_image.h"
#include "stb_rect_pack.h"
#include "stb_truetype.h"
#include "stb_image_write.h"
#include "stb_c_lexer.h"
#include "stb_perlin.h"
#include "stb_dxt.h"
#include "stb_divide.h"
#include "stb_herringbone_wang_tile.h"
#include "stb_ds.h"... | orochi/stb | tests/test_cpp_compilation.cpp | C++ | mit | 5,925 |
#ifdef DS_PERF
#define _CRT_SECURE_NO_WARNINGS
#define _CRT_NONSTDC_NO_DEPRECATE
#define _CRT_NON_CONFORMING_SWPRINTFS
//#define STBDS_INTERNAL_SMALL_BUCKET // make 64-bit bucket fit both keys and hash bits
//#define STBDS_SIPHASH_2_4 // performance test 1_3 against 2_4
//#define STBDS_INTERNAL_BUCKET_START ... | orochi/stb | tests/test_ds.c | C++ | mit | 32,297 |
#include <stdio.h>
#ifdef DS_TEST
#define STBDS_UNIT_TESTS
#endif
#ifdef DS_STATS
#define STBDS_STATISTICS
#endif
#ifndef DS_PERF
#define STBDS_ASSERT assert
#include <assert.h>
#endif
//#define STBDS_SIPHASH_2_4
#define STB_DS_IMPLEMENTATION
#include "../stb_ds.h"
size_t churn_inserts, churn_deletes;
void churn(... | orochi/stb | tests/test_ds_cpp.cpp | C++ | mit | 13,936 |
#include "stb_dxt.h"
| orochi/stb | tests/test_dxt.c | C++ | mit | 21 |
#include "stb_easy_font.h"
void ef_dummy(void)
{
// suppress unsused-function warning
stb_easy_font_spacing(0);
stb_easy_font_print(0,0,0,0,0,0);
stb_easy_font_width(0);
stb_easy_font_height(0);
} | orochi/stb | tests/test_easyfont.c | C++ | mit | 212 |
#ifdef __clang__
#define STBIDEF static inline
#endif
#define STB_IMAGE_STATIC
#define STB_IMAGE_IMPLEMENTATION
#include "stb_image.h" | orochi/stb | tests/test_image.c | C++ | mit | 135 |
#ifdef __clang__
#define STBIWDEF static inline
#endif
#define STB_IMAGE_WRITE_IMPLEMENTATION
#define STB_IMAGE_WRITE_STATIC
#include "stb_image_write.h" | orochi/stb | tests/test_image_write.c | C++ | mit | 154 |
#include "stb_perlin.h" | orochi/stb | tests/test_perlin.c | C++ | mit | 23 |
#include <stdio.h>
#include <stdlib.h>
// Reference Paeth filter as per PNG spec
static int ref_paeth(int a, int b, int c)
{
int p = a + b - c;
int pa = abs(p-a);
int pb = abs(p-b);
int pc = abs(p-c);
if (pa <= pb && pa <= pc) return a;
if (pb <= pc) return b;
return c;
}
// Optimized Paeth filte... | orochi/stb | tests/test_png_paeth.c | C++ | mit | 1,054 |
#include <stdio.h>
#include <stdlib.h>
#define STBI_WINDOWS_UTF8
#ifdef _WIN32
#define WIN32 // what stb.h checks
#pragma comment(lib, "advapi32.lib")
#endif
#define STB_IMAGE_IMPLEMENTATION
#include "stb_image.h"
#define STB_DEFINE
#include "deprecated/stb.h"
static unsigned int fnv1a_hash32(const stbi_uc *bytes,... | orochi/stb | tests/test_png_regress.c | C++ | mit | 1,923 |
#include <stdio.h>
#define STB_DS_IMPLEMENTATION
#define STBDS_SIPHASH_2_4
#define STBDS_TEST_SIPHASH_2_4
#include "../stb_ds.h"
int main(int argc, char **argv)
{
unsigned char mem[64];
int i,j;
for (i=0; i < 64; ++i) mem[i] = i;
for (i=0; i < 64; ++i) {
size_t hash = stbds_hash_bytes(mem, i, 0);
prin... | orochi/stb | tests/test_siphash.c | C++ | mit | 463 |
#define USE_STB 1
#if USE_STB
# include "stb_sprintf.h"
# define SPRINTF stbsp_sprintf
# define SNPRINTF stbsp_snprintf
#else
# include <locale.h>
# define SPRINTF sprintf
# define SNPRINTF snprintf
#endif
#include <assert.h>
#include <math.h> // for INFINITY, NAN
#include <stddef.h> // for ptrdiff_t
#include <s... | orochi/stb | tests/test_sprintf.c | C++ | mit | 7,337 |
#ifndef _CRT_SECURE_NO_WARNINGS
// Fixes Compile Errors for Visual Studio 2005 or newer
#define _CRT_SECURE_NO_WARNINGS
#endif
#include <stdlib.h>
// this isn't meant to compile standalone; link with test_c_compilation.c as well
#include "stb_rect_pack.h"
#define STB_TRUETYPE_IMPLEMENTATION
#include "stb_truetype.h... | orochi/stb | tests/test_truetype.c | C++ | mit | 4,407 |
#define STB_VORBIS_HEADER_ONLY
#include "stb_vorbis.c"
#include "stb.h"
extern void stb_vorbis_dumpmem(void);
#ifdef VORBIS_TEST
int main(int argc, char **argv)
{
size_t memlen;
unsigned char *mem = stb_fileu("c:/x/sketch008.ogg", &memlen);
int chan, samplerate;
short *output;
int samples = stb_vorbis_... | orochi/stb | tests/test_vorbis.c | C++ | mit | 458 |
#include "stb_voxel_render.h" | orochi/stb | tests/test_voxel.c | C++ | mit | 29 |
// I haven't actually tested this yet, this is just to make sure it compiles
#include <stdlib.h>
#include <string.h> // memmove
#include <ctype.h> // isspace
#define STB_TEXTEDIT_CHARTYPE char
#define STB_TEXTEDIT_STRING text_control
// get the base type
#include "stb_textedit.h"
// define our editor structu... | orochi/stb | tests/textedit_sample.c | C++ | mit | 3,696 |