本文整理匯總了C++中TestApp類的典型用法代碼示例。如果您正苦於以下問題:C++ TestApp類的具體用法?C++ TestApp怎麽用?C++ TestApp使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了TestApp類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。
示例1: main
int main( int argc, char* argv[] )
{
TestApp* pcTest = new TestApp();
pcTest->Run();
return( 0 );
}
示例2: main
int main(int argc, char **argv)
{
TestApp app;
srand((unsigned int)time(NULL));
if(argc > 1)
{
app.set_num_verts(atoi(argv[1]));
}
float x = remap_range(0.3f, 0.0f, 1.0f, -10.0f, 10.0f);
cout<<"remap: "<<x<<endl;
//app.init();
//app.run();
Matrix4x4 mat(3.0f, 7.0f, 2.0f, 5.0f,
1.0f, 8.0f, 4.0f, 2.0f,
2.0f, 1.0f, 9.0f, 3.0f,
5.0f, 4.0f, 7.0f, 1.0f);
Matrix4x4 inv = mat;
inv.invert();
Matrix4x4 ident = mat * inv;
return 0;
}
示例3: main
int main() {
TestApp app;
app.init();
app.run();
return 0;
}
示例4: _tWinMain
INT WINAPI _tWinMain(HINSTANCE hInst, HINSTANCE, LPTSTR, INT)
{
TestApp app;
app.Setup(hInst);
return app.Run();
}
示例5: main
static int main(const std::vector<std::string> &args)
{
SetupCore setup_core;
// Start the Application
TestApp app;
int retval = app.main(args);
return retval;
}
示例6: main
static int main(const std::vector<std::string> &args)
{
SetupCore setup_core;
SetupDisplay setup_display;
SetupD3D setup_d3d;
TestApp app;
return app.main(args);
}
示例7: main
// main function
int main()
{
setlocale(LC_ALL, "");
TestApp *app = TestApp::Instance();
app->Run();
return 0;
}
示例8: WinMain
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
TestApp* tApp = new TestApp(hInstance);
if(!tApp->Init())
return 1;
return tApp->Run();
}
示例9: main
int main()
{
TestApp app;
app.init();
app.play();
app.term();
return 0;
}
示例10: main
static int main(const std::vector<CL_String> &args)
{
CL_SetupCore setup_core;
CL_SetupDisplay setup_display;
CL_SetupGL setup_gl;
// Start the Application
TestApp app;
int retval = app.main(args);
return retval;
}
示例11: _tWinMain
int APIENTRY _tWinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPTSTR lpCmdLine,
int nCmdShow)
{
TestApp app;
app.Initialize();
app.Run();
app.Finalize();
return 0;
}
示例12: main
// main
int
main(int argc, char **argv)
{
// find app file and get signature from resources
char path[B_PATH_NAME_LENGTH];
status_t error = get_app_path(path);
char signature[B_MIME_TYPE_LENGTH];
if (error == B_OK) {
// init app file
BFile file;
error = file.SetTo(path, B_READ_ONLY);
// get signature
BString signatureString;
if (error == B_OK) {
if (file.ReadAttrString("signature", &signatureString) == B_OK
&& signatureString.Length() > 0) {
strcpy(signature, signatureString.String());
} else
strcpy(signature, kDefaultTestAppSignature);
} else
printf("ERROR: Couldn't init app file: %s\n", strerror(error));
} else
printf("ERROR: Couldn't get app ref: %s\n", strerror(error));
// create the app
TestApp *app = NULL;
if (error == B_OK) {
app = new TestApp(signature);
// unitTesterMessenger = BMessenger(kUnitTesterSignature);
error = init_unit_tester_messenger();
if (error != B_OK)
printf("ERROR: Couldn't init messenger: %s\n", strerror(error));
// send started message
BMessage message(MSG_STARTED);
message.AddString("path", path);
unitTesterMessenger.SendMessage(&message);
// send main() args message
BMessage argsMessage(MSG_MAIN_ARGS);
argsMessage.AddInt32("argc", argc);
for (int i = 0; i < argc; i++)
argsMessage.AddString("argv", argv[i]);
unitTesterMessenger.SendMessage(&argsMessage);
// run the app
app->Run();
delete app;
// send terminated message
unitTesterMessenger.SendMessage(MSG_TERMINATED);
}
return 0;
}
示例13: main
static int main(const std::vector<std::string> &args)
{
SetupCore setup_core;
SetupDisplay setup_display;
#ifdef USE_D3D
SetupD3D setup_d3d;
#else
SetupGL setup_gl;
#endif
// Start the Application
TestApp app;
int retval = app.main(args);
return retval;
}
示例14: main
int
main(int argc, char **argv)
{
using namespace StarEngine;
TestApp *app;
int ret = -1;
try {
app = new TestApp();
ret = app->run();
} catch(Exception *e) {
e->show();
}
return ret;
}
示例15: SetUp
virtual void SetUp() {
char appname[] = "ClockTest.o";
int argc = 1;
char *argv[1] = { appname };
app = new TestApp();
wxApp::SetInstance(app);
wxEntryStart(argc, argv);
app->OnInit();
}