non-threaded opengl initialization?

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

non-threaded opengl initialization?

Postby yarik » Sat Jan 10, 2009 8:17 pm

There was GLView1 sample in beta releases of SDK but now there is only sample based on GLThread and android.graphics.OpenGLContext seems to be deprecated :( I've tried to write ogl initialization whithout
creating thread but still can't get it right... Where can I find tutorial? Thanks.
yarik
Freshman
Freshman
 
Posts: 2
Joined: Sat Jan 10, 2009 6:14 pm

Top

Postby mortefer » Sat Jan 10, 2009 10:58 pm

I've started with just studying API demos - OpenGL ES small apps that come with SDK. Pretty much of the code can be copy-pasted from there (i.e. thread init, preparation stuff, etc) and studied later more thoroughly
mortefer
Experienced Developer
Experienced Developer
 
Posts: 54
Joined: Sat Dec 20, 2008 11:24 am

Postby yarik » Sun Jan 11, 2009 11:05 am

>Pretty much of the code can be copy-pasted from there (i.e. thread init, preparation stuff, etc)

Sure, but I dont need thread. Basically the goal is to write BeanShell based virtual machine which will manage the game core. The problem is that I dont have any wish to write lots of various thread stuff, it's much easier
to write all stuff directly in main thread. So I just need advise how to init ogl whithout creating separate thread.
yarik
Freshman
Freshman
 
Posts: 2
Joined: Sat Jan 10, 2009 6:14 pm

Postby MrSnowflake » Sun Jan 11, 2009 12:02 pm

You should use a thread anyway. If can't really do this in the main thread, because the Activity's main thread doesn't have a real loop, which you'd probably use to do rendering. And having this openGl loop thread doesn't mean you have to have multiple threads, just this one and the activity's one and you are done.

I could be wrong, as I don't know what that BeanThingy is... :).
User avatar
MrSnowflake
Moderator
Moderator
 
Posts: 1439
Joined: Sat Feb 16, 2008 3:11 pm
Location: Flanders, Belgium

Top

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

Who is online

Users browsing this forum: No registered users and 3 guests