Skip to content

Commit 9ba5321

Browse files
committed
Updated dependencies
1 parent 334f597 commit 9ba5321

File tree

13 files changed

+42
-41
lines changed

13 files changed

+42
-41
lines changed

dependencies/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ add_subdirectory(assimp)
1414
set(BGFX_BUILD_TOOLS ON CACHE INTERNAL "" )
1515
set(BGFX_BUILD_EXAMPLES OFF CACHE INTERNAL "" )
1616
set(BGFX_CUSTOM_TARGETS OFF CACHE INTERNAL "" )
17+
set(BGFX_INSTALL OFF CACHE INTERNAL "" )
1718
add_subdirectory(bgfx.cmake)
1819

1920
# bullet

dependencies/assimp

Submodule assimp updated 531 files

dependencies/bgfx.cmake

dependencies/entt

Submodule entt updated 96 files

dependencies/spdlog

Submodule spdlog updated 68 files

igneous/src/gui/gui.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
namespace igneous {
1616
namespace gui
1717
{
18-
static bgfx::VertexDecl imguiVertexDecl;
18+
static bgfx::VertexLayout imguiVertexLayout;
1919
static bgfx::TextureHandle imguiFontTexture;
2020
static bgfx::UniformHandle imguiFontUniform;
2121
static bgfx::ProgramHandle imguiProgram;
@@ -40,7 +40,7 @@ namespace gui
4040
ImGuiIO& io = ImGui::GetIO();
4141

4242
// Setup vertex declaration
43-
imguiVertexDecl
43+
imguiVertexLayout
4444
.begin()
4545
.add(bgfx::Attrib::Position, 2, bgfx::AttribType::Float)
4646
.add(bgfx::Attrib::TexCoord0, 2, bgfx::AttribType::Float)
@@ -177,12 +177,12 @@ namespace gui
177177
uint32_t numVertices = (uint32_t)drawList->VtxBuffer.size();
178178
uint32_t numIndices = (uint32_t)drawList->IdxBuffer.size();
179179

180-
if (!bgfx::getAvailTransientVertexBuffer(numVertices, imguiVertexDecl) || !bgfx::getAvailTransientIndexBuffer(numIndices))
180+
if (!bgfx::getAvailTransientVertexBuffer(numVertices, imguiVertexLayout) || !bgfx::getAvailTransientIndexBuffer(numIndices))
181181
{
182182
break;
183183
}
184184

185-
bgfx::allocTransientVertexBuffer(&tvb, numVertices, imguiVertexDecl);
185+
bgfx::allocTransientVertexBuffer(&tvb, numVertices, imguiVertexLayout);
186186
bgfx::allocTransientIndexBuffer(&tib, numIndices);
187187

188188
ImDrawVert* verts = (ImDrawVert*)tvb.data;

igneous/src/physics/debugRenderer.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,16 @@ namespace physics
1616
float r, g, b;
1717
static void init()
1818
{
19-
ms_decl
19+
ms_layout
2020
.begin()
2121
.add(bgfx::Attrib::Position, 3, bgfx::AttribType::Float)
2222
.add(bgfx::Attrib::Color0, 3, bgfx::AttribType::Float)
2323
.end();
2424
}
25-
static bgfx::VertexDecl ms_decl;
25+
static bgfx::VertexLayout ms_layout;
2626
};
2727

28-
bgfx::VertexDecl DebugVertex::ms_decl;
28+
bgfx::VertexLayout DebugVertex::ms_layout;
2929

3030
static bgfx::ProgramHandle debugProgram;
3131
static std::vector<DebugVertex> debugVertices;
@@ -72,7 +72,7 @@ namespace physics
7272

7373
void DebugRenderer::render()
7474
{
75-
bgfx::VertexBufferHandle vb = bgfx::createVertexBuffer(bgfx::makeRef(debugVertices.data(), (uint32_t)debugVertices.size() * DebugVertex::ms_decl.getStride()), DebugVertex::ms_decl);
75+
bgfx::VertexBufferHandle vb = bgfx::createVertexBuffer(bgfx::makeRef(debugVertices.data(), (uint32_t)debugVertices.size() * DebugVertex::ms_layout.getStride()), DebugVertex::ms_layout);
7676
bgfx::setVertexBuffer(0, vb);
7777
bgfx::IndexBufferHandle ib = bgfx::createIndexBuffer(bgfx::makeRef(debugIndicies.data(), (uint32_t)debugIndicies.size() * sizeof(uint16_t)));
7878
bgfx::setIndexBuffer(ib);

igneous/src/renderer/renderer.cpp

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@ namespace renderer
9292
};
9393
static const uint16_t s_splashTriList[] = { 2, 1, 0, 2, 3, 1 };
9494

95-
static bgfx::VertexDecl splashVertexDecl;
96-
splashVertexDecl.begin()
95+
static bgfx::VertexLayout splashVertexLayout;
96+
splashVertexLayout.begin()
9797
.add(bgfx::Attrib::Position, 2, bgfx::AttribType::Float)
9898
.add(bgfx::Attrib::TexCoord0, 2, bgfx::AttribType::Float)
9999
.end();
@@ -105,7 +105,7 @@ namespace renderer
105105
bgfx::UniformHandle s_splash = bgfx::createUniform("s_splash", bgfx::UniformType::Sampler);
106106
bgfx::TextureHandle splashTexture = loadTexture("res/textures/splash.png", BGFX_SAMPLER_U_CLAMP | BGFX_SAMPLER_V_CLAMP, false);
107107

108-
bgfx::VertexBufferHandle vb = bgfx::createVertexBuffer(bgfx::makeRef(s_splashVertices, sizeof(s_splashVertices)), splashVertexDecl);
108+
bgfx::VertexBufferHandle vb = bgfx::createVertexBuffer(bgfx::makeRef(s_splashVertices, sizeof(s_splashVertices)), splashVertexLayout);
109109
bgfx::IndexBufferHandle ib = bgfx::createIndexBuffer(bgfx::makeRef(s_splashTriList, sizeof(s_splashTriList)));
110110

111111
bgfx::setVertexBuffer(0, vb);
@@ -286,39 +286,39 @@ namespace renderer
286286
file.seekg(sizeof(uint64_t), std::ios::beg);
287287
uint8_t numAttributes;
288288
file.read((char*)&numAttributes, sizeof(uint8_t));
289-
bgfx::VertexDecl vertexDecl;
290-
vertexDecl.begin();
289+
bgfx::VertexLayout vertexLayout;
290+
vertexLayout.begin();
291291
for (int i = 0; i < numAttributes; i++)
292292
{
293293
uint8_t attribute;
294294
file.read((char*)&attribute, sizeof(uint8_t));
295295

296296
if (attribute == bgfx::Attrib::Position)
297297
{
298-
vertexDecl.add(bgfx::Attrib::Position, 3, bgfx::AttribType::Float);
298+
vertexLayout.add(bgfx::Attrib::Position, 3, bgfx::AttribType::Float);
299299
}
300300
else if (attribute == bgfx::Attrib::Normal)
301301
{
302-
vertexDecl.add(bgfx::Attrib::Normal, 3, bgfx::AttribType::Float);
302+
vertexLayout.add(bgfx::Attrib::Normal, 3, bgfx::AttribType::Float);
303303
}
304304
else if (attribute == bgfx::Attrib::Tangent)
305305
{
306-
vertexDecl.add(bgfx::Attrib::Tangent, 3, bgfx::AttribType::Float);
306+
vertexLayout.add(bgfx::Attrib::Tangent, 3, bgfx::AttribType::Float);
307307
}
308308
else if (attribute == bgfx::Attrib::Bitangent)
309309
{
310-
vertexDecl.add(bgfx::Attrib::Bitangent, 3, bgfx::AttribType::Float);
310+
vertexLayout.add(bgfx::Attrib::Bitangent, 3, bgfx::AttribType::Float);
311311
}
312312
else if (attribute >= bgfx::Attrib::TexCoord0 && attribute <= bgfx::Attrib::TexCoord7)
313313
{
314-
vertexDecl.add((bgfx::Attrib::Enum)attribute, 2, bgfx::AttribType::Float);
314+
vertexLayout.add((bgfx::Attrib::Enum)attribute, 2, bgfx::AttribType::Float);
315315
}
316316
else if (attribute >= bgfx::Attrib::Color0 && attribute <= bgfx::Attrib::Color3)
317317
{
318-
vertexDecl.add((bgfx::Attrib::Enum)attribute, 4, bgfx::AttribType::Uint8, true);
318+
vertexLayout.add((bgfx::Attrib::Enum)attribute, 4, bgfx::AttribType::Uint8, true);
319319
}
320320
}
321-
vertexDecl.end();
321+
vertexLayout.end();
322322

323323
unsigned int numMeshes;
324324
file.read((char*)&numMeshes, sizeof(unsigned int));
@@ -332,7 +332,7 @@ namespace renderer
332332
unsigned int numIndicies;
333333
file.read((char*)&numVerticies, sizeof(unsigned int));
334334
file.read((char*)&numIndicies, sizeof(unsigned int));
335-
modelSize += (uint32_t)numVerticies * (uint32_t)vertexDecl.getStride() + (uint32_t)numIndicies * sizeof(uint16_t);
335+
modelSize += (uint32_t)numVerticies * (uint32_t)vertexLayout.getStride() + (uint32_t)numIndicies * sizeof(uint16_t);
336336
size_t materialNameLength;
337337
file.read((char*)&materialNameLength, sizeof(size_t));
338338
std::string materialName;
@@ -359,10 +359,10 @@ namespace renderer
359359
materialName.resize(materialNameLength);
360360
file.read(materialName.data(), materialNameLength);
361361

362-
uint32_t verticiesSize = (uint32_t)numVerticies * (uint32_t)vertexDecl.getStride();
362+
uint32_t verticiesSize = (uint32_t)numVerticies * (uint32_t)vertexLayout.getStride();
363363
uint32_t indiciesSize = (uint32_t)numIndicies * sizeof(uint16_t);
364364
Mesh mesh;
365-
mesh.vbh = bgfx::createVertexBuffer(bgfx::makeRef((uint8_t*)modelData + amountRead, verticiesSize), vertexDecl);
365+
mesh.vbh = bgfx::createVertexBuffer(bgfx::makeRef((uint8_t*)modelData + amountRead, verticiesSize), vertexLayout);
366366
amountRead += verticiesSize;
367367
mesh.ibh = bgfx::createIndexBuffer(bgfx::makeRef((uint8_t*)modelData + amountRead, indiciesSize));
368368
amountRead += indiciesSize;

samples/sandbox/src/ecs/systems/sky/proceduralSky.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ void ProceduralSky::init(int verticalCount, int horizontalCount)
4747
}
4848
}
4949

