opengl - Misunderstood Compiler Error on glGenerateMipmap(GL_TEXTURE_2D); -


error: there no arguments 'glgeneratemipmap' depend on template parameter, declaration of 'glgeneratemipmap' must available [-fpermissive]

i have #include <gl/glext.h> included , can see declaration of function in header, compiler error above. on ubuntu 13.04 up-to-date nvidia drivers installed. assume function defined.

my use of function is:

  if (mipmapped) {     glgeneratemipmap(gl_texture_2d);   } 

why compiler choking on function? error mean in context?

the glext.h header default not declare functions, have

#define gl_glext_prototypes 

before including file if want to. should warned declaring function not mean can link on platform, gl lib not required export function. on linux, work, though, closest standard opengl application binary interface linux guarantees opengl 1.2 core functions exported.

you should consider using opengl extension mechanism, either manually via glxgetprocaddress[arb]() or using convenient library glew or gl3w.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -