Known issues with HTC hero 1.5 fw and OpenGL ES ?

Tutorials concerning the OpenGL® ES cross-platform API for full-function 2D and 3D graphics on the Google-Android platform.

Known issues with HTC hero 1.5 fw and OpenGL ES ?

Postby Skywhy » Sun Nov 08, 2009 2:19 pm

Yeah, I'm kind of having interesting problems with my current openGL game. It runs perfectly fine on 1.6 and 1.5 emulators but when I upload it into my htc hero 1.5 it nothing appears. Well the game does start, it does clear the screen colours to what it should be but when I try to render to screen using normal vertex and index buffers via glVertexPointer() and glDrawElements() absolutely nothing appears on the screen.

It does the gl.glClearScreen() and clears the screen to set colour but no given vertices are rendered. Any ideas what is going on? It's mighty confusing if nothing else. I went through it with the debugger and it goes to the rendering thread, performs the operations and such but nothing just appears and it works perfectly fine on different versions on the emulator.

Is there something I'm completely missing now, or?
Skywhy
Developer
Developer
 
Posts: 35
Joined: Tue Oct 20, 2009 7:55 pm

Top

Postby Shaka » Sun Nov 08, 2009 6:47 pm

Interesting. I just created a post asking about problems with glDrawElements. I'm also using a HTC Hero 1.5.
I haven't tried running the game on an emulator, will have to do that and see if the device is the problem.
Shaka
Developer
Developer
 
Posts: 44
Joined: Fri Aug 28, 2009 3:01 pm

Postby Skywhy » Sun Nov 08, 2009 9:34 pm

Do let me know how your test goes. Cheers. :wink:
Skywhy
Developer
Developer
 
Posts: 35
Joined: Tue Oct 20, 2009 7:55 pm

Postby Shaka » Fri Nov 13, 2009 8:02 am

It works fine on the emulator but wont show anything on the Hero.
Skywyh: Are you using fixed point for your vertex data?
Shaka
Developer
Developer
 
Posts: 44
Joined: Fri Aug 28, 2009 3:01 pm

Postby Skywhy » Sat Nov 14, 2009 10:43 pm

Integer buffers, why? I tried using float buffers at one point but nothing really changed.
Skywhy
Developer
Developer
 
Posts: 35
Joined: Tue Oct 20, 2009 7:55 pm

Postby Shaka » Mon Nov 16, 2009 2:11 pm

Ok, I've only tried with fixed point buffers, wanted to check if that was the problem, but appearantly it isn't. I've got it to work with my md2 model loader in perspective mode, but if I try to do it in orthographic nothing shows up.
Shaka
Developer
Developer
 
Posts: 44
Joined: Fri Aug 28, 2009 3:01 pm

Top

Postby Skywhy » Mon Nov 16, 2009 3:09 pm

I solved my problem. Before I was initialising OpenGL with the help of EGL, someone suggested that I should try using GLSurfaceView(this way I don't have to touch EGL) and it works like a wonder now. So using GLSurfaceView was definitely the correct choice for me to go with plus I can throw away the EGL now that wasn't really proving to be any real use for me.

So to conclude I guess I had something funky going on with the initialisation of OpenGL when using EGL... Don't know for sure, it's too bad I didn't figure it out completely but for now I need to move on with this project so swapping it out was just easier.


// SkyWhy
Skywhy
Developer
Developer
 
Posts: 35
Joined: Tue Oct 20, 2009 7:55 pm

Postby Shaka » Mon Nov 16, 2009 4:28 pm

Awesome!

You don't happen to have tried orthographic mode? Still can't get that to work on the phone.
Shaka
Developer
Developer
 
Posts: 44
Joined: Fri Aug 28, 2009 3:01 pm

Postby Skywhy » Mon Nov 16, 2009 4:45 pm

I have, it works.
Skywhy
Developer
Developer
 
Posts: 35
Joined: Tue Oct 20, 2009 7:55 pm

Postby Shaka » Tue Nov 17, 2009 1:22 pm

Ok, that's great, atleast I know it SHOULD work :) I'll have to look into it.
It would be greatly appreciated if you could post your initialization code.
Shaka
Developer
Developer
 
Posts: 44
Joined: Fri Aug 28, 2009 3:01 pm

Postby Skywhy » Tue Nov 17, 2009 4:27 pm

From the top of my head the OpenGL initialisation (does not have to go through all the stuff you have to do with EGL... which is HORRID):

enable vertex arrays
enable flat shading
disable lights
disable dithering
gl.glMatrixMode() & GLU.gluOrtho2D() >> here

and umm...

I think that's about it. That happens in the "onSurfaceChanged()" -method of rendering(Renderer) thread. This all is done extending the GLSurfaceView class. Naturally I assign the renderer to the GlSurfaceView with setRenderer() so it knows what renderer to call.

But hope that helps at least a bit.

EDIT #1:
if you want to know more about GlsurfaceView, click here.
Skywhy
Developer
Developer
 
Posts: 35
Joined: Tue Oct 20, 2009 7:55 pm

Postby Shaka » Tue Nov 17, 2009 6:15 pm

Got it working now, I have no clue what I did but suddenly it started to show my graphics on the phone :P Oh, I was already running GLSurfaceView, sorry if I didn't make that clear. If you encounter any other obstacles while developing, please do post about it :)
Regards/Per
Shaka
Developer
Developer
 
Posts: 44
Joined: Fri Aug 28, 2009 3:01 pm

Postby tijay » Thu Nov 19, 2009 11:38 pm

i have a question about your tests with OpenGL ES and the HTC Hero, have you checked if the rendering is done in hardware ?

My wife has received one today but i was not able to take it to check :lol:

i will try tomorrow to look at the boot log and the renderer used.

i'm currently developping on a archos 5 it and i'm having problem with opengl hardware acceleration (it seems it's not implemented, i'm waiting for an answer from archos) and i may use the Hero to test instead of my archos 5.
tijay
Once Poster
Once Poster
 
Posts: 1
Joined: Thu Nov 19, 2009 11:19 pm

Top

Return to Android 2D/3D Graphics - OpenGL Tutorials

Who is online

Users browsing this forum: No registered users and 2 guests