sharing GLSurfaceView between Activities

Problems with Canvas, OpenGL, etc...

sharing GLSurfaceView between Activities

Postby silentpower » Sat Apr 23, 2011 6:51 pm

Hey folks,

I my Main activity which has the initial GLSurfaceView instantiated. When I switch another activity I would like to be able to access it. Any suggestions?

Code: Select all
//initiates camera and sets camera
        GLView = new ViewCore(this, timer); //instantiates the view
        setContentView(GLView); //sets  view
       LayoutInflater inflater = (LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE);
       
        //grabs mainmenu.xml to use as display layout
        ViewGroup ViewMain = (ViewGroup) inflater.inflate(com.Arkham.R.layout.mainmenu, null);
       
        this.addContentView(ViewMain, new LayoutParams(LayoutParams.WRAP_CONTENT,    LayoutParams.WRAP_CONTENT));

silentpower
Once Poster
Once Poster
 
Posts: 1
Joined: Sat Apr 23, 2011 5:45 pm

Top

Return to Android 2D/3D Graphics - OpenGL Problems

Who is online

Users browsing this forum: No registered users and 6 guests