当前位置: 首页>>代码示例>>C++>>正文


C++ SetupRC函数代码示例

本文整理汇总了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;
}
开发者ID:Daft-Freak,项目名称:vogl,代码行数:45,代码来源:vertexblending.c

示例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;
}
开发者ID:reima,项目名称:ogl-docs-mirror,代码行数:45,代码来源:vertexshaders.cpp

示例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;
	}
开发者ID:reima,项目名称:ogl-docs-mirror,代码行数:18,代码来源:thunderbird.cpp

示例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;
}
开发者ID:danielgrigg,项目名称:sandbox,代码行数:18,代码来源:Skeleton.cpp

示例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;
}
开发者ID:Veronica159,项目名称:opengl2015,代码行数:19,代码来源:project1.cpp

示例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;
}
开发者ID:boztalay,项目名称:OldProjects,代码行数:18,代码来源:Evolution3.cpp

示例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;
}
开发者ID:pjc0247,项目名称:TankOnline,代码行数:18,代码来源:patcher.cpp

示例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;
}
开发者ID:CocoMoon,项目名称:OpenGL_BaoDian,代码行数:18,代码来源:main.cpp

示例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();
}
开发者ID:HVisionSensing,项目名称:OpenGLES2.0_OBJ,代码行数:20,代码来源:code_3_12.c

示例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;
    }
开发者ID:quyenanh46dp,项目名称:Jingz_CPP_lab,代码行数:19,代码来源:sphereworld.cpp

示例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;
}
开发者ID:abiles,项目名称:graphicsProject,代码行数:19,代码来源:HomeWork4.cpp

示例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();
}
开发者ID:dlakwwkd,项目名称:OpenGLPractice,代码行数:19,代码来源:triangle.cpp

示例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;
    }
开发者ID:CodeBees,项目名称:OpenGLSuperBible5ANGLE,代码行数:45,代码来源:Tunnel.cpp

示例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; 
}
开发者ID:vadimradyno,项目名称:lessons,代码行数:19,代码来源:open_gl_project.cpp

示例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;
}
开发者ID:ViniciusCdeAlmeida,项目名称:OpenGL,代码行数:19,代码来源:Bike.c


注:本文中的SetupRC函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。