I’ve created an OpenGL ES game which is being rendered using a GLKView on iOS. I’ve also added some custom UIButtons which are positioned on top of the GLKView. In the rendering I’m drawing some stars using the GL_POINTS rendering mode. Everything renders fine in the simulator but looks terrible on the device.
I was wondering if anyone had any advice as to things I should be configuring/looking out for on the device that may need to be set up in order to get the correct rendered image.
Here are a couple of images of the results:
Simulator

Device

(Please ignore the difference in scaling of the custom buttons – the device screenshot was taken on an iPad).
It turns out the issue was to do with not setting
gl_PointSizein the shader for OpenGL ES. The screenshots actually led me to this solution because the stars (drawn using theGL_POINTSrendering mode) are so radically wrong on the device than on the simulator.Presumably for the desktop version of OpenGL, the point size is set using the
glPointSizefunction by default (unlessGL_VERTEX_PROGRAM_POINT_SIZEis enabled). On OpenGL ES there is noglPointSizefunction, so the point size value must always be specified using the built-ingl_PointSizevariable in the vertex shader.