Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using Open GL in an Android Widget

I can make a widget. I can draw primitives in Open GL ES with Android. (I'm just learning) But I haven't found anything on how to use Open GL ES within the Android widget framework. For starters, I just want to have a widget that will draw a triangle. (I'm targeting 2.2) Can anyone point me in the right direction on how to set this up?

like image 288
Mr. Awesome Avatar asked Dec 12 '25 19:12

Mr. Awesome


1 Answers

It depends what you mean by widget. If you are talking about app widgets (or Launcher widgets), you cannot do what you want. If you are creating a widget inside your application, use SurfaceView (API Demos has a couple of examples.)

like image 172
Romain Guy Avatar answered Dec 15 '25 08:12

Romain Guy



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!