Added b3Printf, b3Warning and b3Error that can be re-routed to custom handlers.
See in src/Bullet3Common/b3Logging.h for details
This commit is contained in:
@@ -399,10 +399,16 @@ const char* g_deviceName = "blaat";
|
||||
extern bool useNewBatchingKernel;
|
||||
#include "Bullet3Common/b3Vector3.h"
|
||||
|
||||
FILE* defaultOutput = stdout;
|
||||
|
||||
void myprintf(const char* msg)
|
||||
{
|
||||
fprintf(defaultOutput,msg);
|
||||
}
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
FILE* defaultOutput = stdout;
|
||||
|
||||
b3SetCustomPrintfFunc(myprintf);
|
||||
b3Vector3 test(1,2,3);
|
||||
test.x = 1;
|
||||
test.y = 4;
|
||||
@@ -690,9 +696,9 @@ int main(int argc, char* argv[])
|
||||
fprintf(defaultOutput," Preferred cl_platform index%d\n", ci.preferredOpenCLPlatformIndex);
|
||||
fprintf(defaultOutput,"\n");
|
||||
|
||||
b3OpenCLUtils::printPlatformInfo(defaultOutput, demo->getInternalData()->m_platformId);
|
||||
b3OpenCLUtils::printPlatformInfo( demo->getInternalData()->m_platformId);
|
||||
fprintf(defaultOutput,"\n");
|
||||
b3OpenCLUtils::printDeviceInfo(defaultOutput, demo->getInternalData()->m_clDevice);
|
||||
b3OpenCLUtils::printDeviceInfo( demo->getInternalData()->m_clDevice);
|
||||
fprintf(defaultOutput,"\n");
|
||||
do
|
||||
{
|
||||
|
||||
@@ -83,7 +83,7 @@ sth_stash* initFont(GLPrimitiveRenderer* primRender)
|
||||
unsigned char* data = (unsigned char*) data2;
|
||||
if (!(droidRegular = sth_add_font_from_memory(stash, data)))
|
||||
{
|
||||
printf("error!\n");
|
||||
b3Error("error!\n");
|
||||
}
|
||||
|
||||
err = glGetError();
|
||||
|
||||
@@ -50,7 +50,10 @@ function createProject(vendor)
|
||||
"../../src/Bullet3Geometry/b3ConvexHullComputer.h",
|
||||
"../../src/Bullet3Common/b3AlignedAllocator.cpp",
|
||||
"../../src/Bullet3Common/b3Quickprof.cpp",
|
||||
"../../src/Bullet3Common/b3Quickprof.h"
|
||||
"../../src/Bullet3Common/b3Quickprof.h",
|
||||
"../../src/Bullet3Common/b3Logging.cpp",
|
||||
"../../src/Bullet3Common/b3Logging.h",
|
||||
|
||||
}
|
||||
|
||||
if os.is("Windows") then
|
||||
|
||||
Reference in New Issue
Block a user