50-
m_vbh = bgfx::createVertexBuffer(bgfx::copy(vertices, sizeof(ScreenPosVertex) * verticalCount * horizontalCount), ScreenPosVertex::ms_decl);
50+
m_vbh = bgfx::createVertexBuffer(bgfx::copy(vertices, sizeof(ScreenPosVertex) * verticalCount * horizontalCount), ScreenPosVertex::ms_layout);
5151
m_ibh = bgfx::createIndexBuffer(bgfx::copy(indices, sizeof(uint16_t) * k));
5252

5353
BX_FREE(allocator, indices);
@@ -69,4 +69,4 @@ void ProceduralSky::draw()
6969
bgfx::submit(0, m_skyProgram);
7070
}
7171

72-
bgfx::VertexDecl ProceduralSky::ScreenPosVertex::ms_decl;
72+
bgfx::VertexLayout ProceduralSky::ScreenPosVertex::ms_layout;

samples/sandbox/src/ecs/systems/sky/proceduralSky.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ struct ProceduralSky
2323

2424
static void init()
2525
{
26-
ms_decl
26+
ms_layout
2727
.begin()
2828
.add(bgfx::Attrib::Position, 2, bgfx::AttribType::Float)
2929
.end();
3030
}
3131

32-
static bgfx::VertexDecl ms_decl;
32+
static bgfx::VertexLayout ms_layout;
3333
};
3434
};

