java - Is height along the x-axis and width along the y-axis in libgdx? -


shouldn't convention in reverse?

desktop app config

cfg.width = 454; cfg.height = 756; 

//logcat shows what's expected

gdx.app.log("height",integer.tostring(gdx.graphics.getheight()));.//756 gdx.app.log("width",integer.tostring(gdx.graphics.getwidth()));//454 

but this:

shaperenderer.line(40, 400, 700, 400); 

produces line:

enter image description here

by default no. libgdx uses opengl's default origin in bottom left corner, y going , x going right.

your camera messed up.

looks you're running on mac. using robovm or mono? robovm support new. possible there's bug.


Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

php - joomla get content in onBeforeCompileHead function -