【发布时间】:2012-04-07 03:48:46
【问题描述】:
我只是在GLSurfaceView.Renderer 接口的onSurfaceCreated() 方法中调用glEnableClientState() 一次。例如:
public class GLRenderer implements GLSurfaceView.Renderer {
@Override
public void onSurfaceCreated(GL10 gl, EGLConfig config) {
gl.glEnableClientState(GL10.GL_VERTEX_ARRAY);
gl.glEnableClientState(GL10.GL_COLOR_ARRAY);
...
}
之后我不再调用它们。我从不调用glDisableClientState() 方法。但我看到许多程序员调用这两种方法时经常将它们包裹在所有绘图调用中。
我的方法有什么问题吗?或者使用将它们包装在所有绘图调用周围的方法是一种好习惯还是更有效?
【问题讨论】: