mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-12-01 03:47:07 -05:00
Cleanup.
This commit is contained in:
parent
f7fe163f2b
commit
640c61fe45
5 changed files with 7 additions and 12 deletions
|
@ -6,7 +6,6 @@
|
|||
#include "common.h"
|
||||
|
||||
#include <bgfx.h>
|
||||
#include <bx/countof.h>
|
||||
#include <bx/timer.h>
|
||||
#include "entry.h"
|
||||
#include "dbg.h"
|
||||
|
@ -305,7 +304,7 @@ int _main_(int /*_argc*/, char** /*_argv*/)
|
|||
|
||||
const bgfx::Memory* mem;
|
||||
|
||||
calcTangents(s_cubeVertices, countof(s_cubeVertices), s_PosNormalTangentTexcoordDecl, s_cubeIndices, countof(s_cubeIndices) );
|
||||
calcTangents(s_cubeVertices, BX_COUNTOF(s_cubeVertices), s_PosNormalTangentTexcoordDecl, s_cubeIndices, BX_COUNTOF(s_cubeIndices) );
|
||||
|
||||
// Create static vertex buffer.
|
||||
mem = bgfx::makeRef(s_cubeVertices, sizeof(s_cubeVertices) );
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
#include "common.h"
|
||||
|
||||
#include <bgfx.h>
|
||||
#include <bx/countof.h>
|
||||
#include <bx/timer.h>
|
||||
#include <bx/readerwriter.h>
|
||||
#include "entry.h"
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
|
||||
#include <bgfx.h>
|
||||
#include <bx/timer.h>
|
||||
#include <bx/countof.h>
|
||||
#include <bx/string.h>
|
||||
#include "entry.h"
|
||||
#include "dbg.h"
|
||||
|
@ -100,7 +99,7 @@ int _main_(int /*_argc*/, char** /*_argv*/)
|
|||
"font/five_minutes.otf"
|
||||
};
|
||||
|
||||
const uint32_t fontCount = countof(fontNames);
|
||||
const uint32_t fontCount = BX_COUNTOF(fontNames);
|
||||
|
||||
TrueTypeHandle fontFiles[fontCount];
|
||||
FontHandle fonts[fontCount];
|
||||
|
@ -189,7 +188,7 @@ int _main_(int /*_argc*/, char** /*_argv*/)
|
|||
|
||||
// Use transient text to display debug information.
|
||||
wchar_t fpsText[64];
|
||||
bx::swnprintf(fpsText, countof(fpsText), L"Frame: % 7.3f[ms]", double(frameTime) * toMs);
|
||||
bx::swnprintf(fpsText, BX_COUNTOF(fpsText), L"Frame: % 7.3f[ms]", double(frameTime) * toMs);
|
||||
|
||||
textBufferManager->clearTextBuffer(transientText);
|
||||
textBufferManager->setPenPosition(transientText, 20.0, 4.0f);
|
||||
|
|
|
@ -51,7 +51,6 @@ namespace std { namespace tr1 {} using namespace tr1; } // namespace std
|
|||
|
||||
#include <bx/bx.h>
|
||||
#include <bx/debug.h>
|
||||
#include <bx/countof.h>
|
||||
#include <bx/commandline.h>
|
||||
#include <bx/timer.h>
|
||||
#include <bx/readerwriter.h>
|
||||
|
@ -429,7 +428,7 @@ int main(int _argc, const char* _argv[])
|
|||
const char* next = data;
|
||||
do
|
||||
{
|
||||
next = tokenizeCommandLine(next, commandLine, len, argc, argv, countof(argv), '\n');
|
||||
next = tokenizeCommandLine(next, commandLine, len, argc, argv, BX_COUNTOF(argv), '\n');
|
||||
if (0 < argc)
|
||||
{
|
||||
if (0 == strcmp(argv[0], "#") )
|
||||
|
|
|
@ -36,7 +36,6 @@ extern "C"
|
|||
#include <bx/bx.h>
|
||||
|
||||
#include <bx/commandline.h>
|
||||
#include <bx/countof.h>
|
||||
#include <bx/endian.h>
|
||||
#include <bx/uint32_t.h>
|
||||
#include <bx/readerwriter.h>
|
||||
|
@ -568,7 +567,7 @@ bool compileHLSLShaderDx9(bx::CommandLine& _cmdLine, const std::string& _code, b
|
|||
uint32_t optimization = 3;
|
||||
if (_cmdLine.hasArg(optimization, 'O') )
|
||||
{
|
||||
optimization = bx::uint32_min(optimization, countof(s_optimizationLevelDx9)-1);
|
||||
optimization = bx::uint32_min(optimization, BX_COUNTOF(s_optimizationLevelDx9)-1);
|
||||
flags |= s_optimizationLevelDx9[optimization];
|
||||
}
|
||||
else
|
||||
|
@ -749,7 +748,7 @@ bool compileHLSLShaderDx11(bx::CommandLine& _cmdLine, const std::string& _code,
|
|||
uint32_t optimization = 3;
|
||||
if (_cmdLine.hasArg(optimization, 'O') )
|
||||
{
|
||||
optimization = bx::uint32_min(optimization, countof(s_optimizationLevelDx11)-1);
|
||||
optimization = bx::uint32_min(optimization, BX_COUNTOF(s_optimizationLevelDx11)-1);
|
||||
flags |= s_optimizationLevelDx11[optimization];
|
||||
}
|
||||
else
|
||||
|
@ -1051,7 +1050,7 @@ struct Preprocessor
|
|||
void setDefaultDefine(const char* _name)
|
||||
{
|
||||
char temp[1024];
|
||||
bx::snprintf(temp, countof(temp)
|
||||
bx::snprintf(temp, BX_COUNTOF(temp)
|
||||
, "#ifndef %s\n"
|
||||
"# define %s 0\n"
|
||||
"#endif // %s\n"
|
||||
|
|
Loading…
Reference in a new issue