merge: issue/0026 — gl_texture_load (stb_image)
# Conflicts: # cpp/CMakeLists.txt
This commit is contained in:
Vendored
+27
@@ -0,0 +1,27 @@
|
||||
# stb (vendored)
|
||||
|
||||
Cabeceras header-only de [nothings/stb](https://github.com/nothings/stb), dominio publico (MIT-0 / unlicense).
|
||||
|
||||
## Pinned
|
||||
|
||||
- `stb_image.h` — v2.30 — commit `f0569113c93ad095470c54bf34a17b36646bbbb5`
|
||||
- Source: https://raw.githubusercontent.com/nothings/stb/f0569113c93ad095470c54bf34a17b36646bbbb5/stb_image.h
|
||||
|
||||
## Layout
|
||||
|
||||
- `stb_image.h` — header de stb (no modificar).
|
||||
- `stb_image_impl.cpp` — UNICO traductor de la implementacion. Define `STB_IMAGE_IMPLEMENTATION` antes del include para que el cuerpo de stb_image se emita una sola vez en todo el binario.
|
||||
|
||||
## Uso
|
||||
|
||||
Incluir `<stb_image.h>` desde cualquier .cpp del proyecto **sin** definir `STB_IMAGE_IMPLEMENTATION`. Solo `stb_image_impl.cpp` define el simbolo, evitando duplicados al linkar.
|
||||
|
||||
Las funciones del registry que envuelven stb_image viven en `cpp/functions/gfx/` (p.ej. `gl_texture_load`).
|
||||
|
||||
## Actualizar
|
||||
|
||||
```bash
|
||||
cd cpp/vendor/stb
|
||||
curl -L -o stb_image.h https://raw.githubusercontent.com/nothings/stb/<COMMIT>/stb_image.h
|
||||
# Actualizar el commit en este README.
|
||||
```
|
||||
Vendored
+7988
File diff suppressed because it is too large
Load Diff
Vendored
+4
@@ -0,0 +1,4 @@
|
||||
// Single TU that materializa la implementacion de stb_image (header-only).
|
||||
// Cualquier otro .cpp que incluya stb_image.h NO debe definir STB_IMAGE_IMPLEMENTATION.
|
||||
#define STB_IMAGE_IMPLEMENTATION
|
||||
#include "stb_image.h"
|
||||
Reference in New Issue
Block a user