Use OpenGL ES 1.1?

114 views
Skip to first unread message

U A

unread,
Dec 19, 2011, 2:32:18 PM12/19/11
to GLWallpaperService
I noticed that version 1.0 is hardcoded into the library. How can I
use version 1.1? Is it a simple matter of replacing "GL10" everywhere
in my code and in the original library with "GL11"? Or is there a
better way? (I need to use point sprites which are a 1.1 feature.)

Josh Gooderham

unread,
Dec 19, 2011, 3:05:42 PM12/19/11
to glwallpap...@googlegroups.com
The gl passed to you can also be a GL11, just ask it:

private GL11 gl11;

public void onSurfaceChanged(GL10 gl, int w, int h) {

      if ( $gl instanceof GL11 )
          gl11 = (GL11)$gl;
      else
          gl11 = null;
}

Josh
https://market.android.com/developer?pub=gentlemandroid
http://www.gentlemandroid.com/

DCC

unread,
Dec 20, 2011, 6:11:30 PM12/20/11
to GLWallpaperService
Any advice on making it work with opengl es 2.0? I'm really struggling
with that. Thanks in advance!

On Dec 19, 3:05 pm, Josh Gooderham <joshgooder...@gmail.com> wrote:
> The gl passed to you can also be a GL11, just ask it:
>
> private GL11 gl11;
>
> public void onSurfaceChanged(GL10 gl, int w, int h) {
>
>       if ( $gl instanceof GL11 )
>           gl11 = (GL11)$gl;
>       else
>           gl11 = null;
>
> }
>
> Joshhttps://market.android.com/developer?pub=gentlemandroidhttp://www.gentlemandroid.com/

Josh Gooderham

unread,
Dec 21, 2011, 3:21:13 AM12/21/11
to glwallpap...@googlegroups.com
OpenGLES 2 is much more involved. All around. I have managed to get it up and running with the libgdx live wallpaper extension with a few drawbacks. It doesn't keep the context around like GLWallpaperService so you'll be reloading all your textures each onResume (wakes, orientation changes) which gives that ugly little pause.

There's also Rajawali. I haven't used it but I have used the author's previous framework min3d extensively.

I'd actually like to hear some discussion from anyone that is currently using GL2 for their wallpapers. I've read that most devices that support live wallpapers will also support GL2, but there is a small minority that do not and you'd need to check for that. If it were me I'd just assume go GL2 or nothing instead of trying to support older devices with a messy fallback to GL1.0 or 1.1. I believe you can set a filter in the market to prevent devices that don't support GL2 from seeing your app.

Is anyone using GLES20 in their wallpapers?

urisrs...@gmail.com

unread,
Dec 21, 2011, 9:04:06 AM12/21/11
to glwallpap...@googlegroups.com
no when i started it wasn't as supported as 1.x. however that's changing. 1.x devices will probably be a tiny minority next year
--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.
Reply all
Reply to author
Forward
0 new messages