游戏开发论坛

 找回密码
 立即注册
搜索
查看: 2164|回复: 0

:???????????????????????

[复制链接]

50

主题

69

帖子

69

积分

注册会员

Rank: 2

积分
69
发表于 2010-2-9 10:23:00 | 显示全部楼层 |阅读模式
???????????????????????????????:
#include <cstdlib>
#include <iostream>
#include <GEngine/Main.hpp>

using namespace std;
using namespace core;

int main(int argc, char *argv[])
{   
    Device *device = InitDevice("??????????");
    device->SetClearColor(core::Color(80,100,230));
    int x,y,z;
    //! ??Opengl????
    core::CoordinateSystem cs(COORDINATE_OPENGL);
    device->SetCoordinateSystem(cs);
   
    //! ??2D????
    device->Ortho2D();  
    //! ???????
    core::ResourceManager* resmgr = device->GetResourceManager();
    core::RefPtr<core::Text> defont= resmgr->GetText("default_font");
   
    char text[255];
    char fpstext[20];
    float fps = device->GetFPS();
    BEGIN_LOOP(device);
        device->GetInput()->GetMousePosition(x,y,z);
        sprintf(text,"mouse position is :x = %d, y = %d,z = %d",x,y,z);
        fps = device->GetFPS();
        sprintf(fpstext,"fps is:%f",fps);
        defont->Render(20,20,text);
        defont->Render(540,20,fpstext);
    END_LOOP(device);
   
    device->Close();
    device->Drop();
   
    system(&quotAUSE");
    return EXIT_SUCCESS;
}
??opengl???,??????????
????????????x???,y???,?????????


???? ???????????
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

作品发布|文章投稿|广告合作|关于本站|游戏开发论坛 ( 闽ICP备17032699号-3 )

GMT+8, 2025-10-18 22:46

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表