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

Offline JKumar

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

            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: 12085
    • View Profile
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(;

Works fine for me so far...