Author Topic: State of OpenGL ES2.0 support  (Read 37901 times)

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: State of OpenGL ES2.0 support
« Reply #15 on: May 26, 2011, 12:05:17 am »
What is interesting is, that devices like the LG P999, that are using the NVidia Tegra 2 GPU instead of the common PowerVR, suck at these high polygon tests too when compared to PowerVR chips (all running with 1.1 of course). That might be an indicator that the PowerVR chips still have dedicated hardware for the fixed function pipeline while the NVidia haven't. Just a guess, but it seems reasonable to me...

Offline Simdanfeg

  • byte
  • *
  • Posts: 41
    • View Profile
Re: State of OpenGL ES2.0 support
« Reply #16 on: May 26, 2011, 05:28:41 am »
eh,can you open up the source code of some of the above?They look very nice. :o

Offline Thomas.

  • double
  • *****
  • Posts: 833
    • View Profile
Re: State of OpenGL ES2.0 support
« Reply #17 on: May 26, 2011, 10:30:22 am »
Oh, I did not expected so bad result... is there any chance to optimalization?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: State of OpenGL ES2.0 support
« Reply #18 on: May 26, 2011, 02:24:32 pm »
Not much IMHO. One can try to tweak the shader once its finished, but don't expect any miracles...

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: State of OpenGL ES2.0 support
« Reply #19 on: May 26, 2011, 02:27:35 pm »
eh,can you open up the source code of some of the above?They look very nice. :o
Both are open. You'll find that tree scene on AE's projects page and the Alien Runner sources can be found in the Alien Runner thread.

Offline keaukraine

  • byte
  • *
  • Posts: 34
    • View Profile
Re: State of OpenGL ES2.0 support
« Reply #20 on: May 27, 2011, 09:53:33 am »
There's a fix for missing OpenGL ES 2.0 bindings. It uses NDK.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: State of OpenGL ES2.0 support
« Reply #21 on: May 27, 2011, 11:59:27 am »
Yes, i know. But i'm not going to support this, because you can't cover both ways with one code base. I would rather add a way to support the libgdx binding instead, but i haven't decided this yet.

Offline icarusfactor

  • int
  • **
  • Posts: 58
    • View Profile
Re: State of OpenGL ES2.0 support
« Reply #22 on: May 31, 2011, 10:27:24 pm »
Glad to hear you are working on the OpenGL ES 2.0 stuff , have been away from working on my Android stuff, but will get back to it in a few. I just have Android 2.2, but the hardware/software supports 2.0. I have not gotten to use that part of it yet though. Waiting on you :)

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: State of OpenGL ES2.0 support
« Reply #23 on: June 01, 2011, 10:48:49 pm »
Almost everything is in place now. Default shader as well as user defined ones seem to work fine so far (the rock is using a user defined "all red" shader in this shot):



Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: State of OpenGL ES2.0 support
« Reply #24 on: June 01, 2011, 10:57:49 pm »
Current performance...
Quote
06-01 22:56:51.968: INFO/jPCT-AE(15332): Double dragon: 11.11 fps
06-01 22:56:51.968: INFO/jPCT-AE(15332): Flower power: 16.33 fps
06-01 22:56:51.968: INFO/jPCT-AE(15332): Ninjas' garden: 11.60 fps
06-01 22:56:51.968: INFO/jPCT-AE(15332): Emperor's new clothes: 42.10 fps
06-01 22:56:51.968: INFO/jPCT-AE(15332): Magic island: 18.60 fps
06-01 22:56:51.968: INFO/jPCT-AE(15332): TOTAL SCORE: 17270

Offline Thomas.

  • double
  • *****
  • Posts: 833
    • View Profile
Re: State of OpenGL ES2.0 support
« Reply #25 on: June 01, 2011, 11:00:56 pm »
good work :) ... but frame rate is very low :( is it normal in whole ogl2? and do you plan implement shadows (real-time as well as pre rendered)? :)

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: State of OpenGL ES2.0 support
« Reply #26 on: June 01, 2011, 11:24:23 pm »
I can only speak for my phone/gpu (Nexus S/PowerVR SGX 540) and on that device, using shaders for everthing IS a lot slower than using the fixed function pipeline. On the other hand, you have to keep in mind that An3DBenchXL is really stressing polygon count in some tests. When running the less demanding original An3DBench, the difference is much less. I'm still looking for ways to improve this though, but i don't expect much from what i've read so far.
Concerning shadows: As said, this will require to render the depth map into a texture. This isn't supported ATM. I think, i'm going to see how adoption rate of 2.0 really is once i release it and decide based on that. The current problem with ES 2.0 ATM is (IMHO), that the API is ahead of the hardware. Even multi-texturing is MUCH slower when using shaders than it is when using the fixed function pipeline. At least on the SGX 540...i'm still looking for information on how many shader pipelines this sucker really has...
« Last Edit: June 02, 2011, 12:37:10 am by EgonOlsen »

Offline Thomas.

  • double
  • *****
  • Posts: 833
    • View Profile
Re: State of OpenGL ES2.0 support
« Reply #27 on: June 02, 2011, 04:08:13 pm »
shadows: but for example glbenchmark 2.0 running with soft shadows and also old quake4droid (ogl1) support shadows... and two examples running with shadows if you download GL ES SDKs
but highest priority has optimalization (if is possible), because fps are very low...

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: State of OpenGL ES2.0 support
« Reply #28 on: June 02, 2011, 05:07:54 pm »
shadows: but for example glbenchmark 2.0 running with soft shadows and also old quake4droid (ogl1) support shadows... and two examples running with shadows if you download GL ES SDKs
but highest priority has optimalization (if is possible), because fps are very low...
I never said anything against shadows... ??? Btw, OpenGL ES 1.x can't do texture based shadows. So what quake4droid does there can only be stencil shadows, which are more or less a dead end. Concerning some magic optimization...i don't expect them to be found. You have to keep in mind that the tests that are hurt the most are really high polygon. Nobody uses such scenes on mobile device ATM. The dragon scene renders around 55.000 polygons, which means that the vertex shader has to process 165.000 vertices, i.e. it calculates 165.000 dot products for the lighting calculations alone...that simply takes its time.

Offline Thomas.

  • double
  • *****
  • Posts: 833
    • View Profile
Re: State of OpenGL ES2.0 support
« Reply #29 on: June 02, 2011, 06:45:25 pm »
Mine incomplete scene has something around 12500 tris, but many will not be added. So I hope, that will be fast in ogl2, running 55fps now, but without textures... what about portals? :) it can much improve frame rate  :)