#ifndef __WINGLEXTENSHIONS_H #define __WINGLEXTENSHIONS_H /* Windowsの場合、OpenGL拡張機能を使う前に関数のポインタを取ってこないといけない。 例:glGenBuffersARBの場合 glGenBuffersARB = (PFNGLGENBUFFERSARBPROC)wglGetProcAddress("glGenBuffersARB"); 又、コンパイラのバージョン等によってはglext.hが無い場合もあるので、 http://www.opengl.org/registry/ からglext.hももってきとかないといけない。 code by kei */ #ifdef _WIN32 #include #if defined(_MSC_VER) #include #else #include #endif #ifdef __MAIN #define _WINGLEXTENSIONS_EXTERN #define _WINGLEXTENSIONS_NULL =NULL #else #define _WINGLEXTENSIONS_EXTERN extern #define _WINGLEXTENSIONS_NULL #endif _WINGLEXTENSIONS_EXTERN PFNGLGENFRAMEBUFFERSEXTPROC glGenFramebuffersEXT _WINGLEXTENSIONS_NULL; _WINGLEXTENSIONS_EXTERN PFNGLBINDFRAMEBUFFEREXTPROC glBindFramebufferEXT _WINGLEXTENSIONS_NULL; _WINGLEXTENSIONS_EXTERN PFNGLFRAMEBUFFERTEXTURE2DEXTPROC glFramebufferTexture2DEXT _WINGLEXTENSIONS_NULL; _WINGLEXTENSIONS_EXTERN PFNGLGENRENDERBUFFERSEXTPROC glGenRenderbuffersEXT _WINGLEXTENSIONS_NULL; _WINGLEXTENSIONS_EXTERN PFNGLBINDRENDERBUFFEREXTPROC glBindRenderbufferEXT _WINGLEXTENSIONS_NULL; _WINGLEXTENSIONS_EXTERN PFNGLRENDERBUFFERSTORAGEEXTPROC glRenderbufferStorageEXT _WINGLEXTENSIONS_NULL; _WINGLEXTENSIONS_EXTERN PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC glFramebufferRenderbufferEXT _WINGLEXTENSIONS_NULL; _WINGLEXTENSIONS_EXTERN PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC glCheckFramebufferStatusEXT _WINGLEXTENSIONS_NULL; _WINGLEXTENSIONS_EXTERN PFNGLDELETEFRAMEBUFFERSEXTPROC glDeleteFramebuffersEXT _WINGLEXTENSIONS_NULL ; _WINGLEXTENSIONS_EXTERN PFNGLDELETERENDERBUFFERSEXTPROC glDeleteRenderbuffersEXT _WINGLEXTENSIONS_NULL ; _WINGLEXTENSIONS_EXTERN PFNGLCREATEPROGRAMOBJECTARBPROC glCreateProgramObjectARB _WINGLEXTENSIONS_NULL; _WINGLEXTENSIONS_EXTERN PFNGLCREATESHADEROBJECTARBPROC glCreateShaderObjectARB _WINGLEXTENSIONS_NULL; _WINGLEXTENSIONS_EXTERN PFNGLDELETEOBJECTARBPROC glDeleteObjectARB _WINGLEXTENSIONS_NULL; _WINGLEXTENSIONS_EXTERN PFNGLDETACHOBJECTARBPROC glDetachObjectARB _WINGLEXTENSIONS_NULL; _WINGLEXTENSIONS_EXTERN PFNGLATTACHOBJECTARBPROC glAttachObjectARB _WINGLEXTENSIONS_NULL; _WINGLEXTENSIONS_EXTERN PFNGLSHADERSOURCEARBPROC glShaderSourceARB _WINGLEXTENSIONS_NULL; _WINGLEXTENSIONS_EXTERN PFNGLCOMPILESHADERARBPROC glCompileShaderARB _WINGLEXTENSIONS_NULL; _WINGLEXTENSIONS_EXTERN PFNGLLINKPROGRAMARBPROC glLinkProgramARB _WINGLEXTENSIONS_NULL; _WINGLEXTENSIONS_EXTERN PFNGLGETINFOLOGARBPROC glGetInfoLogARB _WINGLEXTENSIONS_NULL; _WINGLEXTENSIONS_EXTERN PFNGLUSEPROGRAMOBJECTARBPROC glUseProgramObjectARB _WINGLEXTENSIONS_NULL; _WINGLEXTENSIONS_EXTERN PFNGLGETOBJECTPARAMETERIVARBPROC glGetObjectParameterivARB _WINGLEXTENSIONS_NULL; _WINGLEXTENSIONS_EXTERN PFNGLGETOBJECTPARAMETERFVARBPROC glGetObjectParameterfvARB _WINGLEXTENSIONS_NULL; _WINGLEXTENSIONS_EXTERN PFNGLGETUNIFORMLOCATIONARBPROC glGetUniformLocationARB _WINGLEXTENSIONS_NULL; _WINGLEXTENSIONS_EXTERN PFNGLUNIFORM1FARBPROC glUniform1fARB _WINGLEXTENSIONS_NULL; _WINGLEXTENSIONS_EXTERN PFNGLUNIFORM2FARBPROC glUniform2fARB _WINGLEXTENSIONS_NULL; _WINGLEXTENSIONS_EXTERN PFNGLUNIFORM3FARBPROC glUniform3fARB _WINGLEXTENSIONS_NULL; _WINGLEXTENSIONS_EXTERN PFNGLUNIFORM4FARBPROC glUniform4fARB _WINGLEXTENSIONS_NULL; _WINGLEXTENSIONS_EXTERN PFNGLUNIFORM1IARBPROC glUniform1iARB _WINGLEXTENSIONS_NULL; _WINGLEXTENSIONS_EXTERN PFNGLUNIFORM2IARBPROC glUniform2iARB _WINGLEXTENSIONS_NULL; _WINGLEXTENSIONS_EXTERN PFNGLUNIFORM3IARBPROC glUniform3iARB _WINGLEXTENSIONS_NULL; _WINGLEXTENSIONS_EXTERN PFNGLUNIFORM4IARBPROC glUniform4iARB _WINGLEXTENSIONS_NULL; _WINGLEXTENSIONS_EXTERN PFNGLUNIFORM1FVARBPROC glUniform1fvARB _WINGLEXTENSIONS_NULL; _WINGLEXTENSIONS_EXTERN PFNGLUNIFORM2FVARBPROC glUniform2fvARB _WINGLEXTENSIONS_NULL; _WINGLEXTENSIONS_EXTERN PFNGLUNIFORM3FVARBPROC glUniform3fvARB _WINGLEXTENSIONS_NULL; _WINGLEXTENSIONS_EXTERN PFNGLUNIFORM4FVARBPROC glUniform4fvARB _WINGLEXTENSIONS_NULL; _WINGLEXTENSIONS_EXTERN PFNGLUNIFORM1IVARBPROC glUniform1ivARB _WINGLEXTENSIONS_NULL; _WINGLEXTENSIONS_EXTERN PFNGLUNIFORM2IVARBPROC glUniform2ivARB _WINGLEXTENSIONS_NULL; _WINGLEXTENSIONS_EXTERN PFNGLUNIFORM3IVARBPROC glUniform3ivARB _WINGLEXTENSIONS_NULL; _WINGLEXTENSIONS_EXTERN PFNGLUNIFORM4IVARBPROC glUniform4ivARB _WINGLEXTENSIONS_NULL; _WINGLEXTENSIONS_EXTERN PFNGLMULTTRANSPOSEMATRIXDPROC glMultTransposeMatrixd _WINGLEXTENSIONS_NULL; _WINGLEXTENSIONS_EXTERN PFNGLACTIVETEXTUREPROC glActiveTexture _WINGLEXTENSIONS_NULL; _WINGLEXTENSIONS_EXTERN PFNGLUSEPROGRAMPROC glUseProgram _WINGLEXTENSIONS_NULL; _WINGLEXTENSIONS_EXTERN PFNGLGENBUFFERSARBPROC glGenBuffersARB _WINGLEXTENSIONS_NULL; // VBO 名前生成 _WINGLEXTENSIONS_EXTERN PFNGLBINDBUFFERARBPROC glBindBufferARB _WINGLEXTENSIONS_NULL; // VBO 結びつけ _WINGLEXTENSIONS_EXTERN PFNGLBUFFERDATAARBPROC glBufferDataARB _WINGLEXTENSIONS_NULL; // VBO データロード _WINGLEXTENSIONS_EXTERN PFNGLDELETEBUFFERSARBPROC glDeleteBuffersARB _WINGLEXTENSIONS_NULL; // VBO 削除 #undef _WINGLEXTENSIONS_EXTERN #undef _WINGLEXTENSIONS_NULL #endif #endif