Getting started with cegui 1 cegui Rendering

Source: Internet
Author: User
Getting started with cegui 1cegui rendering: it takes at least three steps to run cegui. 1. Create cegui: Renderer object. 2. Create cegui: System Object. 3. Call the rendering function of course, to implement a real game GUI, you also need to load relevant data files and perform some basic initial operations. You also need to process user input. 1. Create a cegui: Renderer object. This step is quite intuitive. For supported rendering components (Direct3D9 OpenGL ogre3d Etc ..), this step should be okay. Of course, remember to include the header file of the rendering component used. Direct3d 8.1 cegui: Using * myrenderer = new cegui: Using (myd3d89device); Direct3D9 cegui: Using * myrenderer = new cegui: Using (myd3d9device, 0); OpenGL cegui:: openglrenderer * myrenderer = new cegui: openglrenderer (0); ogre3d cegui: blank * = new cegui: ogreceguirenderer (myrenderwindow) 2 create cegui :: system Object to initialize the system. This step is simple, too. Only need new A cegui: System Object. And transmit the pointer of the just-created cegui: Renderer object to him. In this case, the entire system will automatically Initialize New cegui: System (myrenderer) 3 to call the rendering function, which is different from the engine used. To put it bluntly, all you need to do is call cegui: System: rendergui after each frame is rendered. Ogre3d automatically completes this step. It is also very easy for other engines. Direct3d 81/9 myd3ddevice-> beginscene (); myd3ddevice-> clear (, d3dclear_target, d3dcolor_xrgb (, 0), 1.0f, 0); draw3dscene (); cegui: System :: getsingleton (). rendergui (); myd3ddevice-> endscene (); myd3ddevice-> present (0, 0, 0); Summary This is just the most preliminary introduction to running cegui
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.