In order to use this source example of Programming Guide,
I did a few modifications then I can run the example correctly.
1. Solution of the undefined macro:
#ifdef GL_VERSION_1_2My computer didn't have this definition, so I need to include OpenGL extension library as below:
#include < GL/glext.h >;And the same time, download the header files from Official Website.
2. The solution of "glTexImage3D not defined":
a. declare a global function pointer:
PFNGLTEXIMAGE3DPROC glTexImage3D;b. After correctly initializing OpenGL, execute the codes:
glTexImage3D = reinterpret_castOriginal post is from here.( ::wglGetProcAddress( "glTexImage3D") );
3. If you got a error like: "reinterpret_cast : undeclared identifier",
please rename the source "C" code from texture3d.c to texture3d.cpp.
Because this macro is dedicated to C++ language.
Original post is from here.
Result should be:
Record just avoid forgetting. :D
沒有留言:
張貼留言