惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

D
DataBreaches.Net
GbyAI
GbyAI
aimingoo的专栏
aimingoo的专栏
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
月光博客
月光博客
大猫的无限游戏
大猫的无限游戏
M
MIT News - Artificial intelligence
腾讯CDC
博客园 - Franky
Engineering at Meta
Engineering at Meta
C
Check Point Blog
T
The Blog of Author Tim Ferriss
有赞技术团队
有赞技术团队
Microsoft Azure Blog
Microsoft Azure Blog
MyScale Blog
MyScale Blog
I
InfoQ
Blog — PlanetScale
Blog — PlanetScale
P
Proofpoint News Feed
The GitHub Blog
The GitHub Blog
N
Netflix TechBlog - Medium
Last Week in AI
Last Week in AI
S
SegmentFault 最新的问题
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
WordPress大学
WordPress大学

博客园 - 安徽飞雪游戏工作室

贴几张我们用irrlicht做的游戏截图 jpg图片效果有点差,看起来是不是有点像劲舞团? 3dmax导出为my3d教程 3dmax文件导出到ms3d文件. irrlicht1.3中文支持 Audiere PK OpenAL 【原创】IrrLicht中ms3D模型不支持多个贴图问题的解决 【引】[翻译]Irrlicht引擎里的冲突检测与响应 [原创]IrrLicht中MS3D模型骨骼动画支持bug的排除 MS3D model 的 Frame count - 安徽飞雪游戏工作室 材质动画 Irrlicht 论坛好贴 精选(不断补充中...) [转]Scrolling Credits Code [转](C++) How to animate and move an entity [原创]为Irrlicht中的人物添加武器 [原创]Irrlicht中的Texture透明色(colorkey) [原创]IrrLicht的GUI使用 [原创]IrrLicht-1.0中文支持 [原创]一个在Irrlicht中会常用的字符串转换函数 [转]宽字符标量L"xx"在VC6.0/7.0和GNU g++中的不同实现。
从内存中加载图片资源
安徽飞雪游戏工作室 · 2008-01-13 · via 博客园 - 安徽飞雪游戏工作室

1 使用工具将文件转为字节数组,这里用[bin2h.exe]
    比如准备个文件 testpng.png
    使用命令
        bin2h testpng.png
    将生成 testpng.h,内容如下
        unsigned int testpng_size=<size>;
        unsigned char testpng[]={...};
2 将文件加入到工程中
    使用如下代码获取ITextrue接口,env为IGUIEnvironment
    //包含文件
    #include "testpng.h"
    ....
    //获得文件系统
     IFileSystem * pFS = env->getFileSystem();
    //创建读文件接口,这里特别注意第3个参数,其后缀一定要和文件格式一致,如果用的是bmp,则应该是testpng.bmp
     IReadFile * pMFR = pFS->createMemoryReadFile(testpng,testpng_size,"testpng.png",false);
    //获取Texture
     ITexture * pTxtPng = driver->getTexture(pMFR);
3 使用pTxtPng

posted on 2008-01-13 15:26  安徽飞雪游戏工作室  阅读(986)  评论()    收藏  举报