blue
This commit is contained in:
1 parent
7bd72fc60a
commit
de36ad782c
6 files changed
+23
-18
No files matched your search
@@ -1,13 +1,7 @@
|
||||
import UIKit
|
||||
|
||||
final class RenderGLView: UIView {
|
||||
var st: EGLState = {
|
||||
.caLayer = NULL,
|
||||
.cfg = NULL,
|
||||
.ctx = EGL_NO_CONTEXT,
|
||||
.display = EGL_NO_DISPLAY,
|
||||
.surface = EGL_NO_SURFACE
|
||||
};
|
||||
var st = EGLState()
|
||||
|
||||
override init(frame: CGRect) {
|
||||
super.init(frame: frame)
|
||||
@@ -31,6 +25,9 @@ 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