本文整理汇总了C++中Sphere::loadBufferData方法的典型用法代码示例。如果您正苦于以下问题:C++ Sphere::loadBufferData方法的具体用法?C++ Sphere::loadBufferData怎么用?C++ Sphere::loadBufferData使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Sphere
的用法示例。
在下文中一共展示了Sphere::loadBufferData方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
//.........这里部分代码省略.........
firework->setVelocity(4);
firework->usePhysicDirectionGravity(glm::vec4(0.0,-1.0,0.0,0.1), 1.0f);
//firework->addTexture(*fireWorkYellowTex, 0.0);
//firework->defineLook(true, 0.8, 0.1, 0.2);
Emitter* firework2 = new Emitter(0, glm::vec3(-0.6, -0.6, 0.0), 0.0, 0.5, 5, 1.0, true);
firework2->setVelocity(4);
firework2->usePhysicDirectionGravity(glm::vec4(0.0, -1.0, 0.0, 0.1), 1.0f);
//firework2->addTexture(*fireWorkOrangeTex, 0.0);
//firework2->defineLook(true, 0.8, 0.1, 0.2);
//////////////////////////////////////OUR SCENE///////////////////////////////////////////////
//SKYBOX
Cube cube;
const char *textureNames[6] = {
/*(char*)RESOURCES_PATH "/PereaBeach1/posx.jpg",
(char*)RESOURCES_PATH "/PereaBeach1/negx.jpg",
(char*)RESOURCES_PATH "/PereaBeach1/posy.jpg",
(char*)RESOURCES_PATH "/PereaBeach1/negy.jpg",
(char*)RESOURCES_PATH "/PereaBeach1/posz.jpg",
(char*)RESOURCES_PATH "/PereaBeach1/negz.jpg"*/
(char*)RESOURCES_PATH "/Color/testTex.png",
(char*)RESOURCES_PATH "/Color/testTex.png",
(char*)RESOURCES_PATH "/Color/testTex.png",
(char*)RESOURCES_PATH "/Color/testTex.png",
(char*)RESOURCES_PATH "/Color/testTex.png",
(char*)RESOURCES_PATH "/Color/testTex.png" };
Skybox skybox(textureNames);
Node skyboxNode("skybox");
skyboxNode.addGeometry(&cube);
//OBJECTS
Teapot teapot;
teapot.loadBufferData();
Sphere sphere;
sphere.loadBufferData();
Rect plane;
plane.loadBufferData();
//TEXTURES
Texture chrome((char*)RESOURCES_PATH "/Metal/chrome.jpg");
Texture marble((char*)RESOURCES_PATH "/Wall/seamless_marble.png"); //TODO JPG
Texture cvLogo((char*)RESOURCES_PATH "/Symbol/cv_logo.bmp");
Texture bricks((char*)RESOURCES_PATH "/Wall/brick.bmp");
//CREATING NODES
Level testLevel("testLevel");
Scene testScene("testScene");
testLevel.addScene(&testScene);
testLevel.changeScene("testScene");
Node cube1("cube1");
cube1.addGeometry(&cube);
cube1.addTexture(&chrome);
cube1.setModelMatrix(glm::translate(cube1.getModelMatrix(), glm::vec3(-0.3, 0.25, 0.4)));
cube1.setModelMatrix(glm::scale(cube1.getModelMatrix(), glm::vec3(0.3, 0.3, 0.3)));
Node cube2("cube2");
cube2.addGeometry(&cube);
cube2.addTexture(&chrome);
cube2.setModelMatrix(glm::translate(cube2.getModelMatrix(), glm::vec3(0.7, 0.25, 0.4)));
cube2.setModelMatrix(glm::scale(cube2.getModelMatrix(), glm::vec3(0.3, 0.3, 0.3)));
Node wallNode1("wall1");
wallNode1.addGeometry(&plane);
wallNode1.addTexture(&marble);