4worldpeace

博客园 首页 新随笔 联系 订阅 管理

2013年11月4日 #

摘要: Texture atlas [1][2] is a technique to group smaller textures into a larger texture. This decreases the number of state switches [3]a renderer needs to do and therefore often increases performance. Texture atlases have been used for a long time in the video game industry for sprite animations. When 阅读全文
posted @ 2013-11-04 09:18 4worldpeace 阅读(455) 评论(0) 推荐(0) 编辑

摘要: // 基于扩展NVX_gpu_memory_info extension UINT QueryNVidiaCardMemory() { __try { int iVal = 0; glGetIntegerv( GPU_MEMORY_INFO_DEDICATED_VIDMEM_NVX, &iVal ); return (UINT)iVal/1024; } __except(1) { } return 0; } // 基于扩展WGL_AMD_gpu_assoc... 阅读全文
posted @ 2013-11-04 09:14 4worldpeace 阅读(1085) 评论(1) 推荐(0) 编辑

摘要: 下面说明一下,在Unity 里是怎么样加载声音文件的。Unity同时支持单声道和立体声音频资产。Unity支持导入以下音频文件格式:.aif, .wav, .mp3, 和 .ogg,和以下音轨模块:.xm, .mod, .it,和.s3m这里可以按类型搜索。一般背景音乐我们选择立体声音,音效选择单声道声音。在搜索栏中输入t:AudioClip选中声音文件 检视面板中可以看到文件属性,后面再详细介绍。这里可以点击播放按钮,试听一下效果。把声音文件拖到到场景中某个游戏物体上,这里我们新建一个空的物体。并把声音文件拖到上面。选择之后检视面板。Play On Awake:打勾就意味着在预制对象调用之初 阅读全文
posted @ 2013-11-04 08:50 4worldpeace 阅读(2118) 评论(0) 推荐(0) 编辑