matus-chochlik / oglplus

OGLplus is a collection of open-source, cross-platform libraries which implement an object-oriented facade over the OpenGL® (version 3 and higher) and also OpenAL® (version 1.1) and EGL (version 1.4) C-language APIs. It provides wrappers which automate resource and object management and make the use of these libraries in C++ safer and more convenient.
http://oglplus.org/
Boost Software License 1.0
492 stars 72 forks source link

Problem with VertexArray #111

Open StepUpSenpai opened 9 years ago

StepUpSenpai commented 9 years ago

Hi, I'd like to report my problem with a VertexArray class. Oglplus as a whole seems to work fine (I make use of Context, FragmentShader, VertexShader, Program classes and haven't had any issues with them) but my program terminates during creation of instance of VertexArray class.

Unhandled exception at 0x725DCB49 in OGLPlus-playground.exe: 0xC0000005: Access violation >executing location 0x00000000.

After debuging the program I found out it terminates in

static void Gen(tag::Generate, GLsizei count, GLuint* names)

of class

ObjGenDelOpstag::VertexArray

I am not sure if it matters but I use GLFW for creating the window/context and GLEW in Visual Studio 2013.

StepUpSenpai commented 9 years ago

I ended up commenting out two glfw-related lines out of pure desperation, while blindly looking for a fix and now the program doesn't terminate during the creation of VertexArray. Those two lines are:

glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);

Why would it behave like so? Shouldn't all functionality related to vertex arrays be available even in the lowest version of opengl?

Edit: Even if I set major version to 4 and minor version to 5 (the highest supported by my video card) the error still persists. Only commenting out those two lines fixes the issue.

matus-chochlik commented 9 years ago

Hi,

I've commented the two lines out. I'll have a look at what GLFW does in glfwWindowHint. Hope that helps.

BTW. Could You let me know what graphics card/driver do You use ?

StepUpSenpai commented 9 years ago

Geforce GTX660, regular drivers (not beta), version 350.12 (newest)