KarmaEngine
Game Engine for practical learning and research purposes
Loading...
Searching...
No Matches
imstb_rectpack.h File Reference

Useful for e.g. packing rectangular textures into an atlas. Does not do rotation. More...

#include <stdlib.h>
#include <assert.h>
Include dependency graph for imstb_rectpack.h:

Go to the source code of this file.

Classes

struct  stbrp_rect
 
struct  stbrp_node
 
struct  stbrp_context
 
struct  stbrp__findresult
 

Macros

#define STB_RECT_PACK_VERSION   1
 
#define STBRP_DEF   extern
 
#define STBRP__MAXVAL   0x7fffffff
 
#define STBRP_SORT   qsort
 
#define STBRP_ASSERT   assert
 
#define STBRP__NOTUSED(v)
 
#define STBRP__CDECL
 

Typedefs

typedef struct stbrp_context stbrp_context
 
typedef struct stbrp_node stbrp_node
 
typedef struct stbrp_rect stbrp_rect
 
typedef int stbrp_coord
 

Enumerations

enum  { STBRP_HEURISTIC_Skyline_default = 0 , STBRP_HEURISTIC_Skyline_BL_sortHeight = STBRP_HEURISTIC_Skyline_default , STBRP_HEURISTIC_Skyline_BF_sortHeight }
 
enum  { STBRP__INIT_skyline = 1 }
 

Functions

STBRP_DEF int stbrp_pack_rects (stbrp_context *context, stbrp_rect *rects, int num_rects)
 
STBRP_DEF void stbrp_init_target (stbrp_context *context, int width, int height, stbrp_node *nodes, int num_nodes)
 
STBRP_DEF void stbrp_setup_allow_out_of_mem (stbrp_context *context, int allow_out_of_mem)
 
STBRP_DEF void stbrp_setup_heuristic (stbrp_context *context, int heuristic)
 

Detailed Description

Useful for e.g. packing rectangular textures into an atlas. Does not do rotation.

Author
Ravi Mohan (the_cowboy)
Version
1.0
Date
January 24, 2023

Macro Definition Documentation

◆ STBRP__NOTUSED

#define STBRP__NOTUSED ( v)
Value:
(void)sizeof(v)