c++ - OpenGL functions are undefined in VS2012 express -


i'm attempting use opengl functions in visual studio 2012 express, code looks this:

#include <windows.h> #include <iostream> #include <gl/gl.h> #include <fstream>  void savescreen() {  //code define variables, nwidth, nheight , buffer.  glreadbuffer ( gl_back ); //which buffer reading from. glreadpixels ( 0, 0, nwidth, nheight, gl_rgb, gl_unsigned_byte, (glvoid *buffer);  //do buffer data return;  } 

according internet research, code correct, apart glreadpixels apparently expects more expressions , )'s, think can work out myself.

when try compile , run errors saying both glreadbuffer , glreadpixels undefined. cant find tells me apart #including windows.h , gl/gl.h , opengl should work.

thanks in advance :)

edit:

thanks replying, added these lines additional dependancys of linker:

opengl32.lib glu32.lib

and capitalised function calls seems have solved problem.

the functions glreadbuffer() , glreadpixels not exist in opengl. api uses camelcase function name style, these function names spelled glreadbuffer() , glreadpixels().


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

.htaccess - Matching full URL in RewriteCond -