Cast Exception with custom GlSurfaceView

173 views Asked by At

Hi guys i declared a custom GlSurfaceView in this way

public class Render extends GLSurfaceView implements GLSurfaceView.Renderer {

and in an other class i initializate it using:

render= (Render) view.findViewById(R.id.gl);

but at runtime the vm generate this exception

java.lang.ClassCastException: android.opengl.GLSurfaceView cannot be cast to com.pugtests.depugscompany.openglprove.Render

why ? Can anyone explain to me my mistake and help me to fix it.. sorry for my english and thanks to everyone.

0

There are 0 answers