안드로이드 개발 질문/답변
(글 수 45,052)
보통 OpenGL 에서는 프로그램이 끝나기 전에 바인드 했던 텍스쳐를 glDeleteTextures를 이용하여 텍스쳐에 사용했던 메모리를 지워주는 과정을 거치는데요.
안드로이드에서 OpenGL 이용한 여러 소스들을 보니 이 과정들을 거치지 않고 있었습니다.
GLSurfaceView를 이용할 떄에는 액티비티가 onPause() 될때 GLSurfaceView에 mGLSurfaceView.onPause()를 해서 알려주면 알아서 텍스쳐를 free 해주는 것인가요?
답변 부탁드립니다.
안드로이드에서 OpenGL 이용한 여러 소스들을 보니 이 과정들을 거치지 않고 있었습니다.
GLSurfaceView를 이용할 떄에는 액티비티가 onPause() 될때 GLSurfaceView에 mGLSurfaceView.onPause()를 해서 알려주면 알아서 텍스쳐를 free 해주는 것인가요?
답변 부탁드립니다.
2010.06.09 13:41:45
GLSurfaceView 에 있는 내용입니다.
// * Note that when the EGL context is lost, all OpenGL resources associated
// * with that context will be automatically deleted. You do not need to call
// * the corresponding "glDelete" methods such as glDeleteTextures to
// * manually delete these lost resources.