Doc lines for vendor:*

This commit is contained in:
Jeroen van Rijn
2025-10-10 17:51:28 +02:00
parent 7e7b6ac0de
commit 998fbdc5c0
52 changed files with 125 additions and 105 deletions
+1
View File
@@ -1,3 +1,4 @@
// Bindings for [[ ENet ; https://github.com/lsalzman/enet ]].
package ENet
when ODIN_OS == .Windows {
+1
View File
@@ -1,3 +1,4 @@
// Bindings for [[ OpenEXRCore ; https://github.com/AcademySoftwareFoundation/openexr/tree/main/src/lib/OpenEXRCore ]].
package vendor_openexr
OPENEXRCORE_SHARED :: #config(OPENEXRCORE_SHARED, false)
+1
View File
@@ -1,3 +1,4 @@
// OpenGL function pointer loader implemented in Odin. Supports the `core` profile up to version 4.6.
package vendor_gl
// Helper for loading shaders into a program
+1 -1
View File
@@ -1,4 +1,4 @@
// Bindings for [[ cgtlf ; https://github.com/jkuhlmann/cgltf ]].
// Bindings for [[ Cgtlf ; https://github.com/jkuhlmann/cgltf ]].
package cgltf
@(private)
-6
View File
@@ -1,9 +1,3 @@
/*
Bindings for [[CMark ; https://github.com/commonmark/cmark ]].
Original authors: John MacFarlane, Vicent Marti, Kārlis Gaņģis, Nick Wellnhofer.
See LICENSE for license details.
*/
package vendor_commonmark
import "core:c"
+32 -45
View File
@@ -1,18 +1,13 @@
#+build ignore
/*
Bindings for [[CMark; https://github.com/commonmark/cmark]].
Bindings for [[ CMark; https://github.com/commonmark/cmark ]].
Original authors: John MacFarlane, Vicent Marti, Kārlis Gaņģis, Nick Wellnhofer.
See LICENSE for license details.
*/
package vendor_commonmark
Original authors: John MacFarlane, Vicent Marti, Kārlis Gaņģis, Nick Wellnhofer.
See LICENSE for license details.
/*
Parsing - Simple interface:
```odin
Example:
import cm "vendor:commonmark"
// Parsing - Simple interface
hellope_world :: proc() {
fmt.printf("CMark version: %v\n", cm.version_string())
@@ -25,13 +20,8 @@ package vendor_commonmark
fmt.println(html)
}
```
Parsing - Streaming interface:
```odin
import cm "vendor:commonmark"
// Parsing - Streaming interface
streaming :: proc() {
using cm
@@ -67,26 +57,23 @@ package vendor_commonmark
fmt.println(html)
}
```
An iterator will walk through a tree of nodes, starting from a root
node, returning one node at a time, together with information about
whether the node is being entered or exited.
An iterator will walk through a tree of nodes, starting from a root
node, returning one node at a time, together with information about
whether the node is being entered or exited.
The iterator will first descend to a child node, if there is one.
When there is no child, the iterator will go to the next sibling.
When there is no next sibling, the iterator will return to the parent
(but with an `Event_Type.Exit`).
The iterator will first descend to a child node, if there is one.
When there is no child, the iterator will go to the next sibling.
When there is no next sibling, the iterator will return to the parent
(but with an `Event_Type.Exit`).
The iterator will return `.Done` when it reaches the root node again.
The iterator will return `.Done` when it reaches the root node again.
One natural application is an HTML renderer, where an `.Enter` event
outputs an open tag and an `.Exit` event outputs a close tag.
One natural application is an HTML renderer, where an `.Enter` event
outputs an open tag and an `.Exit` event outputs a close tag.
An iterator might also be used to transform an AST in some systematic
way, for example, turning all level-3 headings into regular paragraphs.
An iterator might also be used to transform an AST in some systematic
way, for example, turning all level-3 headings into regular paragraphs.
```odin
usage_example(root: ^Node) {
ev_type: Event_Type
iter := iter_new(root)
@@ -98,20 +85,20 @@ package vendor_commonmark
// Do something with `cur` and `ev_type`
}
}
```
Iterators will never return `.Exit` events for leaf nodes,
which are nodes of type:
Iterators will never return `.Exit` events for leaf nodes,
which are nodes of type:
* HTML_Block
* Thematic_Break
* Code_Block
* Text
* Soft_Break
* Line_Break
* Code
* HTML_Inline
* HTML_Block
* Thematic_Break
* Code_Block
* Text
* Soft_Break
* Line_Break
* Code
* HTML_Inline
Nodes must only be modified after an `.Exit` event, or an `.Enter` event for
leaf nodes.
*/
Nodes must only be modified after an `.Exit` event, or an `.Enter` event for
leaf nodes.
*/
package vendor_commonmark
+1
View File
@@ -1,3 +1,4 @@
// Bindings for [[ Direct3D 11 ; https://learn.microsoft.com/en-us/windows/win32/direct3d11/atoc-dx-graphics-direct3d-11 ]].
package directx_d3d11
foreign import "system:d3d11.lib"
+1
View File
@@ -1,3 +1,4 @@
// Bindings for [[ Direct3D 12 ; https://learn.microsoft.com/en-us/windows/win32/direct3d12/direct3d-12-graphics ]].
package directx_d3d12
foreign import "system:d3d12.lib"
+1
View File
@@ -1,3 +1,4 @@
// Bindings for [[ Direct3D Shader Compiler ; https://learn.microsoft.com/en-us/windows/win32/api/d3dcompiler/ ]].
package directx_d3d_compiler
foreign import d3dcompiler "d3dcompiler_47.lib"
+1
View File
@@ -1,3 +1,4 @@
// Bindings for [[ DXC ; https://learn.microsoft.com/en-us/windows/win32/api/dxcapi/ ]].
package directx_dxc
when ODIN_OS == .Windows {
+1
View File
@@ -1,3 +1,4 @@
// Bindings for [[ DXGI ; https://learn.microsoft.com/en-us/windows/win32/api/dxgi/ ]].
package directx_dxgi
foreign import dxgi {
+1
View File
@@ -1,3 +1,4 @@
// Bindings for [[ EGL ; https://registry.khronos.org/EGL/sdk/docs/man/html/eglIntro.xhtml ]].
#+build linux
package egl
+1
View File
@@ -1,3 +1,4 @@
// An Odin-native source port of [[ Fontstash ; https://github.com/memononen/fontstash ]].
#+vet !using-param
package fontstash
+2
View File
@@ -1,4 +1,6 @@
/*
Bindings for [[ GGPO ; https://www.ggpo.net ]] rollback networking.
Created in 2009, the GGPO networking SDK pioneered the use of rollback networking in peer-to-peer games.
It's designed specifically to hide network latency in fast paced, twitch style games which require very
precise inputs and frame perfect execution.
+1
View File
@@ -1,3 +1,4 @@
// Bindings for [[ GLFW ; https://www.glfw.org ]]
package glfw
import glfw "bindings"
+1
View File
@@ -1,3 +1,4 @@
// Bindings for [[ Jimmy Lefevre's Text Shape ; https://github.com/JimmyLefevre/kb ]] Unicode text segmentation and OpenType shaping.
package vendor_kb_text_shape
when ODIN_OS == .Windows {
+1
View File
@@ -1,3 +1,4 @@
// A (very small) subset of a libc implementation over Odin libraries for use with `vendor:*` packages.
package odin_libc
import "base:intrinsics"
+1
View File
@@ -1,3 +1,4 @@
// Bindings for [[ Lua 5.1 ; https://www.lua.org/manual/5.1/ ]].
package lua_5_1
import "base:intrinsics"
+1
View File
@@ -1,3 +1,4 @@
// Bindings for [[ Lua 5.2 ; https://www.lua.org/manual/5.2/ ]].
package lua_5_2
import "base:intrinsics"
+1
View File
@@ -1,3 +1,4 @@
// Bindings for [[ Lua 5.3 ; https://www.lua.org/manual/5.3/ ]].
package lua_5_3
import "base:intrinsics"
+1
View File
@@ -1,3 +1,4 @@
// Bindings for [[ Lua 5.4 ; https://www.lua.org/manual/5.4/ ]].
package lua_5_4
import "base:intrinsics"
+2 -1
View File
@@ -1,4 +1,6 @@
/*
An Odin-native source port of [[ rxi's microui ; https://github.com/rxi/microui ]] immediate mode UI.
** Original work: Copyright (c) 2020 rxi
** Modified work: Copyright (c) 2020 oskarnp
** Modified work: Copyright (c) 2021 gingerBill
@@ -21,7 +23,6 @@
** FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
** IN THE SOFTWARE.
*/
package microui
import "core:fmt"
+4 -5
View File
@@ -1,7 +1,7 @@
package miniaudio
/*
Audio playback and capture library. Choice of public domain or MIT-0. See license statements at the end of this file.
Bindings for [[ miniaudio ; https://miniaud.io/docs ]] audio playback and capture library.
Choice of public domain or MIT-0. See license statements at the end of this file.
miniaudio - v0.11.21 - 2023-11-15
David Reid - mackron@gmail.com
@@ -9,9 +9,7 @@ David Reid - mackron@gmail.com
Website: https://miniaud.io
Documentation: https://miniaud.io/docs
GitHub: https://github.com/mackron/miniaudio
*/
/*
1. Introduction
===============
miniaudio is a single file library for audio playback and capture. To use it, do the following in
@@ -3736,3 +3734,4 @@ See below for some tips on improving performance.
- When compiling with VC6 and earlier, decoding is restricted to files less than 2GB in size. This
is due to 64-bit file APIs not being available.
*/
package miniaudio
+1
View File
@@ -1,3 +1,4 @@
// An Odin-native source port of [[ nanovg ; https://github.com/memononen/nanovg ]]'s GL backend.
#+build windows, linux, darwin
package nanovg_gl
+1
View File
@@ -1,3 +1,4 @@
// An Odin-native source port of [[ nanovg ; https://github.com/memononen/nanovg ]].
#+build windows, linux, darwin
package nanovg
+1
View File
@@ -1,3 +1,4 @@
// Bindings for [[ PortMidi ; http://sourceforge.net/projects/portmedia ]] Portable Real-Time MIDI Library.
package portmidi
/*
+1 -1
View File
@@ -1,5 +1,5 @@
/*
Package vendor:raylib implements bindings for version 5.5 of the raylib library (https://www.raylib.com/)
Bindings for [[ raylib v5.5 ; https://www.raylib.com ]].
*********************************************************************************************
*
+1
View File
@@ -1,3 +1,4 @@
// Bindings for [[ SDL2 Image; https://wiki.libsdl.org/SDL2/FrontPage ]].
package sdl2_image
import "core:c"
+1
View File
@@ -1,3 +1,4 @@
// Bindings for [[ SDL2 Mixer ; https://wiki.libsdl.org/SDL2/FrontPage ]].
package sdl2_mixer
import "core:c"
+1
View File
@@ -1,3 +1,4 @@
// Bindings for [[ SDL2 Net ; https://wiki.libsdl.org/SDL2/FrontPage ]].
package sdl2_net
import "core:c"
+1
View File
@@ -1,3 +1,4 @@
// Bindings for [[ SDL2 ; https://wiki.libsdl.org/SDL2/FrontPage ]].
package sdl2
/*
+1
View File
@@ -1,3 +1,4 @@
// Bindings for [[ SDL2 TTF ; https://wiki.libsdl.org/SDL2/FrontPage ]].
package sdl2_ttf
import "core:c"
+1
View File
@@ -1,3 +1,4 @@
// Bindings for [[ SDL3 Image ; https://wiki.libsdl.org/SDL3/FrontPage ]].
package sdl3_image
import "core:c"
+1
View File
@@ -1,3 +1,4 @@
// Bindings for [[ SDL3 ; https://wiki.libsdl.org/SDL3/FrontPage ]].
package sdl3
import "core:c"
+1
View File
@@ -1,3 +1,4 @@
// Bindings for [[ SDL3 TTF ; https://wiki.libsdl.org/SDL3/FrontPage ]].
package sdl3_ttf
import "core:c"
+19 -21
View File
@@ -1,26 +1,7 @@
package stb_easy_font
/*
Source port of stb_easy_font.h
Original port: gingerBill
Bugfixes: Florian Behr & Jeroen van Rijn
Additions: Jeroen van Rijn
Changelog:
2022-04-03
Bug fixes
Add `print(x, y, text, color, quad_buffer)` version that takes `[]quad`.
(Same internal memory layout as []u8 API, but more convenient for the caller.)
Add optional `scale := f32(1.0)` param to `print` to embiggen the glyph quads.
2021-09-14
Original Odin version
*/
/*
// Example for use with vendor:raylib
An Odin-native source port of [[ stb_easy_font.h ; https://github.com/nothings/stb/blob/master/stb_easy_font.h ]].
Example:
quads: [999]easy_font.Quad = ---
color := rl.GREEN
@@ -38,7 +19,24 @@ package stb_easy_font
// And in practice this code will likely not live as close to the `easy_font` call.
rl.DrawRectangleRec(r, color)
}
Changelog:
2022-04-03
Bug fixes
Add `print(x, y, text, color, quad_buffer)` version that takes `[]quad`.
(Same internal memory layout as []u8 API, but more convenient for the caller.)
Add optional `scale := f32(1.0)` param to `print` to embiggen the glyph quads.
2021-09-14
Original Odin version
Credits:
Original port: gingerBill
Bugfixes: Florian Behr & Jeroen van Rijn
Additions: Jeroen van Rijn
*/
package stb_easy_font
import "core:math"
import "core:mem"
+1
View File
@@ -1,3 +1,4 @@
// Bindings for [[ stb_image.h ; https://github.com/nothings/stb/blob/master/stb_image.h ]].
package stb_image
import "core:c"
+1
View File
@@ -1,3 +1,4 @@
// Bindings for [[ stb_rect_pack.h ; https://github.com/nothings/stb/blob/master/stb_rect_pack.h ]].
package stb_rect_pack
import "core:c"
+1
View File
@@ -1,3 +1,4 @@
// Bindings for [[ stb_truetype.h ; https://github.com/nothings/stb/blob/master/stb_truetype.h ]].
package stb_truetype
import c "core:c"
+1
View File
@@ -1,3 +1,4 @@
// Bindings for [[ stb_vorbis.c ; https://github.com/nothings/stb/blob/master/stb_vorbis.c ]].
package stb_vorbis
import c "core:c/libc"
+11 -13
View File
@@ -6,6 +6,13 @@ import string
import os.path
import math
PACKAGE_LINE = "package vulkan"
BASE = """
// Vulkan wrapper generated from [[ vulkan_core.h ; https://raw.githubusercontent.com/KhronosGroup/Vulkan-Headers/master/include/vulkan/vulkan_core.h ]].
"""[1::]
file_and_urls = [
("vk_platform.h", 'https://raw.githubusercontent.com/KhronosGroup/Vulkan-Headers/main/include/vulkan/vk_platform.h', True),
("vulkan_core.h", 'https://raw.githubusercontent.com/KhronosGroup/Vulkan-Headers/main/include/vulkan/vulkan_core.h', False),
@@ -889,18 +896,9 @@ load_proc_addresses :: proc{
}\n
"""[1::])
BASE = """
//
// Vulkan wrapper generated from "https://raw.githubusercontent.com/KhronosGroup/Vulkan-Headers/master/include/vulkan/vulkan_core.h"
//
package vulkan
"""[1::]
with open("../core.odin", 'w', encoding='utf-8') as f:
f.write(BASE)
f.write(PACKAGE_LINE)
f.write("""
// Core API
API_VERSION_1_0 :: (1<<22) | (0<<12) | (0)
@@ -974,13 +972,13 @@ MAKE_VIDEO_STD_VERSION :: MAKE_VERSION
f.write("\n\n")
parse_flags_def(f)
with open("../enums.odin", 'w', encoding='utf-8') as f:
f.write(BASE)
f.write(PACKAGE_LINE)
f.write("\n")
parse_enums(f)
parse_fake_enums(f)
f.write("\n\n")
with open("../structs.odin", 'w', encoding='utf-8') as f:
f.write(BASE)
f.write(PACKAGE_LINE)
f.write("""
import "core:c"
@@ -1041,7 +1039,7 @@ MTLCommandQueue_id :: rawptr
parse_structs(f)
f.write("\n\n")
with open("../procedures.odin", 'w', encoding='utf-8') as f:
f.write(BASE)
f.write(PACKAGE_LINE)
f.write("\n")
parse_procedures(f)
f.write("\n")
+1 -3
View File
@@ -1,6 +1,4 @@
//
// Vulkan wrapper generated from "https://raw.githubusercontent.com/KhronosGroup/Vulkan-Headers/master/include/vulkan/vulkan_core.h"
//
// Vulkan wrapper generated from [[ vulkan_core.h ; https://raw.githubusercontent.com/KhronosGroup/Vulkan-Headers/master/include/vulkan/vulkan_core.h ]].
package vulkan
// Core API
API_VERSION_1_0 :: (1<<22) | (0<<12) | (0)
-3
View File
@@ -1,6 +1,3 @@
//
// Vulkan wrapper generated from "https://raw.githubusercontent.com/KhronosGroup/Vulkan-Headers/master/include/vulkan/vulkan_core.h"
//
package vulkan
import "core:c"
-3
View File
@@ -1,6 +1,3 @@
//
// Vulkan wrapper generated from "https://raw.githubusercontent.com/KhronosGroup/Vulkan-Headers/master/include/vulkan/vulkan_core.h"
//
package vulkan
import "core:c"
-3
View File
@@ -1,6 +1,3 @@
//
// Vulkan wrapper generated from "https://raw.githubusercontent.com/KhronosGroup/Vulkan-Headers/master/include/vulkan/vulkan_core.h"
//
package vulkan
import "core:c"
+2
View File
@@ -0,0 +1,2 @@
// WGPU glue for GLFW.
package wgpu_glfw_glue
+2
View File
@@ -0,0 +1,2 @@
// WGPU glue for SDL2.
package wgpu_sdl2_glue
+2
View File
@@ -0,0 +1,2 @@
// WGPU glue for SDL3.
package wgpu_sdl3_glue
+6
View File
@@ -0,0 +1,6 @@
/*
Bindings for [[ Windows Game Input GDK ; https://learn.microsoft.com/en-us/gaming/gdk/_content/gc/input/overviews/input-overview ]].
Windows SDK 10.0.26100.0 is at least required to link with.
*/
package windows_game_input
+6
View File
@@ -0,0 +1,6 @@
/*
Bindings for [[ Windows XAudio2 ; https://learn.microsoft.com/en-us/windows/win32/xaudio2/xaudio2-introduction ]].
Compiling for Windows 10 RS5 (1809) and later
*/
package windows_xaudio2
+1
View File
@@ -1,3 +1,4 @@
// Bindings for [[ X11's Xlib (PDF) ; https://www.x.org/docs/X11/xlib.pdf ]].
package xlib
// Value, specifying whether `vendor:x11/xlib` is available on the current platform.
+1
View File
@@ -1,3 +1,4 @@
// Bindings for [[ libz ; https://zlib.net ]] ZLIB compression library.
package vendor_zlib
import "core:c"