libgdx package refactoring

I just finished some package refactoring. It only concerns the com.badlogic.gdx.graphics package. What happened?

  • the graphics package now contains the base classes used by all other graphics related classes. This includes things such as Texture, Mesh and so on.
  • the graphics.glutils contains OpenGL ES 1.x and 2.0 related helper classes such as FrameBuffer, ShaderProgram and the like. Usually you won’t touch these (except for ShaderProgram) as they are wrapped by the classes in the graphics package.
  • the graphics.g2d package contains anything related to 2D graphics programming. This includes classes like OrthographicCamera, Sprite, SpriteBatch, BitmapFont and so on.
  • the graphics.g3d package contains anything related to 3D graphics programming. This includes Dave’s neat key-framed and skeletal animation stuff as well as the model loaders. Note that this package is under construction, things will change for 0.9

Why did i do that? Because the old package structure was inconsistent and confusing. If you update to the latest nightlies/the lastest SVN trunk all you need to do in your project is fix up the imports. The easiest way is to open the respective file in error and press ctrl + shit + o in Eclipse which will automagically fix the imports.

The only caveat at the moment: i have yet to recompile the MacOS binaries. If you use anything related to MD5 or the new (and not meant to be used) Gdx2DPixmap class you are out of luck for the time being i’m afraid. Other than that everything will work as is.

Leave a Reply

Your email address will not be published.