/** Called to draw the current frame. */ public void onDrawFrame(IGL10 gl) { if (!IsActive) { return; } gl.GlClear(GL10.GlColorBufferBit | GL10.GlDepthBufferBit); // Call our native function to render camera content GeoFragment.RenderCamera(ViewportWidth, ViewportHeight, Angle); gl.GlFinish(); }
private void InitLayout() { SetContentView(Resource.Layout.Main); GeoFragment m_geoFragment = ((GeoFragment)FragmentManager.FindFragmentById(Resource.Id.geo_fragment)); m_geoFragment.DisableRecognition(); m_geoFragment.SetGeoListener(this); Location loc1 = new Location("loc1"); loc1.Latitude = 44.654894; loc1.Longitude = 10.914749; Location loc2 = new Location("loc2"); loc2.Latitude = 44.653505; loc2.Longitude = 10.909653; Location loc3 = new Location("loc3"); loc3.Latitude = 44.647315; loc3.Longitude = 10.924802; List <GeoElement> geoElementList = new List <GeoElement>(); geoElementList.Add(new GeoElement(loc1, "1", "COOP, Modena")); geoElementList.Add(new GeoElement(loc2, "2", "Burger King, Modena")); geoElementList.Add(new GeoElement(loc3, "3", "Piazza Matteotti, Modena")); m_geoFragment.SetGeoElements(geoElementList); RelativeLayout rl = (RelativeLayout)FindViewById(Resource.Id.ar_main_layout); m_arView = new ARView(this); rl.AddView(m_arView, new FrameLayout.LayoutParams(FrameLayout.LayoutParams.MatchParent, FrameLayout.LayoutParams.MatchParent)); m_geoFragment.SetCameraTextureView(m_arView); m_geoFragment.SetMarkerViewAdapters(new MyMarkerViewAdapter(this, 51, 73), new MyMarkerViewAdapter(this, 30, 43)); }