Karina
01-30-2011, 05:26 PM
Hi:
I'm a beginner programming in OpenGL. I need to create a POB (pixel Object Buffer), at time of compilation it has no errors, but at time of execution it presents a segmentation failure, my code is:
unsigned int width = 256;
unsigned int height = 256;
unsigned int size=width*height*4*sizeof(float);
GLuint vbo;
glewInit();
glGenBuffers(1,&vbo);
printf("vbo = %u\n", vbo);
printf("err = %u\n", glGetError());
glBindBuffer(GL_ARRAY_BUFFER,vbo); //bind object with vbo
glBufferData(GL_ARRAY_BUFFER,size,0,GL_DYNAMIC_DRA W);
Thanks
I'm a beginner programming in OpenGL. I need to create a POB (pixel Object Buffer), at time of compilation it has no errors, but at time of execution it presents a segmentation failure, my code is:
unsigned int width = 256;
unsigned int height = 256;
unsigned int size=width*height*4*sizeof(float);
GLuint vbo;
glewInit();
glGenBuffers(1,&vbo);
printf("vbo = %u\n", vbo);
printf("err = %u\n", glGetError());
glBindBuffer(GL_ARRAY_BUFFER,vbo); //bind object with vbo
glBufferData(GL_ARRAY_BUFFER,size,0,GL_DYNAMIC_DRA W);
Thanks