I need to blend a few image together into a single one, pretty much as what's described here: OpenGL - mask with multiple textures.
I used the solution that is proposed there, but there's an issues with the glBlendFuncSeparate
method.
Turns out that this method was introduced in later openGL versions, and according to my gl.h
file the version I'm using is 1.
After much searching and reading I realized that this is what I have to work with and that I can't just upgrade my openGL version.
I went ahead and downloaded GLEW
.
I added glew.h
and glew.c
into my VS10 project, defined GLEW_BUILD
and now it finally compiles without complaining about glBlendFuncSeparate
, but when I run the program it crashes when it tries to call the method, saying Access Violation
, I guess that it points to NULL and then crashes when that's being run.
I continued reading and searching on this, and from what I understand, I need to use OpenGl Extensions to make it work.
If what's written in Using OpenGL extensions On Windows is correct then I'm missing something.
Let's say I do everything it says, I "download and install the latest drivers and SDKs for your graphics card" and then compile it, even if it runs on my machine, I see no guarantee that it won't crash on someone else's machine, since they might not have done the same.
I have two questions:
- Am I missing something here? this whole process seems way too complicated, and environment dependent.
- Is there an alternative for using
glBlendFuncSeparate
in this kind of a scenario?