willRecreateSurface
This commit is contained in:
1 parent
de36ad782c
commit
ea68f48608
5 files changed
+44
-3
No files matched your search
@@ -12,3 +12,8 @@ func renderPixelSize(_ view: UIView) -> [Int32] {
|
||||
let h = Int32(max(1, (view.bounds.height * scale).rounded()))
|
||||
return [w, h]
|
||||
}
|
||||
|
||||
func renderRecreateSurface(_ vm: RenderVM) {
|
||||
eglResetSurface(&vm.glView.st)
|
||||
eglMakeCurrentContext(&vm.glView.st)
|
||||
}
|
||||
@@ -25,9 +25,6 @@ final class RenderGLView: UIView {
|
||||
|
||||
override func layoutSubviews() {
|
||||
super.layoutSubviews()
|
||||
if st.surface != nil {
|
||||
guard eglResetSurface(&st), eglMakeCurrentContext(&st) else { fatalError("ERROR Could not reset EGL surface") }
|
||||
}
|
||||
let ps = renderPixelSize(self)
|
||||
renderSet(F.reshapePixelSize, ps)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user