tools/ziggurat/material.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,19 @@
77
#include <filesystem>
88
#include <unordered_map>
99

10-
enum MATERIAL_ATTRIBUTE : uint8_t
10+
enum class MaterialAttribute : uint8_t
1111
{
1212
COLOR,
1313
DIFFUSE,
1414
NORMAL,
1515
SPECULAR
1616
};
1717

18-
const std::unordered_map<std::string, MATERIAL_ATTRIBUTE> attributeLookupTable = {
19-
{"color", COLOR},
20-
{"diffuse", DIFFUSE},
21-
{"normal", NORMAL},
22-
{"specular", SPECULAR}
18+
const std::unordered_map<std::string, MaterialAttribute> attributeLookupTable = {
19+
{"color", MaterialAttribute::COLOR},
20+
{"diffuse", MaterialAttribute::DIFFUSE},
21+
{"normal", MaterialAttribute::NORMAL},
22+
{"specular", MaterialAttribute::SPECULAR}
2323
};
2424

2525
bool Ziggurat::compileMaterial(const std::string& name)
@@ -50,10 +50,10 @@ bool Ziggurat::compileMaterial(const std::string& name)
5050
std::string attributeName;
5151
while (materialFile >> attributeName)
5252
{
53-
MATERIAL_ATTRIBUTE attribute = attributeLookupTable.at(attributeName);
53+
MaterialAttribute attribute = attributeLookupTable.at(attributeName);
5454
file.write((char*)&attribute, sizeof(attribute));
5555

56-
if (attribute == COLOR)
56+
if (attribute == MaterialAttribute::COLOR)
5757
{
5858
std::string r, g, b, a;
5959
materialFile >> r >> g >> b >> a;

0 commit comments

Comments
 (0)