Need help with display on iOS / GLES2

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

	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.

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

maybe similar to: Build SDL2 with CMake for iOS with ANGLE

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.