# Need help with display on iOS / GLES2

**URL:** <https://discourse.libsdl.org/t/need-help-with-display-on-ios-gles2/55893>\
**Category:** SDL Development\
**Created:** [December 10, 2024, 6:52am UTC](https://discourse.libsdl.org/t/need-help-with-display-on-ios-gles2/55893 "2024-12-10T06:52:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![raaron](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/raaron/32/5636_2.png) [@raaron](https://discourse.libsdl.org/u/raaron)\
**Post date:** [December 10, 2024, 6:52am UTC](https://discourse.libsdl.org/t/need-help-with-display-on-ios-gles2/55893/1 "2024-12-10T06:52:19Z")

</div>

I’m using the “Nuklear” GUI library with SDL2 using the GLES2 backend. It works perfectly for Android and Raspberry Pi, but I’m having difficulty getting display on iOS (iPhone 5s in this case).

I can set the window background color, so I know that some GL is working. Also, my app is responding to SDL events.

I put code like

```auto
	glBindFramebuffer(GL_FRAMEBUFFER, fb);
	glBindRenderbufferOES(GL_RENDERBUFFER, cb);
	glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, _cb);
	GLenum status = glCheckFramebufferStatus(GL_FRAMEBUFFER) ;
	if(status != GL_FRAMEBUFFER_COMPLETE) {
		log_print("failed to make complete framebuffer object %x", status);
	}

```

before rendering, and un-bound them after the SDL\_GL\_SwapWindow(). I got the values of ‘fb’ and ‘cb’ at window creation time using SDL\_GetWindowWMInfo() as directed; the video driver is ‘uikit’ but I’m not doing anything specific to UIKit.

This is a most frustrating issue; any help would be appreciated.

---

<div class="post-metadata">

**Author:** ![raaron](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/raaron/32/5636_2.png) [@raaron](https://discourse.libsdl.org/u/raaron)\
**Post date:** [December 15, 2024, 9:01am UTC](https://discourse.libsdl.org/t/need-help-with-display-on-ios-gles2/55893/2 "2024-12-15T09:01:39Z")

</div>

If anyone has a clue how I can resolve this, I would be most grateful.

---

<div class="post-metadata">

**Author:** ![elefantinho](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/e/e0b2c6/32.png) [@elefantinho](https://discourse.libsdl.org/u/elefantinho)\
**Post date:** [December 16, 2024, 12:51am UTC](https://discourse.libsdl.org/t/need-help-with-display-on-ios-gles2/55893/3 "2024-12-16T00:51:34Z")

</div>

maybe similar to: [Build SDL2 with CMake for iOS with ANGLE](https://discourse.libsdl.org/t/build-sdl2-with-cmake-for-ios-with-angle/55662)

---

<div class="post-metadata">

**Author:** ![raaron](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/raaron/32/5636_2.png) [@raaron](https://discourse.libsdl.org/u/raaron)\
**Post date:** [December 16, 2024, 5:20am UTC](https://discourse.libsdl.org/t/need-help-with-display-on-ios-gles2/55893/4 "2024-12-16T05:20:09Z")

</div>

Thanks. I don’t think so, since I’m using GLES2 directly and it already works on all other platforms. So there’s something about the intersection of SDL2 and how it supports iOS GLES rendering.

There is, unfortunately, no sample code that shows how to use GLES2 with SDL2/iOS, only GLES. So, I’ll try that instead…

Welp. I tried using just the …gles.h instead of gles2.h and there’s no difference.

It’d be great if the developer who handles iOS support in SDL would join the conversation.
