Jump to content

OpenGL ES 3D drivers, v1 compatibility layer


Recommended Posts

Guest GinKage

Nope. It contains:

Common API (which only allows to request SDK version)

Accelerometer API

Haptics API (i.e. vibration feedback)

LED API

Wheel Key API (not on Omnia 2, though)

Optical Mouse API (again, onl for Omnia 1)

TV Out API

Orientation API

Light Sensor API

Camera Flash API

Slider API (Only for Omnia Pro)

R2VS API (audio enchancements)

Advanced Camera API

FM Radio API

So, no OpenGL API at the moment...

Link to comment
Share on other sites

Guest Chainfire

Indeed not Kaiser3D again :) It's just that the device has no working OpenGL ES 1.x support. It does have OpenGL ES 2.0 support (which is obviously more advanced than v1). Unfortunately, 2 is not backwards compatible with 1 (the ES variants, anyway), though one can emulate 1.x in 2.0. This is however a tricky subject (unless you are a GL expert) so one would rather not do this from scratch - especially as the v1 lib included on these devices does exactly this, but have bug so it doesn't actually work.

Either way, I have seen Samsung folks state at various times that only 2.0 is officially supported. This is too bad, because even though on paper 2.0 is better, I would not expect many currently 1.x apps to be ported to 2.0 (it's not trivial), and expect that for the next year or so new apps will also still be 1.x, as HTC only supports 1.x and it has a much larger userbase.

So, to recap, we have 3D on the new Omnia line, but few apps will be able to use it, which is a damn shame (unless we can get 1.x support working). I somehow doubt using the right lib will fix it up neatly, but it is not impossible. Even so, having a proxy DLL which fixes the issue would be a much better solution than having app authors recompile their apps with different libs - that is even assuming their apps are built in C++.

Perhaps a solution may be to port the initialization routines from the v2 driver to the v1 driver, but that is more easily said than done!

BTW long time no see omikr0n :)

Link to comment
Share on other sites

Guest Omikr0n
Indeed not Kaiser3D again :) It's just that the device has no working OpenGL ES 1.x support. It does have OpenGL ES 2.0 support (which is obviously more advanced than v1). Unfortunately, 2 is not backwards compatible with 1 (the ES variants, anyway), though one can emulate 1.x in 2.0. This is however a tricky subject (unless you are a GL expert) so one would rather not do this from scratch - especially as the v1 lib included on these devices does exactly this, but have bug so it doesn't actually work.

And does OpenGL ES 2.0 have full hardware support with some decent performance? If so, it might not be a lost case afterall. What about drivers Direct3D Mobile? Are they present? An if they are, is D3DM just emulated in OpenGL ES?

BTW long time no see omikr0n :)

Indeed. I've got 3 jobs and a school at the moment, so I don't have much time for anything else. Besides I sold my TyTN II a year ago (I had been too angry at it to use it anymore) and bought HTC S740. Unfortunately, S740 subforum on XDA-devs is almost dead, so there is not much I could participate in there. :)

Link to comment
Share on other sites

Guest zetagnosis
Creating a forwarder libgles_cm is not the issue at all. I made one long before I even started this thread.

The problem is the original DLL's themselves. Try compiling a simple v1 sample (like triangle), using the original OmniaII/Pro drivers - so without the forwarder, just libGLESv1_CM.dll and libEGL.dll. It simply does not work. eglMakeCurrent will fail if libGLESv1_CM.dll is loaded (bad alloc).

You can get around by loading libEGL, libGLESv1_CM and libGLESv2 in a certain order, but actual GL calls will still fail with AV's.

You can get around that by setting up the context by using one of the GLES2 exports in the v1 lib. This will get rid of the AV's, and actually start the compiling of the shaders used to fake v1 functions in v2 (libGLESv1_CM is a v1 emulation driver that translates to v2 call).

You can then actually use v1 functions, and an FPS counter will return FPS in the expected range for the video card to be doing actual work. However, the screen will remain blank, and debug output will return strings along the lines of that the state has not been flushed by the hardware.

Some mixing and matching with M900 drivers has once given me garbled output (like the internal buffers' line length differ between the seperate driver builds).

I've traced various of these problems with IDA, both live as well as doing a lot of reading of the code. It seems that some initialization routines in the v1 lib are creating havoc, but I am as of yet unsure. A friend of mine who was also a part of bringing hardware 3D accel to the HTC Kaiser, Polaris and Nike is also looking at it a bit, but I'm not sure how far he's looked and attempted things ATM.

If you need a beta tester I´m ready !!! TouchWiz suck !! :)

Link to comment
Share on other sites

Guest GinKage

Got my own Omnia 2 today.

Compiled Cute20 sample in GLES2 mode using libs from M8 SDK.

It works.

Update: recompiled my own GLES 1.x test application (simply by replacing libGLES_CM.lib with libGLESv1_CM.lib + libEGL.lib), and it also works! Draws a textured quad, no problem!

Though, it works kinda slow...

Edited by GinKage
Link to comment
Share on other sites

Guest Chainfire
Got my own Omnia 2 today.

Compiled Cute20 sample in GLES2 mode using libs from M8 SDK.

It works.

Update: recompiled my own GLES 1.x test application (simply by replacing libGLES_CM.lib with libGLESv1_CM.lib + libEGL.lib), and it also works! Draws a textured quad, no problem!

Though, it works kinda slow...

Funky, I haven't been able to do this at all. Mind sending over the project (including source, libs, and EXEs?)

Also, did you use the M8 drivers for this? My problem with the M8 SDK was that it imports egl functions from the wrong DLL. How did you work around this?

Edited by Chainfire
Link to comment
Share on other sites

