summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/bgfx/include/bgfx/c99/bgfx.h
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/bgfx/include/bgfx/c99/bgfx.h')
-rw-r--r--3rdparty/bgfx/include/bgfx/c99/bgfx.h55
1 files changed, 34 insertions, 21 deletions
diff --git a/3rdparty/bgfx/include/bgfx/c99/bgfx.h b/3rdparty/bgfx/include/bgfx/c99/bgfx.h
index 04693244174..7cc5ee5229d 100644
--- a/3rdparty/bgfx/include/bgfx/c99/bgfx.h
+++ b/3rdparty/bgfx/include/bgfx/c99/bgfx.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2011-2016 Branimir Karadzic. All rights reserved.
+ * Copyright 2011-2017 Branimir Karadzic. All rights reserved.
* License: https://github.com/bkaradzic/bgfx/blob/master/LICENSE
*
* vim: set tabstop=4 expandtab:
@@ -39,7 +39,7 @@
# define BGFX_C_API BGFX_SHARED_LIB_API
#endif // defined(__cplusplus)
-#include <bgfx/bgfxdefines.h>
+#include <bgfx/defines.h>
typedef enum bgfx_renderer_type
{
@@ -329,6 +329,16 @@ typedef struct bgfx_stats
int64_t waitRender;
int64_t waitSubmit;
+
+ uint32_t numDraw;
+ uint32_t numCompute;
+ uint32_t maxGpuLatency;
+
+ uint16_t width;
+ uint16_t height;
+ uint16_t textWidth;
+ uint16_t textHeight;
+
} bgfx_stats_t;
/**/
@@ -391,6 +401,15 @@ typedef struct bgfx_texture_info
} bgfx_texture_info_t;
/**/
+typedef struct bgfx_uniform_info
+{
+ char name[256];
+ bgfx_uniform_type_t type;
+ uint16_t num;
+
+} bgfx_uniform_info_t;
+
+/**/
typedef struct bgfx_attachment
{
bgfx_texture_handle_t handle;
@@ -629,16 +648,13 @@ BGFX_C_API void bgfx_update_dynamic_vertex_buffer(bgfx_dynamic_vertex_buffer_han
BGFX_C_API void bgfx_destroy_dynamic_vertex_buffer(bgfx_dynamic_vertex_buffer_handle_t _handle);
/**/
-BGFX_C_API bool bgfx_check_avail_transient_index_buffer(uint32_t _num);
+BGFX_C_API uint32_t bgfx_get_avail_transient_index_buffer(uint32_t _num);
/**/
-BGFX_C_API bool bgfx_check_avail_transient_vertex_buffer(uint32_t _num, const bgfx_vertex_decl_t* _decl);
+BGFX_C_API uint32_t bgfx_get_avail_transient_vertex_buffer(uint32_t _num, const bgfx_vertex_decl_t* _decl);
/**/
-BGFX_C_API bool bgfx_check_avail_instance_data_buffer(uint32_t _num, uint16_t _stride);
-
-/**/
-BGFX_C_API bool bgfx_check_avail_transient_buffers(uint32_t _numVertices, const bgfx_vertex_decl_t* _decl, uint32_t _numIndices);
+BGFX_C_API uint32_t bgfx_get_avail_instance_data_buffer(uint32_t _num, uint16_t _stride);
/**/
BGFX_C_API void bgfx_alloc_transient_index_buffer(bgfx_transient_index_buffer_t* _tib, uint32_t _num);
@@ -665,6 +681,9 @@ BGFX_C_API bgfx_shader_handle_t bgfx_create_shader(const bgfx_memory_t* _mem);
BGFX_C_API uint16_t bgfx_get_shader_uniforms(bgfx_shader_handle_t _handle, bgfx_uniform_handle_t* _uniforms, uint16_t _max);
/**/
+BGFX_C_API void bgfx_get_uniform_info(bgfx_uniform_handle_t _handle, bgfx_uniform_info_t* _info);
+
+/**/
BGFX_C_API void bgfx_destroy_shader(bgfx_shader_handle_t _handle);
/**/
@@ -677,6 +696,9 @@ BGFX_C_API bgfx_program_handle_t bgfx_create_compute_program(bgfx_shader_handle_
BGFX_C_API void bgfx_destroy_program(bgfx_program_handle_t _handle);
/**/
+BGFX_C_API bool bgfx_is_texture_valid(uint16_t _depth, bool _cubeMap, uint16_t _numLayers, bgfx_texture_format_t _format, uint32_t _flags);
+
+/**/
BGFX_C_API void bgfx_calc_texture_size(bgfx_texture_info_t* _info, uint16_t _width, uint16_t _height, uint16_t _depth, bool _cubeMap, bool _hasMips, uint16_t _numLayers, bgfx_texture_format_t _format);
/**/
@@ -707,9 +729,6 @@ BGFX_C_API void bgfx_update_texture_cube(bgfx_texture_handle_t _handle, uint16_t
BGFX_C_API uint32_t bgfx_read_texture(bgfx_texture_handle_t _handle, void* _data, uint8_t _mip);
/**/
-BGFX_C_API uint32_t bgfx_read_frame_buffer(bgfx_frame_buffer_handle_t _handle, uint8_t _attachment, void* _data);
-
-/**/
BGFX_C_API void bgfx_destroy_texture(bgfx_texture_handle_t _handle);
/**/
@@ -728,6 +747,9 @@ BGFX_C_API bgfx_frame_buffer_handle_t bgfx_create_frame_buffer_from_attachment(u
BGFX_C_API bgfx_frame_buffer_handle_t bgfx_create_frame_buffer_from_nwh(void* _nwh, uint16_t _width, uint16_t _height, bgfx_texture_format_t _depthFormat);
/**/
+BGFX_C_API bgfx_texture_handle_t bgfx_get_texture(bgfx_frame_buffer_handle_t _handle, uint8_t _attachment);
+
+/**/
BGFX_C_API void bgfx_destroy_frame_buffer(bgfx_frame_buffer_handle_t _handle);
/**/
@@ -779,7 +801,7 @@ BGFX_C_API void bgfx_set_view_transform(uint8_t _id, const void* _view, const vo
BGFX_C_API void bgfx_set_view_transform_stereo(uint8_t _id, const void* _view, const void* _projL, uint8_t _flags, const void* _projR);
/**/
-BGFX_C_API void bgfx_set_view_remap(uint8_t _id, uint8_t _num, const void* _remap);
+BGFX_C_API void bgfx_set_view_order(uint8_t _id, uint8_t _num, const void* _order);
/**/
BGFX_C_API void bgfx_reset_view(uint8_t _id);
@@ -845,9 +867,6 @@ BGFX_C_API void bgfx_set_instance_data_from_dynamic_vertex_buffer(bgfx_dynamic_v
BGFX_C_API void bgfx_set_texture(uint8_t _stage, bgfx_uniform_handle_t _sampler, bgfx_texture_handle_t _handle, uint32_t _flags);
/**/
-BGFX_C_API void bgfx_set_texture_from_frame_buffer(uint8_t _stage, bgfx_uniform_handle_t _sampler, bgfx_frame_buffer_handle_t _handle, uint8_t _attachment, uint32_t _flags);
-
-/**/
BGFX_C_API uint32_t bgfx_touch(uint8_t _id);
/**/
@@ -863,9 +882,6 @@ BGFX_C_API uint32_t bgfx_submit_indirect(uint8_t _id, bgfx_program_handle_t _han
BGFX_C_API void bgfx_set_image(uint8_t _stage, bgfx_uniform_handle_t _sampler, bgfx_texture_handle_t _handle, uint8_t _mip, bgfx_access_t _access, bgfx_texture_format_t _format);
/**/
-BGFX_C_API void bgfx_set_image_from_frame_buffer(uint8_t _stage, bgfx_uniform_handle_t _sampler, bgfx_frame_buffer_handle_t _handle, uint8_t _attachment, bgfx_access_t _access, bgfx_texture_format_t _format);
-
-/**/
BGFX_C_API void bgfx_set_compute_index_buffer(uint8_t _stage, bgfx_index_buffer_handle_t _handle, bgfx_access_t _access);
/**/
@@ -893,9 +909,6 @@ BGFX_C_API void bgfx_discard();
BGFX_C_API void bgfx_blit(uint8_t _id, bgfx_texture_handle_t _dst, uint8_t _dstMip, uint16_t _dstX, uint16_t _dstY, uint16_t _dstZ, bgfx_texture_handle_t _src, uint8_t _srcMip, uint16_t _srcX, uint16_t _srcY, uint16_t _srcZ, uint16_t _width, uint16_t _height, uint16_t _depth);
/**/
-BGFX_C_API void bgfx_blit_frame_buffer(uint8_t _id, bgfx_texture_handle_t _dst, uint8_t _dstMip, uint16_t _dstX, uint16_t _dstY, uint16_t _dstZ, bgfx_frame_buffer_handle_t _src, uint8_t _attachment, uint8_t _srcMip, uint16_t _srcX, uint16_t _srcY, uint16_t _srcZ, uint16_t _width, uint16_t _height, uint16_t _depth);
-
-/**/
BGFX_C_API void bgfx_save_screen_shot(const char* _filePath);
#endif // BGFX_C99_H_HEADER_GUARD