c++ - Using OpenGL with Visual Studio 2013 Express -
c++ - Using OpenGL with Visual Studio 2013 Express -
to give thought of trying do. goal create c++ programme in visual studio , using opengl display blackscreen , white dot in middle of screen.
before can coding part though, have include opengl library somehow.
looking @ opengl documentation it's installed, need initialize it.
i'd rather not have initialization work it's been done several times, such freeglut, have 2 real problems not understand.
1) how compile freeglut? i've downloaded source code freeglut here http://prdownloads.sourceforge.net/freeglut/freeglut-3.0.0.tar.gz?download
i configured cmake visual studio 2013 compatible project. 1 time open visual studio , seek compile it, bunch of errors saying:
error c1083: cannot open include file: 'egl/egl.h': no such file or directory c:\freeglut-3.0.0\include\gl\freeglut_std.h 136 1 one_static
2) 1 time compiled, how link c++ project can do
#include<freeglut.h>
or
#include <gl/glut.h>
?
most cmake did configure wrong; egl used in embedded systems (think android, set-top boxes, , such) not windows. double check cmake sensible there.
after you've built freeglut re-create somewhere convenient (do not re-create visual studio installation directory) , add together directories placed freeglut own opengl project's compiler , linker search paths (reachable in visual studio build configuration).
personally place customly built libraries at
c:\local\include\
(the header files)
and
c:\local\lib
(the .lib
, .a
, .dll
files)
i tend give libraries architecture infix x86_32
or x86_64
. e.g. freeglut-x86_64.dll
. it's unlikely windows ever kind of "fat binary" in code several architectures can merged.
for convenience set dll path scheme search path dlls. when deploying programme re-create required dlls same directory exe files.
c++ opengl visual-studio-2013 visual-studio-express freeglut
Comments
Post a Comment