objective c - Do I need this code? OpenGL on iOS 8 -


i'm learning opengl ios , found old code trying test out , when try run exc_bad_access

this code:

- (void) initgl {     rendererinfo renderer;     // query renderer capabilities affect app's rendering paths     renderer.extension[apple_texture_2d_limited_npot] =     (0 != strstr((char *)glgetstring(gl_extensions), "gl_apple_texture_2d_limited_npot"));     renderer.extension[img_texture_format_bgra8888] =     (0 != strstr((char *)glgetstring(gl_extensions), "gl_img_texture_format_bgra8888"));     glgetintegerv(gl_max_texture_size, &renderer.maxtexturesize); } 

from have read these obsolete in current versions of opengl, correct , there need update code?

the extensions might obsolte code isn't.

glgetstring , glgetintegerv standard in opengl therefore must have error in code, i'm not objective-c coder looks opengl not initialized or off object access invalid ( example accessing null/nil object ).


Comments