OpenGLES

RSS for tag

Create 3D and 2D graphics effects using OpenGL ES, a compact and efficient subset of OpenGL.

Posts under OpenGLES tag

6 Posts

Post

Replies

Boosts

Views

Activity

iOS 17.x Simulator (Xcode 15.4): OpenGL/EAGL app shows black screen or exits; clean SDL2 rebuild + flags fix it on 17.2 (17.5 still affected)
Context Host: macOS 14.7.6 on Apple Silicon (Mac mini M2) Xcode 15.4 Simulator runtimes installed: iOS 17.2, 17.4, 17.5 Tech stack: Kivy/kivy-ios, SDL2 (OpenGL ES/EAGL), Python 3.11 App type: minimal Kivy “Hello World” (no special entitlements, no camera/mic) Observed On iOS 17.5 Simulator the app often shows a black screen or exits immediately (no crash dialog). On iOS 17.2 Simulator the same build runs fine (after a clean rebuild of SDL2 and proper xcodebuild flags). What fixed it for 17.2 Clean rebuild of SDL2 (no cached artifacts), then build python/kivy/app. xcodebuild WITHOUT OTHER_CFLAGS="-Umain -DSDL_MAIN_HANDLED". Typical flags: ONLY_ACTIVE_ARCH=YES, EXCLUDED_ARCHS="i386 x86_64", IPHONEOS_DEPLOYMENT_TARGET=16.0. Optionally enforcing EAGL RGBA8 + retained backing + opaque helped when testing, but the clean SDL2 rebuild already resolved black screen on 17.2. Still problematic 17.5 Simulator still exhibits black screen/early exit for this OpenGL ES path (no clear console/crash signal). Real devices are fine. Questions Is there a known regression or change in iOS 17.5 Simulator related to EAGL/OpenGL ES contexts or presentation? Any recommended Simulator settings/workarounds for GL/EAGL apps on 17.5? References Repro, scripts and notes (GitHub Discussion): <https://github.com/orgs/kivy/discussions/62 > Gist with scripts (create/boot iOS 17.2 simulator, clean scripts, recipe notes): https://gist.github.com/wolfgang-coder/7e88636fb3f19b492d565e982575939d (We avoid posting Bundle IDs, certificate details, or real UDIDs. Happy to provide sanitized logs if useful.)
0
0
60
3w
OpenGL ES support on Apple Silicon Simulators
Hey folks, I have a legacy game that is running OpenGL ES - and it no longer works on the simulators that are running Apple Silicon, ie iPhone 15 Pro, or the 13" iPads. And yes, i'm also running on Apple Silicon (M1 Max). The apps work fine on the actual devices, but the simulator crashes on any glDrawElements with a stack that looks like the following: I have not yet seen an announcement about this not working but i've seen mention in other apps of stopping to support GL (https://github.com/maplibre/maplibre-native/issues/2351) Can anyone shed some light? I'm obviously going to try to fix it, or find a recent sample app from which to start to see what might be up. Or move to metal, but i hadn't bargained for that level of effort atm ;) Any suggestions appreciated!
10
0
2.5k
Mar ’25
CATransaction commit() crashed on background thread [EXC_BREAKPOINT: com.apple.root.****-qos.cooperative]
Problem Description We are developing a app for iOS and iPadOS that involves extensive custom drawing of paths, shapes, texts, etc. To improve drawing and rendering speed, we use CARenderer to generate cached images (CGImage) on a background thread. We adopted this approach based on this StackOverflow post: https://stackoverflow.com/a/75497329/9202699. However, we are experiencing frequent crashes in our production environment that we can hardly reproduce in our development environment. Despite months of debugging and seeking support from DTS and the Apple Feedback platform, we have not been able to fully resolve this issue. Our recent crash reports indicate that the crashes occur when calling CATransaction.commit(). We suspect that CATransaction may not be functioning properly outside the main thread. However, based on feedback from the Apple Feedback platform, we were advised to use CATransaction.begin() and CATransaction.commit() on a background thread. If anyone has any insights, we would greatly appreciate it. Code Sample The line CATransaction.commit() is causing the crash: [EXC_BREAKPOINT: com.apple.root.****-qos.cooperative] private let transactionLock = NSLock() // to ensure one transaction at a time private let device = MTLCreateSystemDefaultDevice()! @inline(never) static func drawOnCGImageWithCARenderer( layerRect: CGRect, itemsToDraw: [ItemsToDraw] ) -> CGImage? { // We have encapsulated everything related to CALayer and its // associated creations and manipulations within CATransaction // as suggested by engineers from Apple Feedback Portal. transactionLock.lock() CATransaction.begin() // Create the root layer. let layer = CALayer() layer.bounds = layerRect layer.masksToBounds = true // Add one sublayer for each item to draw itemsToDraw.forEach { item in // We have thousands or hundred thousands of drawing items to add. // Each drawing item may produce a CALayer, CAShapeLayer or CATextLayer. // This is also why we want to utilise CARenderer to leverage GPU rendering. layer.addSublayer( item.createCALayerOrCATextLayerOrCAShapeLayer() ) } // Create MTLTexture and CARenderer. let textureDescriptor = MTLTextureDescriptor.texture2DDescriptor( pixelFormat: .rgba8Unorm, width: Int(layer.frame.size.width), height: Int(layer.frame.size.height), mipmapped: false ) textureDescriptor.usage = [MTLTextureUsage.shaderRead, .shaderWrite, .renderTarget] let texture = device.makeTexture(descriptor: textureDescriptor)! let renderer = CARenderer(mtlTexture: texture) renderer.bounds = layer.frame renderer.layer = layer.self /* ********************************************************* */ // From our crash report, this is where the crash happens. CATransaction.commit() /* ********************************************************* */ transactionLock.unlock() // Rendering layers onto MTLTexture using CARenderer. renderer.beginFrame(atTime: 0, timeStamp: nil) renderer.render() renderer.endFrame() // Draw MTLTexture onto image. guard let colorSpace = CGColorSpace(name: CGColorSpace.sRGB), let ciImage = CIImage(mtlTexture: texture, options: [.colorSpace: colorSpace]) else { return nil } // Convert CIImage to CGImage. let context = CIContext() return context.createCGImage(ciImage, from: ciImage.extent) }
0
1
453
Jan ’25
Why doesn't mac opengl support alpha textures?
I have used the Mac M1 and M4. Developing OpenGL projects on machines running macOS 15.2 and 13.6. Call the OpenGL library functions of Mac. glTexImage2D If you use GL_LUMINANCE, GL_LUMINANCE_ALPHA, GL_ALPHA these three textures, you will get an error gl 500. It makes me unable to draw normally on Mac. What's the reason for this? Don't they support it?
2
0
672
Jan ’25
Error when building Maui project for macCatalyst
I'm trying to build and run a Maui project but keep getting the following error: I'm using JetBrains Rider and I have it set not to build for iOS but I can't seem to get past this message. I'm using an Apple Silicon Mac, the project is cross platform, builds and runs fine on Windows. The problem seems to be with libSDL2.a. Has anyone encountered this error before? If so any suggestions on what to do about it?
1
0
446
Nov ’24