I'm having issues with allocating a VBO(vertex buffer object) with GLEW function pointer glGenBuffers

-2

The error returned is Access violation executing location 0x00000000

I am using the learnopengl book for this practice

I also checked youtube for help and the codes are just the same and they don't have any violation issue

// I intentionally showed this just to show that I linked everything fine
#define GLEW_STATIC
#include <GL\glew.h>

#include <GLFW\glfw3.h>



int main(){

GLfloat vertices[]{
         .0f, .5f, .0f,
         -.5f, .0f, .0f,
         .0f, .0f, .5f
     };


GLuint vbo;
glGenBuffers(1, &vbo); // the issue is here
glBindBuffer(GL_ARRAY_BUFFER, vbo);
glBufferData(GL_ARRAY_BUFFER, sizeof(vertices), vertices, GL_STATIC_DRAW);

return 0;
}```
c++
opengl
visual-c++
glfw
glew
asked on Stack Overflow Oct 1, 2020 by eonsinde • edited Oct 2, 2020 by eonsinde

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0