c++ - Xcode GL_GEOMETRY_SHADER unidentified? -


here include , code causing me distress:

#include <iostream> #include <vector> #include <opengl/gl.h> #include <opengl/glu.h> #include <glut/glut.h>  using namespace std;  gluint createshader(glenum eshadertype, const std::string &strshaderfile) {     gluint shader = glcreateshader(eshadertype);     const char *strfiledata = strshaderfile.c_str();     glshadersource(shader, 1, &strfiledata, null);      glcompileshader(shader);      glint status;     glgetshaderiv(shader, gl_compile_status, &status);     if (status == gl_false)     {         glint infologlength;         glgetshaderiv(shader, gl_info_log_length, &infologlength);          glchar *strinfolog = new glchar[infologlength + 1];         glgetshaderinfolog(shader, infologlength, null, strinfolog);          const char *strshadertype = null;         switch(eshadertype)         {             case gl_vertex_shader: strshadertype = "vertex"; break;             case gl_geometry_shader: strshadertype = "geometry"; break;             case gl_fragment_shader: strshadertype = "fragment"; break;         }          fprintf(stderr, "compile failure in %s shader:\n%s\n", strshadertype, strinfolog);         delete[] strinfolog;     }      return shader; } 

that way think of pointing out crucial bit of code. (i new so)

i learning tutorial besides altered includes , namespace, not code.

anyway, using xcode learn using opengl in c++ , telling me using undeclared identifier gl_geometry_shader ... have coded using opengl in java before me seems strange gl_geometry_shader should identified along vertex , fragment counterpart, not cause problems. appreciated.

(as aside don't think warrants entire question of own since opted not use function, glutexitmainloop(); not defined either)

thank you


Comments

Popular posts from this blog

java - How to specify maven bin in eclipse maven plugin? -

single sign on - Logging into Plone site with credentials passed through HTTP -

php - Why does AJAX not process login form? -