本文整理汇总了C++中GLTexture::Load方法的典型用法代码示例。如果您正苦于以下问题:C++ GLTexture::Load方法的具体用法?C++ GLTexture::Load怎么用?C++ GLTexture::Load使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GLTexture
的用法示例。
在下文中一共展示了GLTexture::Load方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main(int argc, char** argv) {
glutInit(&argc, argv);
cameraX = 0;
cameraY = 30;
cameraZ = 150;
eyeX = 0;
eyeY = 0;
eyeZ = 0;
lastLevel = 0;
cameraAcceleration = 0.1;
timerTime = 2 * 1000;
lastLevel += ((rand() % 10) + 40);
jump = false;
characterSpeed = 0.8;
jumpTime = clock();
jumpBeginY = clock();
/*
int x = ((rand() % 10) + 45);
int direction = ((rand() % 10) - 15);*/
int x = ((rand() % 10) + 705);
int direction = 0;
character.x = direction;
character.y = lastLevel + 5;
Level level1 = *new Level(x, lastLevel, direction);
level1.levelBefore = new Level(-1000021, -111, 0);
Levels.push_back(level1);
character.setLevel(level1);
glutInitWindowSize(800, 1000);
glutInitWindowPosition(50, 50);
glutCreateWindow("Icy Tower");
glutDisplayFunc(Display);
glutIdleFunc(Anim);
glutKeyboardFunc(key);
glutMouseFunc(Mouse);
glutTimerFunc(0, Timer, 0);
glutTimerFunc(0, Timer2, 0);
glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB | GLUT_DEPTH);
glClearColor(1.0f, 1.0f, 1.0f, 0.0f);
glEnable(GL_DEPTH_TEST);
glEnable(GL_LIGHTING);
glEnable(GL_LIGHT0);
glEnable(GL_LIGHT1);
glEnable(GL_NORMALIZE);
glEnable(GL_COLOR_MATERIAL);
glShadeModel(GL_SMOOTH);
character.c.Load("Models/character.3ds");
banana.Load("Models/banana.3ds");
level.Load("Textures/brick3.bmp");
skyFront.Load("Textures/brick.bmp");
skyBack.Load("Textures/brick.bmp");
skyLeft.Load("Textures/brick2.bmp");
skyRight.Load("Textures/brick2.bmp");
skyUp.Load("Textures/brick.bmp");
skyDown.Load("Textures/grass2.bmp");
glutMainLoop();
}