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


C++ Window::Display方法代码示例

本文整理汇总了C++中sf::Window::Display方法的典型用法代码示例。如果您正苦于以下问题:C++ Window::Display方法的具体用法?C++ Window::Display怎么用?C++ Window::Display使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在sf::Window的用法示例。


在下文中一共展示了Window::Display方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: main

int main(int argc, char** argv) {
    // Put your game loop here (i.e., render with OpenGL, update animation)
    while (window.IsOpened()) {
        window.Display();
    }

    return 0;
}
开发者ID:sylvon,项目名称:AMazing,代码行数:8,代码来源:Main.cpp

示例2: main

int main() {
  Renderable3DS object("models/cat-braizer.3ds");
  object.printInfo();
  while (window.IsOpened()) {
    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
    handleInput();
    createView();
    object.render();
    window.Display();
  }
}
开发者ID:emint,项目名称:scratch,代码行数:11,代码来源:main.cpp

示例3: main

int main(int argc, const char * argv[]) {
    initGL();
    loadShader();
    _scene.initialize("current_mesh_texture.ply");
    InputHandler inputHandler(_window, _window.GetInput(), &_camera);
    while (_window.IsOpened()) {
        inputHandler.handleInput();
        renderFrame();
        _window.Display();
    }
    return 0;
}
开发者ID:tatianai,项目名称:Movie-Maker,代码行数:12,代码来源:main.cpp

示例4: main

int main(int argc, const char **argv)
{	
	init(argc, argv);
	loadAssets();
	while (window.IsOpened()) {
		clockdiff = clck.GetElapsedTime();
		elapsed += clockdiff;
		clck.Reset();
		inputFn();
		renderFn();
		window.Display();
	}
	return 0;
}
开发者ID:mwlow,项目名称:flying,代码行数:14,代码来源:main.cpp

示例5: main

int main(int argc, char** argv) {

    initOpenGL();
    loadAssets();

    // Put your game loop here (i.e., render with OpenGL, update animation)
    while (window.IsOpened()) {
        handleInput();
        renderFrame();
        window.Display();
    }

    return 0;
}
开发者ID:mrotondo,项目名称:ccrma,代码行数:14,代码来源:Main.cpp

示例6: main

int main(int argc, char** argv) {

    initOpenGL();
    loadAssets();
    
    // go to a square Viewport
    glViewport(0, 0, CUBE_MAP_SIZE, CUBE_MAP_SIZE);
    generateEnvironmentMap();
    
    // go to our window Viewport
    glViewport(0, 0, window.GetWidth(), window.GetHeight());

    // Put your game loop here (i.e., render with OpenGL, update animation)
    while (window.IsOpened()) {
        handleInput();
        renderFrame();
        window.Display();
        
        updatePositions();
    }
    
    return 0;
}
开发者ID:,项目名称:,代码行数:23,代码来源:

示例7: main


//.........这里部分代码省略.........
        //cout << delta<< endl;
        
        
        
        
        while (Application.GetEvent(Event))
        {
            
            if (Event.Type == sf::Event::Resized)
                glViewport(0, 0, Event.Size.Width, Event.Size.Height);
            // Fen�tre ferm�e
            if (Event.Type == sf::Event::Closed)
                Application.Close();
            
            // Touche 'echap' appuy�e
            if ((Event.Type == sf::Event::KeyPressed) && (Event.Key.Code == sf::Key::Escape))
                Application.Close();
            if ((Event.Type == sf::Event::KeyReleased) && (Event.Key.Code == sf::Key::Space)) {
                /// box ///////////////////////////////////////////
                // create a shape
                btCollisionShape* shape_kapla = new btBoxShape( btVector3(3,1,15) );
                
                myTransform.setIdentity();
                int dropX((MouseX - windowsWidth/2));
                int dropY((MouseY - windowsHeight/2));
                myTransform.setOrigin(btVector3(dropX,5,dropY));
                
                btVector3 localInertia(0,0,0);
                
                mass = 0.5f;
                
                shape_kapla->calculateLocalInertia( mass, localInertia );
                
                //using motionstate is recommended, it provides interpolation capabilities, and only synchronizes 'active' objects
                myMotionState = new btDefaultMotionState(myTransform);
                btRigidBody::btRigidBodyConstructionInfo myBoxRigidBodyConstructionInfo( mass,myMotionState, shape_kapla, localInertia );
                body_kapla = new btRigidBody(myBoxRigidBodyConstructionInfo);
                
                //add the body to the dynamics world
                
                myWorld->addRigidBody(body_kapla);
                trigger=true;
            }
        }

        Application.SetActive();
         
        
        

        
        //NEED convertiseur coord souris -> coord du plan visible par la cam�ra
        // le d�placement sur le plan de la fen�tre est proportionel � celui du plan de construction
        
        // dessin  le curseur
        //cursor.drawKapla(1,15,3); 
        
        
        //touche espace enfonc�e et relach�e
       if ((Espace))
        {
           
         
        }              
                                   
        if (myWorld)
		{
			myWorld->stepSimulation( 0.0001 );
		}

       
        camcam.display();
        
        cursor.drawKapla(15, 3, 1);
        // On recup�re la matrice OpenGL transform�e par Bullet qu'on appliquera � notre boite
        if (trigger)
        {
                myMotionState->m_graphicsWorldTrans.getOpenGLMatrix( matrix );
            glPushMatrix();
            glMultMatrixf( matrix );
            box(3,1,15);
            glPopMatrix();
            
        }
        
        
		box(100,1,100);
		// On a	ffiche le sol;
        if (test==true)
        {
                   }
		
		
        
		
		// swap buffers, etc
		Application.Display();
        
	}
}
开发者ID:at0mb0y,项目名称:Kapla_graphic_part,代码行数:101,代码来源:main.cpp


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