| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 738 人关注过本帖
标题:c++hge引擎 加载图片加载出来是白板
只看楼主 加入收藏
a199121413
Rank: 1
来 自:重庆
等 级:新手上路
帖 子:2
专家分:4
注 册:2013-5-10
收藏
 问题点数:0 回复次数:0 
c++hge引擎 加载图片加载出来是白板
c++hge引擎 加载图片加载出来是白板是什么问题代码是:

#include "stdafx.h"
#include "YuChiYu.h"
#include <iostream>
#include <hge.h>
#include <hgeSprite.h>
using namespace std;
hgeSprite *spr=NULL;
HGE *g_hge = NULL;

bool frame()
{
    return false;
}

bool render()
{
    g_hge->Gfx_BeginScene();
    g_hge->Gfx_Clear(0);
    spr->Render(0,0);
    g_hge->Gfx_EndScene();
    return false;
}
int WINAPI WinMain(HINSTANCE,HINSTANCE,LPSTR,int)
{
     g_hge=hgeCreate(HGE_VERSION);//实例化
    //相当与 Windows 32项目中的消息循环
    g_hge->System_SetState(HGE_FRAMEFUNC,frame);//调用逻辑
    g_hge->System_SetState(HGE_RENDERFUNC,render);//调用绘制
   
    g_hge->System_SetState(HGE_WINDOWED,true);//创建窗口 true 为窗口 默认大小800x600
    g_hge->System_SetState(HGE_SCREENWIDTH,800);
    g_hge->System_SetState(HGE_SCREENHEIGHT,600);
    g_hge->System_SetState(HGE_USESOUND,true);//添加音乐
    g_hge->System_SetState(HGE_FPS,20);//针数 默认是999
   
    g_hge->System_SetState(HGE_HIDEMOUSE,false);//显示鼠标
    g_hge->System_SetState(HGE_TITLE,"LEI XIAO SONG");
    if (g_hge->System_Initiate())//系统初始化
    {
        spr=new hgeSprite(g_hge->Texture_Load("123.jpg"),0,0,800,600);
        
        g_hge->System_Start();
    }
    // 鼠标毛点
    g_hge->System_Shutdown();
    g_hge->Release();
    delete spr;
    return 0;

}
求大神指点



搜索更多相关主题的帖子: false include frame return 
2013-05-10 15:20
快速回复:c++hge引擎 加载图片加载出来是白板
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.017486 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved