summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/bgfx/examples/34-mvs/mvs.cpp
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/bgfx/examples/34-mvs/mvs.cpp')
-rw-r--r--3rdparty/bgfx/examples/34-mvs/mvs.cpp29
1 files changed, 17 insertions, 12 deletions
diff --git a/3rdparty/bgfx/examples/34-mvs/mvs.cpp b/3rdparty/bgfx/examples/34-mvs/mvs.cpp
index 87144356f8f..a2382d6e626 100644
--- a/3rdparty/bgfx/examples/34-mvs/mvs.cpp
+++ b/3rdparty/bgfx/examples/34-mvs/mvs.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 2011-2018 Branimir Karadzic. All rights reserved.
+ * Copyright 2011-2019 Branimir Karadzic. All rights reserved.
* License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause
*/
@@ -18,16 +18,16 @@ struct PosVertex
static void init()
{
- ms_decl
+ ms_layout
.begin()
.add(bgfx::Attrib::Position, 3, bgfx::AttribType::Float)
.end();
};
- static bgfx::VertexDecl ms_decl;
+ static bgfx::VertexLayout ms_layout;
};
-bgfx::VertexDecl PosVertex::ms_decl;
+bgfx::VertexLayout PosVertex::ms_layout;
struct ColorVertex
{
@@ -35,16 +35,16 @@ struct ColorVertex
static void init()
{
- ms_decl
+ ms_layout
.begin()
.add(bgfx::Attrib::Color0, 4, bgfx::AttribType::Uint8, true)
.end();
};
- static bgfx::VertexDecl ms_decl;
+ static bgfx::VertexLayout ms_layout;
};
-bgfx::VertexDecl ColorVertex::ms_decl;
+bgfx::VertexLayout ColorVertex::ms_layout;
static PosVertex s_cubePosVertices[] =
{
@@ -105,8 +105,8 @@ static const uint16_t s_cubeTriStrip[] =
class ExampleMvs : public entry::AppI
{
public:
- ExampleMvs(const char* _name, const char* _description)
- : entry::AppI(_name, _description)
+ ExampleMvs(const char* _name, const char* _description, const char* _url)
+ : entry::AppI(_name, _description, _url)
{
}
@@ -148,13 +148,13 @@ public:
m_vbh[0] = bgfx::createVertexBuffer(
// Static data can be passed with bgfx::makeRef
bgfx::makeRef(s_cubePosVertices, sizeof(s_cubePosVertices) )
- , PosVertex::ms_decl
+ , PosVertex::ms_layout
);
m_vbh[1] = bgfx::createVertexBuffer(
// Static data can be passed with bgfx::makeRef
bgfx::makeRef(s_cubeColorVertices, sizeof(s_cubeColorVertices) )
- , ColorVertex::ms_decl
+ , ColorVertex::ms_layout
);
// Create static index buffer.
@@ -281,4 +281,9 @@ public:
} // namespace
-ENTRY_IMPLEMENT_MAIN(ExampleMvs, "34-mvs", "Multiple vertex streams.");
+ENTRY_IMPLEMENT_MAIN(
+ ExampleMvs
+ , "34-mvs"
+ , "Multiple vertex streams."
+ , "https://bkaradzic.github.io/bgfx/examples.html#mvs"
+ );