Skip to content

Commit 21cceab

Browse files
committed
sokol_framebuffer.h: add C++ function overrides
1 parent 2348ac5 commit 21cceab

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

util/sokol_framebuffer.h

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -252,15 +252,12 @@ SOKOL_FRAMEBUFFER_API_DECL sfb_framebuffer_info sfb_query_framebuffer_info(sfb_f
252252
// query the framebuffer desc, with default values patched in
253253
SOKOL_FRAMEBUFFER_API_DECL sfb_framebuffer_desc sfb_query_framebuffer_desc(sfb_framebuffer fb);
254254

255-
// helper function to create packed RGBA8 uint32_t from floats (useful for palette updates)
256-
SOKOL_FRAMEBUFFER_API_DECL uint32_t sfb_color_f32(float r, float g, float b, float a);
257-
// helper function to create packed RGBA8 uint32_t from uint8_t's (usefule for palette updates)
258-
SOKOL_FRAMEBUFFER_API_DECL uint32_t sfb_color_u8(uint8_t r, uint8_t g, uint8_t b, uint8_t a);
259-
260-
// FIXME: C++ overloads
261-
262255
#ifdef __cplusplus
263256
} // extern "C"
257+
inline void sfb_setup(const sfb_desc& desc) { return sfb_setup(&desc); }
258+
inline void sfb_make_framebuffer(const sfb_framebuffer_desc& desc) { return sfb_make_framebuffer(&desc); }
259+
inline void sfb_update(sfb_framebuffer fb, const sfb_update_desc& desc) { return sfb_update(fb, &desc); }
260+
inline void sfb_render_ex(sfb_framebuffer fb, const sfb_render_overrides& overrides) { return sfb_render_ex(fb, &overrides); }
264261
#endif
265262
#endif // SOKOL_FRAMEBUFFER_INCLUDED
266263

0 commit comments

Comments
 (0)