LIBGDX
KAKASHIJUST
这个作者很懒,什么都没留下…
展开
-
LIBGDX BOX2D filter
Filter有3种属性 public short categoryBits = 0x0001; //Normally you would just set one bit 设置一位为1就好了 public short maskBits = -1; public short groupIndex = 0; categoryBits和maskBits配合使用,groupInd原创 2013-10-01 00:06:04 · 1205 阅读 · 0 评论 -
LIBGDX 按电源键 返回游戏出现白屏
看奋斗小土豆丶的文章,发现确实有这么一个问题,根据他的提示,自己捣鼓了一下。 如果游戏本来是横屏的,我的机子9100按电源键的一瞬间发现会变竖屏,所以感觉configChanges应该添加orientation属性。 再看Api Guide,发现targetSdkVersion 13之后configChanges需要定义orientation和screenSize so解原创 2013-10-02 10:22:21 · 815 阅读 · 0 评论 -
LIBGDX 源码分析 OrthographicCamera glViewport
OrthographicCamera camera=new OrthographicCamera (); camera.setToOrtho(false,800,480);//params boolean yDown, float viewportWidth, float viewportHeight setToOrtho函数功能 setToOrtho(params boolea原创 2013-10-07 23:56:35 · 2048 阅读 · 0 评论 -
LIBGDX BOX2D JOINT介绍
Joint depends on JointDef JointDef 属性: type = JointType.Unknown bodyA = null //first attached body bodyB = null collideConnected = false 创建Joint World::createJoint(JointDef def),根据def的typ原创 2013-09-29 17:45:05 · 1071 阅读 · 0 评论 -
Libgdx AssetManager资源加载
AssetManager的使用 小游戏,资源没这么多,可以无需使用AssetManager,但要用的话,AssetManager有它的优势: 1.独立的一个地方管理资源 2.可以控制同步或者异步加载 3.提供FileHandleResolver,自定义各种类型资源的加载 步骤一:load各种资源 manager.load("data/mytexture.png", Texture.原创 2013-12-13 16:48:59 · 1397 阅读 · 0 评论 -
Libgdx 遇到的一些问题
一、position origin Box2d里,body的几个概念 1.position body的位置 2.origin 相当于position,用于rotate,body的origin默认为(0,0),所以setRotate的话,是以origin为轴心 3.PolygonShape里的vertices,这些点相对于position,要逆时针设置,不过顺时针好像也能运行原创 2013-12-18 19:10:15 · 835 阅读 · 0 评论 -
MANAGED & UNMANAGED (DYNAMIC )TEXTURES IN LIBGDX (OPENGL CONTEXT LOSS)
原文链接http://www.badlogicgames.com/wordpress/?p=1073 文章意思大概: opengl> 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 t原创 2013-12-25 17:21:48 · 1202 阅读 · 0 评论