Updated stb external libraries
This commit is contained in:
parent
3b120bd7d9
commit
7cd24d2706
905
src/external/stb_image.h
vendored
905
src/external/stb_image.h
vendored
File diff suppressed because it is too large
Load Diff
8
src/external/stb_image_resize.h
vendored
8
src/external/stb_image_resize.h
vendored
@ -1,4 +1,4 @@
|
|||||||
/* stb_image_resize - v0.91 - public domain image resizing
|
/* stb_image_resize - v0.92 - public domain image resizing
|
||||||
by Jorge L Rodriguez (@VinoBS) - 2014
|
by Jorge L Rodriguez (@VinoBS) - 2014
|
||||||
http://github.com/nothings/stb
|
http://github.com/nothings/stb
|
||||||
|
|
||||||
@ -154,8 +154,10 @@
|
|||||||
|
|
||||||
ADDITIONAL CONTRIBUTORS
|
ADDITIONAL CONTRIBUTORS
|
||||||
Sean Barrett: API design, optimizations
|
Sean Barrett: API design, optimizations
|
||||||
|
Aras Pranckevicius: bugfix
|
||||||
|
|
||||||
REVISIONS
|
REVISIONS
|
||||||
|
0.92 (2017-01-02) fix integer overflow on large (>2GB) images
|
||||||
0.91 (2016-04-02) fix warnings; fix handling of subpixel regions
|
0.91 (2016-04-02) fix warnings; fix handling of subpixel regions
|
||||||
0.90 (2014-09-17) first released version
|
0.90 (2014-09-17) first released version
|
||||||
|
|
||||||
@ -1239,11 +1241,11 @@ static void stbir__decode_scanline(stbir__info* stbir_info, int n)
|
|||||||
int type = stbir_info->type;
|
int type = stbir_info->type;
|
||||||
int colorspace = stbir_info->colorspace;
|
int colorspace = stbir_info->colorspace;
|
||||||
int input_w = stbir_info->input_w;
|
int input_w = stbir_info->input_w;
|
||||||
int input_stride_bytes = stbir_info->input_stride_bytes;
|
size_t input_stride_bytes = stbir_info->input_stride_bytes;
|
||||||
float* decode_buffer = stbir__get_decode_buffer(stbir_info);
|
float* decode_buffer = stbir__get_decode_buffer(stbir_info);
|
||||||
stbir_edge edge_horizontal = stbir_info->edge_horizontal;
|
stbir_edge edge_horizontal = stbir_info->edge_horizontal;
|
||||||
stbir_edge edge_vertical = stbir_info->edge_vertical;
|
stbir_edge edge_vertical = stbir_info->edge_vertical;
|
||||||
int in_buffer_row_offset = stbir__edge_wrap(edge_vertical, n, stbir_info->input_h) * input_stride_bytes;
|
size_t in_buffer_row_offset = stbir__edge_wrap(edge_vertical, n, stbir_info->input_h) * input_stride_bytes;
|
||||||
const void* input_data = (char *) stbir_info->input_data + in_buffer_row_offset;
|
const void* input_data = (char *) stbir_info->input_data + in_buffer_row_offset;
|
||||||
int max_x = input_w + stbir_info->horizontal_filter_pixel_margin;
|
int max_x = input_w + stbir_info->horizontal_filter_pixel_margin;
|
||||||
int decode = STBIR__DECODE(type, colorspace);
|
int decode = STBIR__DECODE(type, colorspace);
|
||||||
|
5
src/external/stb_image_write.h
vendored
5
src/external/stb_image_write.h
vendored
@ -1,4 +1,4 @@
|
|||||||
/* stb_image_write - v1.02 - public domain - http://nothings.org/stb/stb_image_write.h
|
/* stb_image_write - v1.03 - public domain - http://nothings.org/stb/stb_image_write.h
|
||||||
writes out PNG/BMP/TGA images to C stdio - Sean Barrett 2010-2015
|
writes out PNG/BMP/TGA images to C stdio - Sean Barrett 2010-2015
|
||||||
no warranty implied; use at your own risk
|
no warranty implied; use at your own risk
|
||||||
|
|
||||||
@ -103,6 +103,7 @@ CREDITS:
|
|||||||
Jonas Karlsson
|
Jonas Karlsson
|
||||||
Filip Wasil
|
Filip Wasil
|
||||||
Thatcher Ulrich
|
Thatcher Ulrich
|
||||||
|
github:poppolopoppo
|
||||||
|
|
||||||
LICENSE
|
LICENSE
|
||||||
|
|
||||||
@ -475,7 +476,6 @@ int stbi_write_tga(char const *filename, int x, int y, int comp, const void *dat
|
|||||||
// *************************************************************************************************
|
// *************************************************************************************************
|
||||||
// Radiance RGBE HDR writer
|
// Radiance RGBE HDR writer
|
||||||
// by Baldur Karlsson
|
// by Baldur Karlsson
|
||||||
#ifndef STBI_WRITE_NO_STDIO
|
|
||||||
|
|
||||||
#define stbiw__max(a, b) ((a) > (b) ? (a) : (b))
|
#define stbiw__max(a, b) ((a) > (b) ? (a) : (b))
|
||||||
|
|
||||||
@ -630,6 +630,7 @@ int stbi_write_hdr_to_func(stbi_write_func *func, void *context, int x, int y, i
|
|||||||
return stbi_write_hdr_core(&s, x, y, comp, (float *) data);
|
return stbi_write_hdr_core(&s, x, y, comp, (float *) data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef STBI_WRITE_NO_STDIO
|
||||||
int stbi_write_hdr(char const *filename, int x, int y, int comp, const float *data)
|
int stbi_write_hdr(char const *filename, int x, int y, int comp, const float *data)
|
||||||
{
|
{
|
||||||
stbi__write_context s;
|
stbi__write_context s;
|
||||||
|
29
src/external/stb_rect_pack.h
vendored
29
src/external/stb_rect_pack.h
vendored
@ -1,4 +1,4 @@
|
|||||||
// stb_rect_pack.h - v0.08 - public domain - rectangle packing
|
// stb_rect_pack.h - v0.10 - public domain - rectangle packing
|
||||||
// Sean Barrett 2014
|
// Sean Barrett 2014
|
||||||
//
|
//
|
||||||
// Useful for e.g. packing rectangular textures into an atlas.
|
// Useful for e.g. packing rectangular textures into an atlas.
|
||||||
@ -32,6 +32,8 @@
|
|||||||
//
|
//
|
||||||
// Version history:
|
// Version history:
|
||||||
//
|
//
|
||||||
|
// 0.10 (2016-10-25) remove cast-away-const to avoid warnings
|
||||||
|
// 0.09 (2016-08-27) fix compiler warnings
|
||||||
// 0.08 (2015-09-13) really fix bug with empty rects (w=0 or h=0)
|
// 0.08 (2015-09-13) really fix bug with empty rects (w=0 or h=0)
|
||||||
// 0.07 (2015-09-13) fix bug with empty rects (w=0 or h=0)
|
// 0.07 (2015-09-13) fix bug with empty rects (w=0 or h=0)
|
||||||
// 0.06 (2015-04-15) added STBRP_SORT to allow replacing qsort
|
// 0.06 (2015-04-15) added STBRP_SORT to allow replacing qsort
|
||||||
@ -148,7 +150,7 @@ enum
|
|||||||
{
|
{
|
||||||
STBRP_HEURISTIC_Skyline_default=0,
|
STBRP_HEURISTIC_Skyline_default=0,
|
||||||
STBRP_HEURISTIC_Skyline_BL_sortHeight = STBRP_HEURISTIC_Skyline_default,
|
STBRP_HEURISTIC_Skyline_BL_sortHeight = STBRP_HEURISTIC_Skyline_default,
|
||||||
STBRP_HEURISTIC_Skyline_BF_sortHeight,
|
STBRP_HEURISTIC_Skyline_BF_sortHeight
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -198,9 +200,15 @@ struct stbrp_context
|
|||||||
#define STBRP_ASSERT assert
|
#define STBRP_ASSERT assert
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#define STBRP__NOTUSED(v) (void)(v)
|
||||||
|
#else
|
||||||
|
#define STBRP__NOTUSED(v) (void)sizeof(v)
|
||||||
|
#endif
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
STBRP__INIT_skyline = 1,
|
STBRP__INIT_skyline = 1
|
||||||
};
|
};
|
||||||
|
|
||||||
STBRP_DEF void stbrp_setup_heuristic(stbrp_context *context, int heuristic)
|
STBRP_DEF void stbrp_setup_heuristic(stbrp_context *context, int heuristic)
|
||||||
@ -273,6 +281,9 @@ static int stbrp__skyline_find_min_y(stbrp_context *c, stbrp_node *first, int x0
|
|||||||
stbrp_node *node = first;
|
stbrp_node *node = first;
|
||||||
int x1 = x0 + width;
|
int x1 = x0 + width;
|
||||||
int min_y, visited_width, waste_area;
|
int min_y, visited_width, waste_area;
|
||||||
|
|
||||||
|
STBRP__NOTUSED(c);
|
||||||
|
|
||||||
STBRP_ASSERT(first->x <= x0);
|
STBRP_ASSERT(first->x <= x0);
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
@ -500,8 +511,8 @@ static stbrp__findresult stbrp__skyline_pack_rectangle(stbrp_context *context, i
|
|||||||
|
|
||||||
static int rect_height_compare(const void *a, const void *b)
|
static int rect_height_compare(const void *a, const void *b)
|
||||||
{
|
{
|
||||||
stbrp_rect *p = (stbrp_rect *) a;
|
const stbrp_rect *p = (const stbrp_rect *) a;
|
||||||
stbrp_rect *q = (stbrp_rect *) b;
|
const stbrp_rect *q = (const stbrp_rect *) b;
|
||||||
if (p->h > q->h)
|
if (p->h > q->h)
|
||||||
return -1;
|
return -1;
|
||||||
if (p->h < q->h)
|
if (p->h < q->h)
|
||||||
@ -511,8 +522,8 @@ static int rect_height_compare(const void *a, const void *b)
|
|||||||
|
|
||||||
static int rect_width_compare(const void *a, const void *b)
|
static int rect_width_compare(const void *a, const void *b)
|
||||||
{
|
{
|
||||||
stbrp_rect *p = (stbrp_rect *) a;
|
const stbrp_rect *p = (const stbrp_rect *) a;
|
||||||
stbrp_rect *q = (stbrp_rect *) b;
|
const stbrp_rect *q = (const stbrp_rect *) b;
|
||||||
if (p->w > q->w)
|
if (p->w > q->w)
|
||||||
return -1;
|
return -1;
|
||||||
if (p->w < q->w)
|
if (p->w < q->w)
|
||||||
@ -522,8 +533,8 @@ static int rect_width_compare(const void *a, const void *b)
|
|||||||
|
|
||||||
static int rect_original_order(const void *a, const void *b)
|
static int rect_original_order(const void *a, const void *b)
|
||||||
{
|
{
|
||||||
stbrp_rect *p = (stbrp_rect *) a;
|
const stbrp_rect *p = (const stbrp_rect *) a;
|
||||||
stbrp_rect *q = (stbrp_rect *) b;
|
const stbrp_rect *q = (const stbrp_rect *) b;
|
||||||
return (p->was_packed < q->was_packed) ? -1 : (p->was_packed > q->was_packed);
|
return (p->was_packed < q->was_packed) ? -1 : (p->was_packed > q->was_packed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
857
src/external/stb_truetype.h
vendored
857
src/external/stb_truetype.h
vendored
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user