开发者

Image Resource aren't rotated in Landscape with Android

Hi all this one surely is a simple one but I haven't made sense of is yet.

I'm working on an app in opengl es on android

everything goes well except when I load the textures.

I manage to open load and create all the textures without any problem, but the image displays itself rotated of 90. it looks as if the application does not consider that its is in landscape when opening the image...

I solved the problem by turning all my textures of 90 degrees 开发者_开发百科but I would sure like to figure this one out

because it is the only thing that is not rotated, the top bar is rotated, the touch coordinated are rotated, the h and w of the surface are good,

here are some code snippets that I think are relevant

in the manifest android:screenOrientation="landscape"

on Create of the application

getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);

InputStream is = context.getResources().openRawResource(id);

bitmap = BitmapFactory.decodeStream(is);

GLUtils.texImage2D(GL10.GL_TEXTURE_2D, 0, bitmap, 0);

Any ideas

Jason


Hi all sorry for the inconvenience, I actually figured out that I had inverted 2 lines in my uv map and it happened to look exactly as if all the textures were rotated. sorry about that jason

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