Layer a 3D/GL View on top of a SurfaceView?

by iconnary » Wed, 01 Apr 2009 01:10:50 GMT


Sponsored Links
 I have a SurfaceView upon which I'm making various ongoing Canvas draw
calls.    I would like to either 1) Render GL content directly on top
of this SurfaceView, or 2) layer a GL View with a transparent
background on top of the underlying SurfaceView.   I must be able to
draw to both the background SurfaceView and the foreground GL View
simultaneously.

I've been tinkering with the API demos, specifically
TranslucentGLSurfaceViewActivity and SurfaceViewOverlay, but can't
seem to make this work.   I've tried doing this in my Activity.onCreate
() :

setContentView(<background SurfaceView>);
addContentView(<foreground GLSurfaceView>);

but only the backgroundSurfaceView is visible -- the GL View is not
visible.

If anyone could provide me a bit of guidance on how to do this or
something equivalent I would be very appreciative.

Thanks

--~--~---------~--~----~------------~-------~--~----~



Layer a 3D/GL View on top of a SurfaceView?

by iconnary » Wed, 01 Apr 2009 01:10:52 GMT


 I have a SurfaceView upon which I'm making various ongoing Canvas draw
calls.    I would like to either 1) Render GL content directly on top
of this SurfaceView, or 2) layer a GL View with a transparent
background on top of the underlying SurfaceView.   I must be able to
draw to both the background SurfaceView's Canvas and the foreground GL
View
simultaneously.

I've been tinkering with the API demos, specifically
TranslucentGLSurfaceViewActivity and SurfaceViewOverlay, but can't
seem to make this work.   I've tried doing this in my
Activity.onCreate
() :

setContentView(<background SurfaceView>);
addContentView(<foreground GLSurfaceView>);

but only the backgroundSurfaceView is visible -- the GL View is not
visible.

If anyone could provide me a bit of guidance on how to do this or
something equivalent I would be very appreciative.

Thanks

--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Other Threads

1. why my program don't launch from the same activity

my program have more than 2 activitys, activity A,B,C...,and my
program
must launch from activity A,then A jump to B,B jump to C.now
everythign is
ok,but ,when i operate as flow:
  1.launch my program
  2.jump to B.
  3.press "home".switch to home
  4.long press "home",and select my program,switch to my program
  5.jump to C.
  6.open a dialog in C
  7.press "home".switch to home
  8 long press "home",select my program ,switch to my program
  9.exit my program
  10.long press "home",launch my program from history list. now my
program
launch from B,not A!

  I want launch my program from activity A everytime!


  this is my manifest file:
  <activity android:name=".A" android:label="@string/app_
name" android:clearTaskOnLaunch="true"
android:launchMode="singleTop">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".B" android:launchMode="singleTask">
</activity>
<activity android:name=".C" android:launchMode="singleTask">
</activity>

-- 

2. Question about CdmaCellLocation interface

I wanted to write a small application that would display locations of
the cell tower that my phone is using. I see that there is
CdmaCellLocation object that has getBaseStationLatitude/
getBaseStationLongitude methods.

1. How should I interpret the int values that these methods return? I
looked in the documentation, and these methods are very poorly
documented.

2. I found a few other applications that show towers on the map.
However, they all use tower  ID to query public databases of cell
tower locations. Why not use coordinates that cell towers report? As
far as I understand cell phone is able to get tower position (from the
tower itself) to support A-GPS? Are the coordinates reported by the
cell towers accurate?

Thank you,
Eugene

-- 

3. blocking specific devices with known bugs from downloading app

4. how to work with SQLlight

5. Is ksoap2 is safe to use?

6. ActivityInstrumentationTestCase2 private static final Object is null when running test suite?

7. HELP::Phone -> IncomingCall -> Screen flicker