MANAGED & UNMANAGED (DYNAMIC )TEXTURES IN LIBGDX (OPENGL CONTEXT LOSS)
来源:互联网 发布:js插件 编辑:程序博客网 时间:2024/05/16 13:38
原文链接http://www.badlogicgames.com/wordpress/?p=1073
文章意思大概:
Opengl Context Loss:incoming call、按home键、电源键、进入另一个Activity(即使是半透明的Activity,onPause了就loss了,虽然这时还能看到缓存的图片,但是Activity back回去了就没了)
Managed Textures :有固定位置 eg new Texture(Gdx.files.internal("data/bg.png"));
Unmanaged (Dynamic)Textures: 没固定位置、内容会改变 eg new Texture(pixmap);
Solution:
1.keep an in-memory copy of the original bitmap used for the texture, apply all your draw calls to that bitmap and upload it to the texture in video ram each time.
2.store a copy on the SD-card, read that in each time you call Texture.draw(), draw the Pixmap to it, upload it to the texture and save the modified image back to the SD card.
0 0
- MANAGED & UNMANAGED (DYNAMIC )TEXTURES IN LIBGDX (OPENGL CONTEXT LOSS)
- Handling unmanaged memory pointers in managed memory
- Managed and Unmanaged Threading in Microsoft Windows
- managed and unmanaged code in c#
- managed, unmanaged
- What is Managed Code and Unmanaged Code in .Net Framework
- Sinking events from managed code in unmanaged C++
- Sinking events from managed code in unmanaged C++
- Differences between Managed and Unmanaged deployments in JBOSS AP7
- How to handle exception in managed code and unmanaged code
- How to handle exception in managed code and unmanaged code
- Managed and Unmanaged code
- Managed/Unmanaged Code Interoperability
- Managed, Unmanaged,Native
- Dynamic Lightmaps in OpenGL
- How to Creat Dynamic Textures in Unreal Engine 4
- Managed code and Unmanaged code
- Managed Code and unmanaged Code
- 再看 --Handler sendMessage 与 obtainMessage (sendToTarget)比较
- android 直接打开指定网页
- 最优化--等式约束最优性条件
- js读取json格式
- HttpLive 总结:
- MANAGED & UNMANAGED (DYNAMIC )TEXTURES IN LIBGDX (OPENGL CONTEXT LOSS)
- Android机顶盒 获取当前连接网络的Ip地址
- C++中const笔记和其他
- WPF listbox异步绑定数据IsAsync=True
- [转]Go程序GC优化经验分享
- C#发布项目编译的时候App.config文件可能会出的一种错误
- jira控制面板查看项目进展情况
- 初学者如何理解网络协议(一)
- cocos2d-x 数学函数、常用宏整理(1)