【问题标题】:OpenGL ES Manually invoking onSurfaceChanged() or onSurfaceCreated() functionsOpenGL ES 手动调用 onSurfaceChanged() 或 onSurfaceCreated() 函数
【发布时间】:2013-12-20 09:44:40
【问题描述】:

有没有一种方法可以在循环外调用 Android OpenGL ES 中的任何这些函数?

例如:

public SurfaceView(Context context){ 
    renderer = new Renderer(){
        ...openglstuff...
    }

    renderer.callOnSurfaceChanged(); // Something like this?

}

只是想知道。我知道这可能不是一个好习惯。

【问题讨论】:

    标签: android function opengl-es renderer


    【解决方案1】:

    在 GLSurfaceView 上调用 requestLayout() 会触发 OnSurfaceChanged() 再次调用。

    【讨论】:

      【解决方案2】:

      不,系统会在需要时调用这些方法!

      【讨论】:

      • 您的答案需要多做一些工作。尝试发布示例,也许是文档的链接。只是说不,即使没有证据的正确也不好
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-06-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多