mirror of https://github.com/bkaradzic/bgfx
Merge branch 'master' of github.com:bkaradzic/bgfx
This commit is contained in:
commit
9d1df47f09
|
@ -403,7 +403,7 @@ namespace entry
|
|||
if (!glfwInit() )
|
||||
{
|
||||
DBG("glfwInit failed!");
|
||||
return EXIT_FAILURE;
|
||||
return bx::kExitFailure;
|
||||
}
|
||||
|
||||
glfwSetJoystickCallback(joystickCb);
|
||||
|
@ -422,7 +422,7 @@ namespace entry
|
|||
{
|
||||
DBG("glfwCreateWindow failed!");
|
||||
glfwTerminate();
|
||||
return EXIT_FAILURE;
|
||||
return bx::kExitFailure;
|
||||
}
|
||||
|
||||
glfwSetKeyCallback(m_windows[0], keyCb);
|
||||
|
|
|
@ -2326,7 +2326,7 @@ namespace bgfx
|
|||
BGFX_PROFILER_SET_CURRENT_THREAD_NAME("bgfx - Render Thread");
|
||||
while (RenderFrame::Exiting != bgfx::renderFrame() ) {};
|
||||
BX_TRACE("render thread exit");
|
||||
return EXIT_SUCCESS;
|
||||
return bx::kExitSuccess;
|
||||
}
|
||||
|
||||
// game thread
|
||||
|
|
|
@ -423,27 +423,27 @@ int main(int _argc, const char* _argv[])
|
|||
, BGFX_GEOMETRYC_VERSION_MINOR
|
||||
, BGFX_API_VERSION
|
||||
);
|
||||
return EXIT_SUCCESS;
|
||||
return bx::kExitSuccess;
|
||||
}
|
||||
|
||||
if (cmdLine.hasArg('h', "help") )
|
||||
{
|
||||
help();
|
||||
return EXIT_FAILURE;
|
||||
return bx::kExitFailure;
|
||||
}
|
||||
|
||||
const char* filePath = cmdLine.findOption('f');
|
||||
if (NULL == filePath)
|
||||
{
|
||||
help("Input file name must be specified.");
|
||||
return EXIT_FAILURE;
|
||||
return bx::kExitFailure;
|
||||
}
|
||||
|
||||
const char* outFilePath = cmdLine.findOption('o');
|
||||
if (NULL == outFilePath)
|
||||
{
|
||||
help("Output file name must be specified.");
|
||||
return EXIT_FAILURE;
|
||||
return bx::kExitFailure;
|
||||
}
|
||||
|
||||
float scale = 1.0f;
|
||||
|
@ -473,7 +473,7 @@ int main(int _argc, const char* _argv[])
|
|||
if (NULL == file)
|
||||
{
|
||||
printf("Unable to open input file '%s'.", filePath);
|
||||
exit(EXIT_FAILURE);
|
||||
exit(bx::kExitFailure);
|
||||
}
|
||||
|
||||
int64_t parseElapsed = -bx::getHPCounter();
|
||||
|
@ -845,7 +845,7 @@ int main(int _argc, const char* _argv[])
|
|||
if (!bx::open(&writer, outFilePath) )
|
||||
{
|
||||
printf("Unable to open output file '%s'.", outFilePath);
|
||||
exit(EXIT_FAILURE);
|
||||
exit(bx::kExitFailure);
|
||||
}
|
||||
|
||||
Primitive prim;
|
||||
|
@ -1062,5 +1062,5 @@ int main(int _argc, const char* _argv[])
|
|||
, numIndices
|
||||
);
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
return bx::kExitSuccess;
|
||||
}
|
||||
|
|
|
@ -793,13 +793,13 @@ namespace bgfx
|
|||
, BGFX_SHADERC_VERSION_MINOR
|
||||
, BGFX_API_VERSION
|
||||
);
|
||||
return EXIT_SUCCESS;
|
||||
return bx::kExitSuccess;
|
||||
}
|
||||
|
||||
if (cmdLine.hasArg('h', "help") )
|
||||
{
|
||||
help();
|
||||
return EXIT_FAILURE;
|
||||
return bx::kExitFailure;
|
||||
}
|
||||
|
||||
g_verbose = cmdLine.hasArg("verbose");
|
||||
|
@ -808,21 +808,21 @@ namespace bgfx
|
|||
if (NULL == filePath)
|
||||
{
|
||||
help("Shader file name must be specified.");
|
||||
return EXIT_FAILURE;
|
||||
return bx::kExitFailure;
|
||||
}
|
||||
|
||||
const char* outFilePath = cmdLine.findOption('o');
|
||||
if (NULL == outFilePath)
|
||||
{
|
||||
help("Output file name must be specified.");
|
||||
return EXIT_FAILURE;
|
||||
return bx::kExitFailure;
|
||||
}
|
||||
|
||||
const char* type = cmdLine.findOption('\0', "type");
|
||||
if (NULL == type)
|
||||
{
|
||||
help("Must specify shader type.");
|
||||
return EXIT_FAILURE;
|
||||
return bx::kExitFailure;
|
||||
}
|
||||
|
||||
const char* platform = cmdLine.findOption('\0', "platform");
|
||||
|
@ -1045,7 +1045,7 @@ namespace bgfx
|
|||
|
||||
default:
|
||||
fprintf(stderr, "Unknown type: %s?!", type);
|
||||
return EXIT_FAILURE;
|
||||
return bx::kExitFailure;
|
||||
}
|
||||
|
||||
bool compiled = false;
|
||||
|
@ -1244,7 +1244,7 @@ namespace bgfx
|
|||
if (!bx::open(writer, outFilePath) )
|
||||
{
|
||||
fprintf(stderr, "Unable to open output file '%s'.", outFilePath);
|
||||
return EXIT_FAILURE;
|
||||
return bx::kExitFailure;
|
||||
}
|
||||
|
||||
if ('f' == shaderType)
|
||||
|
@ -1381,13 +1381,13 @@ namespace bgfx
|
|||
if (!bx::open(&writer, outFilePath) )
|
||||
{
|
||||
fprintf(stderr, "Unable to open output file '%s'.", outFilePath);
|
||||
return EXIT_FAILURE;
|
||||
return bx::kExitFailure;
|
||||
}
|
||||
|
||||
bx::write(&writer, preprocessor.m_preprocessed.c_str(), (int32_t)preprocessor.m_preprocessed.size() );
|
||||
bx::close(&writer);
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
return bx::kExitSuccess;
|
||||
}
|
||||
|
||||
{
|
||||
|
@ -1405,7 +1405,7 @@ namespace bgfx
|
|||
if (!bx::open(writer, outFilePath) )
|
||||
{
|
||||
fprintf(stderr, "Unable to open output file '%s'.", outFilePath);
|
||||
return EXIT_FAILURE;
|
||||
return bx::kExitFailure;
|
||||
}
|
||||
|
||||
bx::write(writer, BGFX_CHUNK_MAGIC_CSH);
|
||||
|
@ -1689,7 +1689,7 @@ namespace bgfx
|
|||
else
|
||||
{
|
||||
fprintf(stderr, "gl_PrimitiveID builtin is not supported by this D3D9 HLSL.\n");
|
||||
return EXIT_FAILURE;
|
||||
return bx::kExitFailure;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1779,7 +1779,7 @@ namespace bgfx
|
|||
else
|
||||
{
|
||||
fprintf(stderr, "gl_VertexID builtin is not supported by this D3D9 HLSL.\n");
|
||||
return EXIT_FAILURE;
|
||||
return bx::kExitFailure;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1795,7 +1795,7 @@ namespace bgfx
|
|||
else
|
||||
{
|
||||
fprintf(stderr, "gl_InstanceID builtin is not supported by this D3D9 HLSL.\n");
|
||||
return EXIT_FAILURE;
|
||||
return bx::kExitFailure;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1851,7 +1851,7 @@ namespace bgfx
|
|||
if (!bx::open(&writer, outFilePath) )
|
||||
{
|
||||
fprintf(stderr, "Unable to open output file '%s'.", outFilePath);
|
||||
return EXIT_FAILURE;
|
||||
return bx::kExitFailure;
|
||||
}
|
||||
|
||||
if (0 != glsl)
|
||||
|
@ -1868,7 +1868,7 @@ namespace bgfx
|
|||
bx::write(&writer, preprocessor.m_preprocessed.c_str(), (int32_t)preprocessor.m_preprocessed.size() );
|
||||
bx::close(&writer);
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
return bx::kExitSuccess;
|
||||
}
|
||||
|
||||
{
|
||||
|
@ -1886,7 +1886,7 @@ namespace bgfx
|
|||
if (!bx::open(writer, outFilePath) )
|
||||
{
|
||||
fprintf(stderr, "Unable to open output file '%s'.", outFilePath);
|
||||
return EXIT_FAILURE;
|
||||
return bx::kExitFailure;
|
||||
}
|
||||
|
||||
if ('f' == shaderType)
|
||||
|
@ -2189,13 +2189,13 @@ namespace bgfx
|
|||
|
||||
if (compiled)
|
||||
{
|
||||
return EXIT_SUCCESS;
|
||||
return bx::kExitSuccess;
|
||||
}
|
||||
|
||||
remove(outFilePath);
|
||||
|
||||
fprintf(stderr, "Failed to build shader.\n");
|
||||
return EXIT_FAILURE;
|
||||
return bx::kExitFailure;
|
||||
}
|
||||
|
||||
} // namespace bgfx
|
||||
|
|
|
@ -753,18 +753,18 @@ int _main_(int _argc, char** _argv)
|
|||
, BGFX_TEXTUREV_VERSION_MINOR
|
||||
, BGFX_API_VERSION
|
||||
);
|
||||
return EXIT_SUCCESS;
|
||||
return bx::kExitSuccess;
|
||||
}
|
||||
|
||||
if (cmdLine.hasArg('h', "help") )
|
||||
{
|
||||
help();
|
||||
return EXIT_FAILURE;
|
||||
return bx::kExitFailure;
|
||||
}
|
||||
else if (cmdLine.hasArg("associate") )
|
||||
{
|
||||
associate();
|
||||
return EXIT_FAILURE;
|
||||
return bx::kExitFailure;
|
||||
}
|
||||
|
||||
uint32_t width = 1280;
|
||||
|
@ -878,12 +878,12 @@ int _main_(int _argc, char** _argv)
|
|||
view.updateFileList(path.c_str() );
|
||||
}
|
||||
|
||||
int exitcode = EXIT_SUCCESS;
|
||||
int exitcode = bx::kExitSuccess;
|
||||
bgfx::TextureHandle texture = BGFX_INVALID_HANDLE;
|
||||
|
||||
if (view.m_fileList.empty() )
|
||||
{
|
||||
exitcode = EXIT_FAILURE;
|
||||
exitcode = bx::kExitFailure;
|
||||
if (2 > _argc)
|
||||
{
|
||||
help("File path is not specified.");
|
||||
|
|
Loading…
Reference in New Issue