mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-02-20 22:03:12 +01:00
Rename variables and constants
This commit is contained in:
committed by
Бранимир Караџић
parent
2554425bae
commit
1db46f4fe6
@@ -29,7 +29,7 @@ struct DebugVertex
|
||||
|
||||
static void init()
|
||||
{
|
||||
ms_decl
|
||||
ms_layout
|
||||
.begin()
|
||||
.add(bgfx::Attrib::Position, 3, bgfx::AttribType::Float)
|
||||
.add(bgfx::Attrib::TexCoord0, 1, bgfx::AttribType::Float)
|
||||
@@ -37,10 +37,10 @@ struct DebugVertex
|
||||
.end();
|
||||
}
|
||||
|
||||
static bgfx::VertexLayout ms_decl;
|
||||
static bgfx::VertexLayout ms_layout;
|
||||
};
|
||||
|
||||
bgfx::VertexLayout DebugVertex::ms_decl;
|
||||
bgfx::VertexLayout DebugVertex::ms_layout;
|
||||
|
||||
struct DebugUvVertex
|
||||
{
|
||||
@@ -53,7 +53,7 @@ struct DebugUvVertex
|
||||
|
||||
static void init()
|
||||
{
|
||||
ms_decl
|
||||
ms_layout
|
||||
.begin()
|
||||
.add(bgfx::Attrib::Position, 3, bgfx::AttribType::Float)
|
||||
.add(bgfx::Attrib::TexCoord0, 2, bgfx::AttribType::Float)
|
||||
@@ -61,10 +61,10 @@ struct DebugUvVertex
|
||||
.end();
|
||||
}
|
||||
|
||||
static bgfx::VertexLayout ms_decl;
|
||||
static bgfx::VertexLayout ms_layout;
|
||||
};
|
||||
|
||||
bgfx::VertexLayout DebugUvVertex::ms_decl;
|
||||
bgfx::VertexLayout DebugUvVertex::ms_layout;
|
||||
|
||||
struct DebugShapeVertex
|
||||
{
|
||||
@@ -75,17 +75,17 @@ struct DebugShapeVertex
|
||||
|
||||
static void init()
|
||||
{
|
||||
ms_decl
|
||||
ms_layout
|
||||
.begin()
|
||||
.add(bgfx::Attrib::Position, 3, bgfx::AttribType::Float)
|
||||
.add(bgfx::Attrib::Indices, 4, bgfx::AttribType::Uint8)
|
||||
.end();
|
||||
}
|
||||
|
||||
static bgfx::VertexLayout ms_decl;
|
||||
static bgfx::VertexLayout ms_layout;
|
||||
};
|
||||
|
||||
bgfx::VertexLayout DebugShapeVertex::ms_decl;
|
||||
bgfx::VertexLayout DebugShapeVertex::ms_layout;
|
||||
|
||||
struct DebugMeshVertex
|
||||
{
|
||||
@@ -95,16 +95,16 @@ struct DebugMeshVertex
|
||||
|
||||
static void init()
|
||||
{
|
||||
ms_decl
|
||||
ms_layout
|
||||
.begin()
|
||||
.add(bgfx::Attrib::Position, 3, bgfx::AttribType::Float)
|
||||
.end();
|
||||
}
|
||||
|
||||
static bgfx::VertexLayout ms_decl;
|
||||
static bgfx::VertexLayout ms_layout;
|
||||
};
|
||||
|
||||
bgfx::VertexLayout DebugMeshVertex::ms_decl;
|
||||
bgfx::VertexLayout DebugMeshVertex::ms_layout;
|
||||
|
||||
static DebugShapeVertex s_quadVertices[4] =
|
||||
{
|
||||
@@ -429,7 +429,7 @@ struct GeometryT
|
||||
Geometry& geometry = m_geometry[handle.idx];
|
||||
geometry.m_vbh = bgfx::createVertexBuffer(
|
||||
bgfx::copy(_vertices, _numVertices*sizeof(DdVertex) )
|
||||
, DebugMeshVertex::ms_decl
|
||||
, DebugMeshVertex::ms_layout
|
||||
);
|
||||
|
||||
geometry.m_topologyNumIndices[0] = _numIndices;
|
||||
@@ -642,7 +642,7 @@ struct DebugDrawShared
|
||||
|
||||
void* vertices[DebugMesh::Count] = {};
|
||||
uint16_t* indices[DebugMesh::Count] = {};
|
||||
uint16_t stride = DebugShapeVertex::ms_decl.getStride();
|
||||
uint16_t stride = DebugShapeVertex::ms_layout.getStride();
|
||||
|
||||
uint32_t startVertex = 0;
|
||||
uint32_t startIndex = 0;
|
||||
@@ -958,7 +958,7 @@ struct DebugDrawShared
|
||||
, sizeof(s_cubeIndices)
|
||||
);
|
||||
|
||||
m_vbh = bgfx::createVertexBuffer(vb, DebugShapeVertex::ms_decl);
|
||||
m_vbh = bgfx::createVertexBuffer(vb, DebugShapeVertex::ms_layout);
|
||||
m_ibh = bgfx::createIndexBuffer(ib);
|
||||
}
|
||||
|
||||
@@ -1608,11 +1608,11 @@ struct DebugDrawEncoderImpl
|
||||
{
|
||||
flush();
|
||||
|
||||
if (_numVertices == bgfx::getAvailTransientVertexBuffer(_numVertices, DebugMeshVertex::ms_decl) )
|
||||
if (_numVertices == bgfx::getAvailTransientVertexBuffer(_numVertices, DebugMeshVertex::ms_layout) )
|
||||
{
|
||||
bgfx::TransientVertexBuffer tvb;
|
||||
bgfx::allocTransientVertexBuffer(&tvb, _numVertices, DebugMeshVertex::ms_decl);
|
||||
bx::memCopy(tvb.data, _vertices, _numVertices * DebugMeshVertex::ms_decl.m_stride);
|
||||
bgfx::allocTransientVertexBuffer(&tvb, _numVertices, DebugMeshVertex::ms_layout);
|
||||
bx::memCopy(tvb.data, _vertices, _numVertices * DebugMeshVertex::ms_layout.m_stride);
|
||||
m_encoder->setVertexBuffer(0, &tvb);
|
||||
|
||||
const Attrib& attrib = m_attrib[m_stack];
|
||||
@@ -2163,11 +2163,11 @@ struct DebugDrawEncoderImpl
|
||||
{
|
||||
if (0 != m_pos)
|
||||
{
|
||||
if (checkAvailTransientBuffers(m_pos, DebugVertex::ms_decl, m_indexPos) )
|
||||
if (checkAvailTransientBuffers(m_pos, DebugVertex::ms_layout, m_indexPos) )
|
||||
{
|
||||
bgfx::TransientVertexBuffer tvb;
|
||||
bgfx::allocTransientVertexBuffer(&tvb, m_pos, DebugVertex::ms_decl);
|
||||
bx::memCopy(tvb.data, m_cache, m_pos * DebugVertex::ms_decl.m_stride);
|
||||
bgfx::allocTransientVertexBuffer(&tvb, m_pos, DebugVertex::ms_layout);
|
||||
bx::memCopy(tvb.data, m_cache, m_pos * DebugVertex::ms_layout.m_stride);
|
||||
|
||||
bgfx::TransientIndexBuffer tib;
|
||||
bgfx::allocTransientIndexBuffer(&tib, m_indexPos);
|
||||
@@ -2201,11 +2201,11 @@ struct DebugDrawEncoderImpl
|
||||
if (0 != m_posQuad)
|
||||
{
|
||||
const uint32_t numIndices = m_posQuad/4*6;
|
||||
if (checkAvailTransientBuffers(m_posQuad, DebugUvVertex::ms_decl, numIndices) )
|
||||
if (checkAvailTransientBuffers(m_posQuad, DebugUvVertex::ms_layout, numIndices) )
|
||||
{
|
||||
bgfx::TransientVertexBuffer tvb;
|
||||
bgfx::allocTransientVertexBuffer(&tvb, m_posQuad, DebugUvVertex::ms_decl);
|
||||
bx::memCopy(tvb.data, m_cacheQuad, m_posQuad * DebugUvVertex::ms_decl.m_stride);
|
||||
bgfx::allocTransientVertexBuffer(&tvb, m_posQuad, DebugUvVertex::ms_layout);
|
||||
bx::memCopy(tvb.data, m_cacheQuad, m_posQuad * DebugUvVertex::ms_layout.m_stride);
|
||||
|
||||
bgfx::TransientIndexBuffer tib;
|
||||
bgfx::allocTransientIndexBuffer(&tib, numIndices);
|
||||
|
||||
Reference in New Issue
Block a user