The stb-devel package contains libraries and header files for developing applications that use stb. This is a metapackage that requires the -devel packages for all stb libraries.
acquired package info from repodata DB: repodata/1878cc60a19e65efc93d1a539275c5a6799b0acbd7796ee105712c44cae47ab4-primary.sqlite.bz2
Guts of a text editor for games etc., implementing them from scratch
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 inputs into insertions & deletions, plus updates to the cursor position, selection state, and undo state. It is intended for use in games and other systems that need to build their own custom widgets and which do not have heavy text-editing requirements (this library is not recommended for use for editing large texts, as its performance does not scale and it has limited undo). Non-trivial behaviors are modelled after Windows text controls.
Typesafe dynamic array and hash tables for C, will compile in C++
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: https://nothings.org/stb_ds
This is a full sprintf replacement that supports everything that the C runtime sprintfs support, including float/double, 64-bit integers, hex floats, field parameters (%*.*d stuff), length reads backs, etc. Why would you need this if sprintf already exists? Well, first off, it’s *much* faster (see below). It’s also much smaller than the CRT versions code-space-wise. We’ve also added some simple improvements that are super handy (commas in thousands, callbacks at buffer full, for example). Finally, the format strings for MSVC and GCC differ for 64-bit integers (among other small things), so this lets you use the same format strings in cross platform code. It uses the standard single file trick of being both the header file and the source itself. If you just include it normally, you just get the header file function definitions. To get the code, you include it from a C or C++ file and define STB_SPRINTF_IMPLEMENTATION first. It only uses va_args macros from the C runtime to do its work. It does cast doubles to S64s and shifts and divides U64s, which does drag in CRT code on most platforms. It compiles to roughly 8K with float support, and 4K without. As a comparison, when using MSVC static libs, calling sprintf drags in 16K.
Quick-and-dirty malloc/free leak-checking
Quick-and-dirty malloc/free leak-checking.
Incrementally compute reachability on grids
Finds connected components on 2D grids for testing reachability between two points, with fast updates when changing reachability (e.g. on one machine it was typically 0.2ms w/ 1024x1024 grid). Each grid square must be “open” or “closed” (traversable or untraversable), and grid squares are only connected to their orthogonal neighbors, not diagonally.
Simple 2D rectangle packer with decent quality
Useful for e.g. packing rectangular textures into an atlas. Does not do rotation. Not necessarily the awesomest packing method, but better than the totally naive one in stb_truetype (which is primarily what this is meant to replace). No memory allocations; uses qsort() and assert() from stdlib. Can override those by defining STBRP_SORT and STBRP_ASSERT. This library currently uses the Skyline Bottom-Left algorithm. Please note: better rectangle packers are welcome! Please implement them to the same API, but with a different init function.
More useful 32-bit modulus e.g. “Euclidean divide”
This file provides three different consistent divide/mod pairs implemented on top of arbitrary C/C++ division, including correct handling of overflow of intermediate calculations: trunc: a/b truncates to 0, a%b has same sign as a floor: a/b truncates to -inf, a%b has same sign as b eucl: a/b truncates to sign(b)*inf, a%b is non-negative
Fabian “ryg” Giesen’s real-time DXT compressor
Parse, decode, and rasterize characters from TrueType fonts
Parse, decode, and rasterize characters from TrueType fonts. ======================================================================= NO SECURITY GUARANTEE -- DO NOT USE THIS ON UNTRUSTED FONT FILES This library does no range checking of the offsets found in the file, meaning an attacker can use it to read arbitrary memory. ======================================================================= This library processes TrueType files: • parse files • extract glyph metrics • extract glyph shapes • render glyphs to one-channel bitmaps with antialiasing (box filter) • render glyphs to one-channel SDF bitmaps (signed-distance field/function)
Simplify writing parsers for C-like languages
Lexer for making little C-like languages with recursive-descent parsers.
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 generating an artifact-free morphable digital waveform with a variety of spectra, and leaves it to the user to rescale the waveform and mix multiple voices, etc.
Image loading/decoding from file/memory: JPG, PNG, TGA, BMP, PSD, GIF, HDR, PIC
Image loading/decoding from file/memory: JPG, PNG, TGA, BMP, PSD, GIF, HDR, PIC. Primarily of interest to game developers and other people who can avoid problematic images and only need the trivial interface.
Quick-and-dirty easy-to-deploy bitmap font for printing frame rate, etc
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 some text displaying in a 3D app as quickly as possible. Doesn’t use any textures, instead builds characters out of quads.
Resize images larger/smaller with good quality
Image resizing. 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 supported, no rotations or shears. Easy API downsamples w/Mitchell filter, upsamples w/cubic interpolation.
Perlin’s revised simplex noise w/ different seeds
Perlin’s revised simplex noise w/ different seeds.
Helps render large-scale “voxel” worlds for games
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=2vnTtiLrV1w Minecraft-viewer sample app (not very simple though): http://github.com/nothings/stb/tree/master/tests/caveview It works by creating triangle meshes. The library includes - converter from dense 3D arrays of block info to vertex mesh - vertex & fragment shaders for the vertex mesh - assistance in setting up shader state For portability, none of the library code actually accesses the 3D graphics API. (At the moment, it’s not actually portable since the shaders are GLSL only, but patches are welcome.) You have to do all the caching and tracking of vertex buffers yourself. However, you could also try making a game with a small enough world that it’s fully loaded rather than streaming. Currently the preferred vertex format is 20 bytes per quad. There are designs to allow much more compact formats with a slight reduction in shader features, but no roadmap for actually implementing them.
Decode Ogg Vorbis files from file/memory to float/16-bit signed output
This header file is a library for writing images to C stdio or a callback. The PNG output is not optimal; it is 20-50% larger than the file written by a decent optimizing implementation; though providing a custom zlib compress function (see STBIW_ZLIB_COMPRESS) can mitigate that. This library is designed for source code compactness and simplicity, not optimal image file size or run-time performance.
This library is an SDK for Herringbone Wang Tile generation: http://nothings.org/gamedev/herringbone The core design is that you use this library offline to generate a “template” of the tiles you’ll create. You then edit those tiles, then load the created tile image file back into this library and use it at runtime to generate “maps”. You cannot load arbitrary tile image files with this library; it is only designed to load image files made from the template it created. It stores a binary description of the tile sizes & constraints in a few pixels, and uses those to recover the rules, rather than trying to parse the tiles themselves. You *can* use this library to generate from arbitrary tile sets, but only by loading the tile set and specifying the constraints explicitly yourself.