http://glew.sourceforge.net/

여기에서 받을 수 있으며

 

 

 

#define GL_GLEXT_PROTOTYPES

#include <gl/glew.h>
#include <gl/wglew.h>


#pragma comment(lib, "glew32.lib")

 

를 적어주면 된다

 

 

glBindBuffer    = (PFNGLBINDBUFFERARBPROC)GET_PROC_ADDRESS("glBindBuffer");
 glDeleteBuffers = (PFNGLDELETEBUFFERSARBPROC)GET_PROC_ADDRESS("glDeleteBuffers");
 glGenBuffers    = (PFNGLGENBUFFERSARBPROC)GET_PROC_ADDRESS("glGenBuffers");
 glBufferData    = (PFNGLBUFFERDATAARBPROC)GET_PROC_ADDRESS("glBufferData");

 


 glGenBuffers(1,&bufferObj);  
 glBindBuffer(GL_PIXEL_UNPACK_BUFFER_ARB,bufferObj);

 glBufferData(GL_PIXEL_UNPACK_BUFFER_ARB,DIM*DIM*4,NULL,GL_DYNAMIC_DRAW_ARB);

 

 

GET_PROC_ADDRESS 에 대한 설명은..

http://msdn.microsoft.com/en-us/library/dd374386%28v=vs.85%29.aspx

 

사용법 참고는..  http://blog.daum.net/spspoon/83


반응형

+ Recent posts