summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/bgfx/examples/23-vectordisplay/vectordisplay.cpp
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/bgfx/examples/23-vectordisplay/vectordisplay.cpp')
-rw-r--r--3rdparty/bgfx/examples/23-vectordisplay/vectordisplay.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/3rdparty/bgfx/examples/23-vectordisplay/vectordisplay.cpp b/3rdparty/bgfx/examples/23-vectordisplay/vectordisplay.cpp
index e63d156b966..7bface50c0d 100644
--- a/3rdparty/bgfx/examples/23-vectordisplay/vectordisplay.cpp
+++ b/3rdparty/bgfx/examples/23-vectordisplay/vectordisplay.cpp
@@ -1,14 +1,14 @@
/*
* Copyright 2014 Kai Jourdan. All rights reserved.
* License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause
- *
- * Based on code from Brian Luczkiewicz
- * https://github.com/blucz/Vector
- *
- * Uses the SIMPLEX-Font which is a variant of the Hershey font (public domain)
- * http://paulbourke.net/dataformats/hershey/
*/
+// Reference(s):
+// - Based on code from Brian Luczkiewicz
+// https://github.com/blucz/Vector
+// - Uses the SIMPLEX-Font which is a variant of the Hershey font (public domain)
+// https://web.archive.org/web/20120313001837/http://paulbourke.net/dataformats/hershey/
+//
#include <float.h> // FLT_EPSILON
#include <alloca.h> // alloca
@@ -35,7 +35,7 @@ const int HALF_TEXTURE_SIZE = TEXTURE_SIZE / 2;
void PosColorUvVertex::init()
{
- ms_decl
+ ms_layout
.begin()
.add(bgfx::Attrib::Position, 3, bgfx::AttribType::Float)
.add(bgfx::Attrib::TexCoord0, 2, bgfx::AttribType::Float)
@@ -43,7 +43,7 @@ void PosColorUvVertex::init()
.end();
}
-bgfx::VertexDecl PosColorUvVertex::ms_decl;
+bgfx::VertexLayout PosColorUvVertex::ms_layout;
inline float normalizef(float _a)
{
@@ -94,7 +94,7 @@ void VectorDisplay::setup(uint16_t _width, uint16_t _height, uint8_t _view)
m_blitShader = loadProgram("vs_vectordisplay_fb", "fs_vectordisplay_blit");
u_params = bgfx::createUniform("u_params", bgfx::UniformType::Vec4);
- s_texColor = bgfx::createUniform("s_texColor", bgfx::UniformType::Int1);
+ s_texColor = bgfx::createUniform("s_texColor", bgfx::UniformType::Sampler);
genLinetex();
@@ -737,7 +737,7 @@ bool VectorDisplay::setDecaySteps(int _steps)
for (int i = 0; i < m_numberDecaySteps; ++i)
{
- m_vertexBuffers.push_back(bgfx::createDynamicVertexBuffer(MAX_NUMBER_VERTICES, PosColorUvVertex::ms_decl) );
+ m_vertexBuffers.push_back(bgfx::createDynamicVertexBuffer(MAX_NUMBER_VERTICES, PosColorUvVertex::ms_layout) );
m_vertexBuffersSize.push_back(0);
}
@@ -769,10 +769,10 @@ void VectorDisplay::getSize(float* _outWidth, float* _outHeight)
void VectorDisplay::screenSpaceQuad(float _textureWidth, float _textureHeight, float _width, float _height)
{
- if (3 == getAvailTransientVertexBuffer(3, PosColorUvVertex::ms_decl) )
+ if (3 == getAvailTransientVertexBuffer(3, PosColorUvVertex::ms_layout) )
{
bgfx::TransientVertexBuffer vb;
- bgfx::allocTransientVertexBuffer(&vb, 3, PosColorUvVertex::ms_decl);
+ bgfx::allocTransientVertexBuffer(&vb, 3, PosColorUvVertex::ms_layout);
PosColorUvVertex* vertex = (PosColorUvVertex*)vb.data;
const float zz = 0.0f;