OpenGL ES 2.0 Emulator

Started by
14 comments, last by crosstantine 12 years, 10 months ago
Hi all, and thanks in advance for your help, I spend several hours trying to run the hellogl inside the Android emulator that comes with the SDK, I was pulling my hair (and believe me... I've a lot!) and always got the f..ng message that the application exploted and was forced to close... I started to debug and it did not explote... it worked!!!, but still got the error inside the emulator, then I search and found in some forum that Android emulator does not support OpenGL ES 2.0, got the apk uploaded it on my phone, and voila!!! it worked... (it's frustrating too waste time like this)

Here's the question... if I cannot test my applications in a "save" environment, how can I develop and debug a game to be deployed on an android phone? I found that http://www.malideveloper.com/developer-resources/tools/opengl-es-20-emulator.php has an opengl emulator but its crappy to recompile your application to test it under this emulator, isn't it?

I'm thinking the best way should be to create the game for desktop platform with the OpenGL ES restrictions using OpenGL (as far as OpenGL ES is a subset of OpenGL) and then refactor the code to run on an Android, but I think there should be a better way to do this,

As usual, thanks in advance for sharing your knowledge with newbies like me

Note: Why I'm using OpenGL ES from C code?, because I want to deploy my game on iphone too, and I think it will be better if I create all the "engine" of the game in plain C as a library and then wrap the input devices using some classes for each platform.
Advertisement
I never went trough the process, so someone else probably have better answers. But. A quick search allowed me to find "NVIDIA x86 Windows OpenGL ES 2.0 Emulator" that seems to have been developed to support developing on "tegra" chips, which are included in some Android phones. As for the iphone, you will have to port your project to Objective-C, it don't support normal C/C++.
Hi Dunge and thanks for your reply, as far as I understood Objective-C can call libraries made in plain C, is that false? I misunderstood this point? What I was thinking it could be a good approach to do a multiplatform game (android and iphone) will be to create a component to manage all the OpenGL details and create the application using the language according to the platform, that way the events from each device will be forwarded to the library to be manage in an standard way, most of the game logic will be in a dll and all the graphic management will be in another one... this is what I'm thinking:



--------------------
| App in iPhone |
| Objective - C |---------|
-------------------- | |--------------------| |----------------|
|----> | Common Component |----> | OpenGL pure |
-------------------- | | Application Logic | | c and c++ code |
| App in Android | | | and Input wrappers | | "game engine" |
| Java |---------| |--------------------| |----------------|
--------------------

[font="Courier New"][font="arial, verdana, tahoma, sans-serif"]
[/font][/font]
[font="Courier New"][font="arial, verdana, tahoma, sans-serif"]The first layer will be written in java or objective-c based on the platform requirements and the other two components will be written in plain c and compiled to be used as static or dynamic libraries, am I missing something? should I create two different applications both written to the target platform? (I already have an desktop application running on windows, linux and Mac and this was my approach to them, it worked very nice but I used Qt for the presentation layer to avoid the rewriting and all the logic rest in libraries that could be recompiled without any painful refactoring.)[/font][/font][/font][/font]
I found the imgtec SDKs really useful when porting my companies engine to support es1 & es2 pipelines, there's also a lot of other good tools and information on their site.
http://www.imgtec.com/developers.asp

We utilise a simple platform application wrapper over the top of engine / client code which allows us use pretty much the same code base on all the different platforms. It made debugging and development go a lot smoother and was an awesome help in the development of Bug Wings, http://itunes.apple.com/gb/app/bug-wings/id437473178.

Their SDK also allows you to capture API calls through PVRTrace and if your writing any shaders for the iphone I'd recommend using their PVRUniSCo editor.

Hi Dunge and thanks for your reply, as far as I understood Objective-C can call libraries made in plain C, is that false?

It is not false. It is true. You will have much more trouble integrating into Java on Android, but not so much that your approach is not the correct one.

Stephen M. Webb
Professional Free Software Developer

I also recommend the Imgtec SDK.
Latest project: Sideways Racing on the iPad
Thanks for the replies,

Jan thanks for the link I will give it a look, but I'm the kind of programmer that likes to build his own frameworks and only use free ones (not because the commercial aren't any good, it's because I don't like to be tied to any major change on some little company... that happens very ofter these days, a good idea is bought by a monster company and change the rules and you get into a trouble in the middle)

Bregma, thanks also for your reply,

I'm thinking to use some kind of framework like freeglut, glfw or something like that, did you use them to achieve portability? I don't know if one of those are ported successfully to iphone and android, most of them works on apple, windows and linux, but they dont say anything about mobile market, does anyone knows if there's a portability layer (like the ones I mentioned or others) to do an abstraction of the initialization and events models? (also, destruction, etc etc)
Backing to the point of the thread, what emulator for GL ES do you recomend? the one that comes with android sdk does not support OpenGL ES 2 and shows a beatiful "force to close" message.

I see that imgtec has an emulator named PVRVFrame did you use it? is it free?
There are a lot of OpenGL ES 2.0 emulators available:
http://www.imgtec.com/powervr/insider/sdk/KhronosOpenGLES2xSGX.asp
http://www.malideveloper.com/developer-resources/tools/opengl-es-20-emulator.php
http://developer.qualcomm.com/showcase/adreno-sdk
http://developer.nvidia.com/tegra-resources

Each of them supports their hardware specific features (like DXTC for Tegra, or PVRTC for PoverVR).

Also there is option to use Angle project from Google: http://code.google.com/p/angleproject/ It actually emulates OpenGL ES 2.0 on top of DirectX 9. Those emulators above emulates OGLES through regular desktop OpenGL.
I myself like Angle project "emulation" the most, because I can access full source and examine some implementation detail if I need more information.

There are a lot of OpenGL ES 2.0 emulators available:
http://www.imgtec.co...enGLES2xSGX.asp
http://www.malidevel...20-emulator.php
http://developer.qua...case/adreno-sdk
http://developer.nvi...tegra-resources

Each of them supports their hardware specific features (like DXTC for Tegra, or PVRTC for PoverVR).

Also there is option to use Angle project from Google: http://code.google.com/p/angleproject/ It actually emulates OpenGL ES 2.0 on top of DirectX 9. Those emulators above emulates OGLES through regular desktop OpenGL.
I myself like Angle project "emulation" the most, because I can access full source and examine some implementation detail if I need more information.



Great reply, thanks MartinsM, I saw the mali emulator, but what I didn't like is the idea of recompiling the code using their emulator libraries mainly because most of this kind of solution does not ensure the code will run in the real hardware, if you need to recompile your solution is still an emulation? or is just a layer to run a code on another platform? I think the main purpose of an emulation is to provide an environment where you could safely test your application and ensure it will run on the target platform that the emulation is target to. Maybe I'm too skeptical because I had some hard time with emulators in the past (not android emulators)

I will check the other links as well, I'm wondering if you worked with some of them and have some feedback about their pros and cons.

This topic is closed to new replies.

Advertisement