How to add GLES support in XCode project?

Discussion in 'Mac Programming' started by XFiles51, Feb 6, 2016.

  1. XFiles51 macrumors newbie

    Joined:
    Feb 6, 2016
    #1
    I've added OpenGL.framework to my project but now I still get following message. I suppose I need it to install via brew tool? But what's the package name I need to install if so?

    .../nanovg/src/nanovg_gl.h:287:3: Use of undeclared identifier 'glBindTexture'
    .../nanovg/src/nanovg_gl.h:299:3: Use of undeclared identifier 'glStencilMask'
    .../nanovg/src/nanovg_gl.h:316:3: Use of undeclared identifier 'glStencilFunc'
    .../nanovg/src/nanovg_gl.h:367:5: Use of undeclared identifier 'glDeleteTextures'
    .../nanovg/src/nanovg_gl.h:379:2: Use of undeclared identifier 'glGetShaderInfoLog'
    .../nanovg/src/nanovg_gl.h:389:2: Use of undeclared identifier 'glGetProgramInfoLog'
    .../nanovg/src/nanovg_gl.h:399:8: Use of undeclared identifier 'glGetError'
    .../nanovg/src/nanovg_gl.h:416:9: Use of undeclared identifier 'glCreateProgram'
    .../nanovg/src/nanovg_gl.h:417:9: Use of undeclared identifier 'glCreateShader'
    .../nanovg/src/nanovg_gl.h:418:9: Use of undeclared identifier 'glCreateShader'
    .../nanovg/src/nanovg_gl.h:420:2: Use of undeclared identifier 'glShaderSource'
    .../nanovg/src/nanovg_gl.h:422:2: Use of undeclared identifier 'glShaderSource'
    .../nanovg/src/nanovg_gl.h:424:2: Use of undeclared identifier 'glCompileShader'
    .../nanovg/src/nanovg_gl.h:425:2: Use of undeclared identifier 'glGetShaderiv'
    .../nanovg/src/nanovg_gl.h:431:2: Use of undeclared identifier 'glCompileShader'
    .../nanovg/src/nanovg_gl.h:432:2: Use of undeclared identifier 'glGetShaderiv'
    .../nanovg/src/nanovg_gl.h:438:2: Use of undeclared identifier 'glAttachShader'
    .../nanovg/src/nanovg_gl.h:439:2: Use of undeclared identifier 'glAttachShader'
    .../nanovg/src/nanovg_gl.h:441:2: Use of undeclared identifier 'glBindAttribLocation'
     
  2. teagls macrumors regular

    Joined:
    May 16, 2013
    #2
    Is nanovg_gl.h a header file you wrote? You need to include the headers for OpenGL from the framework itself. So something like #import <OpenGL/gl.h>
     
  3. XFiles51 thread starter macrumors newbie

    Joined:
    Feb 6, 2016
    #3
    Actually NanoVG (git: https://github.com/memononen/nanovg) is not my project I'm just trying to compile it. I try to include some GL header but my attempt was not successfully: main.cpp:15:10: 'OpenGLES/ES2/gl.h' file not found
     
  4. teagls macrumors regular

    Joined:
    May 16, 2013
    #4
    The mac version of OpenGL does not have OpenGL ES. That is specific for iOS. The ES stands for embedded systems. The mac OpenGL is something like <OpenGL/gl.h> for fixed function pipeline or <OpenGL/gl3.h> for higher versions.
     

Share This Page