本文整理汇总了C++中SetupRC函数的典型用法代码示例。如果您正苦于以下问题:C++ SetupRC函数的具体用法?C++ SetupRC怎么用?C++ SetupRC使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了SetupRC函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main(int argc, char* argv[])
{
GLint i;
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH);
glutInitWindowSize(windowWidth, windowHeight);
glutCreateWindow("Vertex Blending Demo");
glutReshapeFunc(ChangeSize);
glutKeyboardFunc(KeyPressFunc);
glutSpecialFunc(SpecialKeys);
glutDisplayFunc(RenderScene);
SetupRC();
// Create the menus
mainMenu = glutCreateMenu(ProcessMenu);
glutAddMenuEntry("Toggle vertex blending (currently ON)", 1);
glutAddMenuEntry("Show bones (currently OFF)", 2);
if (lowLevelAvailable && highLevelAvailable)
{
if (useHighLevel)
{
glutAddMenuEntry("Switch to low-level vertex shader", 3);
}
else
{
glutAddMenuEntry("Switch to high-level vertex shader", 3);
}
}
glutAttachMenu(GLUT_RIGHT_BUTTON);
glutMainLoop();
if (glDeleteObjectARB)
{
for (i = 0; i < TOTAL_SHADERS; i++)
{
glDeleteObjectARB(progObj[i]);
glDeleteObjectARB(vShader[i]);
}
}
return 0;
}
示例2: main
int main(int argc, char* argv[])
{
GLint i;
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH);
glutInitWindowSize(windowWidth, windowHeight);
glutCreateWindow("Vertex Shaders Demo");
glutReshapeFunc(ChangeSize);
glutKeyboardFunc(KeyPressFunc);
glutSpecialFunc(SpecialKeys);
glutDisplayFunc(RenderScene);
SetupRC();
// Create the menus
shaderMenu = glutCreateMenu(ProcessMenu);
for (i = 0; i < TOTAL_SHADERS; i++)
{
char menuEntry[128];
sprintf(menuEntry, "\"%s\"", shaderNames[i]);
glutAddMenuEntry(menuEntry, 1+i);
}
mainMenu = glutCreateMenu(ProcessMenu);
{
char menuEntry[128];
sprintf(menuEntry, "Choose vertex shader (currently \"%s\")", shaderNames[0]);
glutAddSubMenu(menuEntry, shaderMenu);
}
glutAttachMenu(GLUT_RIGHT_BUTTON);
glutMainLoop();
if (glDeleteShader && glDeleteProgram)
{
for (i = 0; i < TOTAL_SHADERS; i++)
{
glDeleteProgram(progObj[i]);
glDeleteShader(vShader[i]);
}
}
return 0;
}
示例3: main
int main(int argc, char* argv[])
{
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH);
glutInitWindowSize(800,600);
glutCreateWindow("F-16 Thunderbird");
glutReshapeFunc(ChangeSize);
glutDisplayFunc(RenderScene);
SetupRC();
glutTimerFunc(5, TimerFunction, 1);
glutMainLoop();
ShutdownRC();
return 0;
}
示例4: main
int main (int argc, char * argv[])
{
glutInit(&argc, argv);
// Double buffered, RGBA with depth buffer
glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGBA | GLUT_DEPTH);
glutInitWindowSize(800, 600);
glutCreateWindow("Skelton GLUT app");
glutReshapeFunc(ChangeSize);
glutKeyboardFunc(KeyPressFunc);
glutDisplayFunc(RenderScene);
SetupRC();
glutMainLoop();
return 0;
}
示例5: main
// Main entry point for GLUT based programs
int main(int argc, char* argv[]) {
gltSetWorkingDirectory(argv[0]);
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGBA | GLUT_DEPTH | GLUT_STENCIL);
glutInitWindowSize(800, 600);
glutCreateWindow("Triangle");
glutReshapeFunc(ChangeSize);
glutDisplayFunc(RenderScene);
glutSpecialFunc(SpecialKeys);
GLenum err = glewInit();
if(GLEW_OK != err) {
fprintf(stderr, "GLEW Error: %s\n", glewGetErrorString(err));
return 1;
}
SetupRC();
glutMainLoop();
return 0;
}
示例6: main
int main(int argc, char* argv[])
{
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH);
glutCreateWindow("Evolution");
glutReshapeFunc(ChangeSize);
glutSpecialFunc(SpecialKeys);
glutKeyboardFunc(NormalKeys);
glutDisplayFunc(RenderScene);
SetupRC();
glutTimerFunc(33, TimerFunction, 1);
glutMainLoop();
return 0;
}
示例7: _tmain
int _tmain(int argc, _TCHAR* argv[])
{
HANDLE hMutex;
hMutex = CreateMutex(NULL,FALSE,L"ToPatcher");
if(GetLastError() == ERROR_ALREADY_EXISTS)
{
printf("이미 실행중입니다");
return 0;
}
SetupRC();
ScenePatch();
Quit();
CloseHandle(hMutex);
return 0;
}
示例8: main
int main(int argc, char* argv[])
{
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGBA);
glutInitWindowSize(800,600);
glutCreateWindow("Bounce");
glutDisplayFunc(RenderScene);
glutReshapeFunc(ChangeSize);
glutTimerFunc(33, TimerFunction, 1);
SetupRC();
const char* str = (const char*)glGetString(GL_EXTENSIONS);
printf("%s", str);
glutMainLoop();
return 0;
}
示例9: main
//Start Main Program.
void main(int argc, char* argv[])
{
//Initiate glut
glutInit(&argc,argv);
//Initiate DisplayMode
glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH);
//Create an Window with X
glutCreateWindow("Partition and Region Line - 20130219");
//set Callback Func - Display Routine
glutDisplayFunc(RenderScene);
//set Callback Func - Reshape Routine
glutReshapeFunc(ChangeSize);
//set Callback Func - Special Key Input Routine
glutSpecialFunc(SpecialKeys);
//set Rendering Option
SetupRC();
//Start Routine
glutMainLoop();
}
示例10: main
int main(int argc, char* argv[])
{
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH | GLUT_STENCIL);
glutInitWindowSize(800,600);
glutCreateWindow("OpenGL SphereWorld Demo + Texture Maps");
glutReshapeFunc(ChangeSize);
glutDisplayFunc(RenderScene);
glutSpecialFunc(SpecialKeys);
SetupRC();
glutTimerFunc(33, TimerFunction, 1);
glutMainLoop();
ShutdownRC();
return 0;
}
示例11: _tmain
int _tmain(int argc, _TCHAR* argv[])
{
glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH);
glutInitWindowPosition(0, 0);
glutInitWindowSize(GWindowWidth, GWindowHeigth);
glutCreateWindow("Homework4");
glutDisplayFunc(RenderScene);
glutReshapeFunc(ChangeSize);
glutSpecialFunc(KeyControl);
glutTimerFunc(2000, TimerFunc, 1);
SetupRC();
glutMainLoop();
return 0;
}
示例12: main
int main(void)
{
glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH);
glutInitWindowPosition(0, 0);
glutInitWindowSize(512, 512);
glutCreateWindow("Triangle");
glutCreateMenu(ProcessMenu);
glutAddMenuEntry("은면 제거", 1);
glutAddMenuEntry("깊이 테스트", 2);
glutAddMenuEntry("뒷면 라인 그리기", 3);
glutAttachMenu(GLUT_RIGHT_BUTTON);
glutDisplayFunc(RenderScene);
glutReshapeFunc(ChangeSize);
glutSpecialFunc(KeyControl);
SetupRC();
glutMainLoop();
}
示例13: main
//////////////////////////////////////////////////////
// Program entry point
int main(int argc, char *argv[])
{
gltSetWorkingDirectory(argv[0]);
// Standard initialization stuff
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB);
glutInitWindowSize(800, 600);
glutCreateWindow("Anisotropic Tunnel");
glutReshapeFunc(ChangeSize);
glutSpecialFunc(SpecialKeys);
glutDisplayFunc(RenderScene);
#ifdef ANGLE
glutKeyboardFunc(KeyPressFunc);
#else
// Add menu entries to change filter
glutCreateMenu(ProcessMenu);
glutAddMenuEntry("GL_NEAREST",0);
glutAddMenuEntry("GL_LINEAR",1);
glutAddMenuEntry("GL_NEAREST_MIPMAP_NEAREST",2);
glutAddMenuEntry("GL_NEAREST_MIPMAP_LINEAR", 3);
glutAddMenuEntry("GL_LINEAR_MIPMAP_NEAREST", 4);
glutAddMenuEntry("GL_LINEAR_MIPMAP_LINEAR", 5);
glutAddMenuEntry("Anisotropic Filter", 6);
glutAddMenuEntry("Anisotropic Off", 7);
glutAttachMenu(GLUT_RIGHT_BUTTON);
GLenum err = glewInit();
if (GLEW_OK != err) {
fprintf(stderr, "GLEW Error: %s\n", glewGetErrorString(err));
return 1;
}
#endif
// Startup, loop, shutdown
SetupRC();
glutMainLoop();
ShutdownRC();
return 0;
}
示例14: main
int main(int argc, char ** argv)
{
glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB);
glutCreateWindow("GLRect");
glutDisplayFunc(RenderScene);
glutReshapeFunc(ChangeSize);
SetupRC();
glutMainLoop();
// glutInit(&argc, argv);
// glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB);
// glutInitWindowSize(400, 400);
// glutInitWindowPosition(100, 200);
// glutCreateWindow("Our first GLUT application!");
// glutDisplayFunc(Display);
// Initialize();
// glutMainLoop();
return 0;
}
示例15: main
int main(int argc, char* argv[])
{
glutInit(&argc, argv);
glutInitWindowSize(800,640);
glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH);
glutCreateWindow("Roda Automatica");
glutReshapeFunc(ChangeSize);
glutSpecialFunc(SpecialKeys);
glutKeyboardFunc(keyboard);
glutDisplayFunc(RenderScene);
//glutTimerFunc(330, TimerFunction, 1);
SetupRC();
glutMainLoop();
return 0;
}