Author Topic: Using GLView in xml file  (Read 1300 times)

Offline JKumar

  • byte
  • *
  • Posts: 33
    • View Profile
Using GLView in xml file
« on: October 12, 2010, 10:19:32 am »
Hi,

            I am using GLView in xml with some image buttons on it. I am finding problem in recreating it on onResume as not being a part of jPCT.

Can any one guide me as how to utilize jPCT for recreating the GLContext where GLView being in the xml file.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11747
    • View Profile
    • http://www.jpct.net
Re: Using GLView in xml file
« Reply #1 on: October 12, 2010, 04:28:22 pm »
In Alien Runner, i'm using a GlSurfaceView in my mail.xml, too. In onCreate(..), i'm doing the complete setup-work (like shown in my example sources) each time that method is being called with the difference that i'm getting the surface view from the layout instead of creating my own. Like so:

Code: [Select]
mGLView = (GLSurfaceView) this.findViewById(R.id.surface_view);

Works fine for me so far...