X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fcore%2Freflectdata.h;h=fff190a52dcbde157e98f042e7ead8534d42713b;hp=90b7ce0d4a41582a8f7e89809e4375c7ca4f7b24;hb=38712d8ecc57d043a2419ffbaeeb57f7a6586f14;hpb=3bc34893905a2df622894aadcb6669f27f186772 diff --git a/source/core/reflectdata.h b/source/core/reflectdata.h index 90b7ce0d..fff190a5 100644 --- a/source/core/reflectdata.h +++ b/source/core/reflectdata.h @@ -20,31 +20,27 @@ struct ReflectData struct UniformInfo { std::string name; - const UniformBlockInfo *block; + const UniformBlockInfo *block = 0; union { - int location; + int location = -1; unsigned offset; }; - unsigned array_size; - unsigned array_stride; - unsigned matrix_stride; - DataType type; + unsigned array_size = 0; + unsigned array_stride = 0; + unsigned matrix_stride = 0; + DataType type = VOID; Tag tag; - int binding; - - UniformInfo(); + int binding = -1; }; struct UniformBlockInfo { std::string name; - unsigned data_size; - int bind_point; + unsigned data_size = 0; + int bind_point = -1; std::vector uniforms; - LayoutHash layout_hash; - - UniformBlockInfo(); + LayoutHash layout_hash = 0; void sort_uniforms(); void update_layout_hash(); @@ -53,11 +49,9 @@ struct ReflectData struct AttributeInfo { std::string name; - unsigned location; - unsigned array_size; - DataType type; - - AttributeInfo(); + unsigned location = -1; + unsigned array_size = 0; + DataType type = VOID; }; std::vector uniform_blocks;