Guest GinKage

Here you go: http://rapidshare.com/files/277671186/Cute20_Demo.rar.html

I used libs from M8 SDK, and excluded headers, lib and dll that came with Cute20 (again, by replacing .h's and .lib with the ones from M8 SDK), and deleted additional include directories in project settings, then added libegl.lib (it originaly compiled using libglesv2.lib that has all the functions within it).

So, I actually use drivers that came with the device, and I only made sure I use headers and libs from M8 SDK, not from the sample itself. And the magic is done. :)

BTW, I also got garbled output at some point, but it was only because of 24bit depth buffer, 16bit worked OK.

Link to comment
Share on other sites

Guest Chainfire
Here you go: http://rapidshare.com/files/277671186/Cute20_Demo.rar.html

I used libs from M8 SDK, and excluded headers, lib and dll that came with Cute20 (again, by replacing .h's and .lib with the ones from M8 SDK), and deleted additional include directories in project settings, then added libegl.lib (it originaly compiled using libglesv2.lib that has all the functions within it).

So, I actually use drivers that came with the device, and I only made sure I use headers and libs from M8 SDK, not from the sample itself. And the magic is done. :)

BTW, I also got garbled output at some point, but it was only because of 24bit depth buffer, 16bit worked OK.

Thanks, and the 1.x thing? (having trouble getting that to work... your Cute20 works on my B7620 as well)

EDIT: With 1.x have the same eglMakeCurrent issue as before

Edited by Chainfire
Link to comment
Share on other sites

Guest Chainfire
Here's the 1.x project: http://rapidshare.com/files/277761153/Screentex.rar.html

As it says in the window title, it uses screenshot as a texture, though it seems Omnia has a limit of 512x512 texture size. To exit the app, just double-tap.

The EXE you compiled crashes on both my I8000 and B7620 ... but both devices are samples. Can any of the other readers here try the screentex.exe you can find the archive linked above on their production Omnia II's and report back if it works for them?

Really strange. Haven't debugged your source code (yet), but I suspect it has the same error as I have been having all along. Strange it works for you (and possibly others) as well!

EDIT/NOTE: The 512x512 limit is 'usual' for mobile devices. Whenever possible I wouldn't use textures larger than 128x128 in any case. I'm not sure about these Samsung devices, but at least HTC devices' rendering slow downs significantly when using textures above 128x128.

Edited by Chainfire
Link to comment
Share on other sites

Guest GinKage

I updated the archive a bit, for the whole app to look a bit better. :)

Well, it basically could mean that the 1.x emulation driver on your test i8000 is a bit... wrong?

Have you tried to run the app with dll's from the previous page?

Anyway, at least we now have 2.0 stable working, with SDK.

Link to comment
Share on other sites

Guest Chainfire
I updated the archive a bit, for the whole app to look a bit better. :)

Well, it basically could mean that the 1.x emulation driver on your test i8000 is a bit... wrong?

Have you tried to run the app with dll's from the previous page?

Anyway, at least we now have 2.0 stable working, with SDK.

Well obviously that is indeed a possibility. But yes, I have tried with the drivers posted earlier in the thread - that is why I asked for them in the first place :)

The rabbit hole can go deep in this case though, as drivers like these are ultimately dependent on a ****load of other things. I may need to flash a completely different ROM to test this myself. That's why I'm asking other Omnia II owners to see if your EXE runs for them. If it does... well, then I got some tinkering ahead of me :)

Link to comment
Share on other sites

Guest nicodega

It's working perfectly :)

I know nothing about open GL (though some years ago I learned a bit but for desktops) but I've realized we don't have libGLES_CM.dll and instead we have libGLESv1_CM on our devices.. is there a way to run programs compiled against libGLES_CM? I'm asking because I realized most demos for HTC devices use that dll, which I read somewhere on the internet is also a part of OpenGL ES 1.1..

Link to comment
Share on other sites

Guest Chainfire
It's working perfectly :)

I know nothing about open GL (though some years ago I learned a bit but for desktops) but I've realized we don't have libGLES_CM.dll and instead we have libGLESv1_CM on our devices.. is there a way to run programs compiled against libGLES_CM? I'm asking because I realized most demos for HTC devices use that dll, which I read somewhere on the internet is also a part of OpenGL ES 1.1..

That is exactly why I started this thread! To make such a thing! But it now seems my Omnia's are beyond working in any case. I'll be flashing to another official ROM ASAP, see if that helps.

Link to comment
Share on other sites

Guest Chainfire

Hmm OK. We're going to need a list of ROMs it does and does not work on. I'll update the first post. Then we going to need to do some file dumping and compare them, see what gives. Everybody please posts your ROM version and whether or not the app works!

Link to comment
Share on other sites

Hmm OK. We're going to need a list of ROMs it does and does not work on. I'll update the first post. Then we going to need to do some file dumping and compare them, see what gives. Everybody please posts your ROM version and whether or not the app works!

Works on XXIG7.

Link to comment
Share on other sites

Guest Chainfire

Still waiting for someone who has it working to post their libGLESv1_CM, libGLESv2 and libEGL :)

Probably also need gles.dll ... but this is a module so you cannot just copy it. Anyone know the ROM extract procedure for the Omnia II ? (I'm not very experienced with Samsung devices... only HTC)

Edited by Chainfire
Link to comment
Share on other sites

Still waiting for someone who has it working to post their libGLESv1_CM, libGLESv2 and libEGL :)

Probably also need gles.dll ... but this is a module so you cannot just copy it. Anyone know the ROM extract procedure for the Omnia II ? (I'm not very experienced with Samsung devices... only HTC)

OpenGL.rar

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.