Commit Graph

29 Commits

Author SHA1 Message Date
ikarus 9e5677ab02 add missing fields to fontinfo 2023-05-20 20:07:41 +07:00
William Roe 8a822bdd9a Update stb macOS libraries to be universal
This updates all the darwin stb libraries to be built as universal
libraries - meaning they contain both Intel and Apple Silicon versions.
This should make these more generally compatible.

Also, add stb_vorbis.a in the same way. Not sure why it was missing
before.
2022-12-23 23:15:14 +00:00
William Roe d1a3842e39 Add Darwin-target for building vendor/stb macos universal libs
This Darwin-specific target builds each stb library with macOS-specific
options so that the results are universal static libraries that should
work on Intel (x86_64) and Apple Silicon (arm64) machines. They also
should work on macOS 10.12 and above (which should match what Odin
compiles for).

The default Makefile target will build the darwin rule if its invoked on
a macOS machine, otherwise it'll invoke the more general unix target.
2022-12-23 23:15:14 +00:00
Julian Ceipek ee89c0458f Fix STB lib import references on ODIN_OS == .Darwin 2022-10-29 22:19:01 -04:00
ray.garner d6f84887ff Fix darwin libs for vendor stbi 2022-09-18 21:35:13 +09:00
Jeroen van Rijn 674ebe395f Merge branch 'master' into master 2022-07-28 16:01:18 +02:00
pvance 9746e25784 Update stb_image_resize.odin 2022-07-28 04:27:42 -04:00
pvance 21f2c06f4b Update stb_image_resize.odin 2022-07-28 04:25:18 -04:00
pvance 727a25f41f Replace ODIN_OS strings with enum values 2022-07-28 04:23:24 -04:00
pvance 3f27cb2309 replace ODIN_OS string with enums 2022-07-28 04:22:00 -04:00
pvance f213622982 replace ODIN_OS string with enums 2022-07-28 04:20:37 -04:00
Jeroen van Rijn 233b32fd3e Correct return value. 2022-05-25 00:47:29 +02:00
Jeroen van Rijn 376327c87b [vendor:easy_font] API improvements.
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.

```odin
	// Example for use with vendor:raylib

	quads: [999]easy_font.Quad = ---

	color := rl.GREEN
	c     := transmute(easy_font.Color)color
	num_quads := easy_font.print(10, 60, TEXT, c, quads[:])

	for q in quads[:num_quads] {
		tl    := q.tl.v
		br    := q.br.v
		color  = transmute(rl.Color)q.tl.c

		r := rl.Rectangle{x = tl.x, y = tl.y, width = br.x - tl.x, height = br.y - tl.y}

		// Yes, we could just use the `color` from above, but this shows how to get it back from the vertex.
		// And in practice this code will likely not live as close to the `easy_font` call.
		rl.DrawRectangleRec(r, color)
	}
```
2022-04-03 18:53:27 +02:00
Florian Behr f4daf46ff4 Fixes for stb_easy_font 2022-04-03 15:18:01 +02:00
Wes Hardee f89ebce807 Add foreign imports for Darwin to vendor:stb 2022-03-22 15:55:37 -05:00
Sébastien Marie f126e05034 stb, miniaudio: use default builtin variables of make for CC and AR 2022-03-03 07:36:47 +00:00
Tail Wag Games d4f62f52db adding is_16_bit_from_memory to stbi 2022-02-24 00:20:15 -06:00
phillvancejr 42364f2fce sync with main 2022-02-04 13:16:40 -05:00
phillvancejr 8f600798ef stb_image 2022-02-04 13:03:20 -05:00
gingerBill 3d7d347192 Convert ODIN_OS and ODIN_ARCH to use enums rather than use strings 2022-01-20 19:56:05 +00:00
gingerBill 00597127dd Add missing field skip_missing 2021-11-24 16:39:29 +00:00
skytrias 9ceb6b79fd small package fixes 2021-09-29 21:47:36 +02:00
gingerBill 736a763859 Add stb libs for Windows directly 2021-09-15 14:30:11 +01:00
gingerBill 2e21312059 Remove -march=native from stb/src/Makefile 2021-09-15 14:09:12 +01:00
gingerBill e7ea09a93b Add vendor:stb/vorbis 2021-09-14 22:35:22 +01:00
gingerBill 6f182ae5ae Add vendor:stb/easy_font -- source port of stb_easy_font.h 2021-09-14 22:12:23 +01:00
gingerBill cb2437959c Add stb_image_resize to vendor:stb/image 2021-09-14 21:44:26 +01:00
gingerBill da14292369 Minor corrections to stb_truetype.odin 2021-09-14 18:22:04 +01:00
gingerBill 7189625cf5 Add stb libraries (image+image_write, rect_pack, truetype) 2021-09-14 17:54:50 +01:00