View Full Version : glBlendFuncSeparate issue

06-20-2011, 05:54 PM
I'm making a game with opengl+SDL and i want to render polygons with a constant alpha value so when two polygons overlap the alpha value isn't added onto the polygons.

I googled around and i read somewhere that glBlendFuncSeparate could be the answer to my problem.

The only problem is that i dont have access to the function at all,like the function isn't even in the header of GL.h or GLU.h.

So my question is...is there is a way to achieve a constant alpha value without this function? And if not, how do i get access to this function?
Do you have to do this much work to get a function in direct3d as well or is opengl just weird like that?

The site i googled stated that glBlendFuncSeparate was an opengl 1.4 function.
I'm not really sure how to determine what version of opengl im using. I have an ATI radeon 5850, the box says it supports openGL 3.0. So does that mean i can only use functions <=3.0? I'm getting really frustrated with how this stuff works. I really can believe i have to do all this just for a function.

06-21-2011, 02:55 AM
You need to use GLEW (http://glew.sourceforge.net/) library. It gives you easy access to the OpenGL functions not provided by a basic Windows installation. Advanced functions are only provided through your graphics driver (by ati/nvidia...), which should be up-to-date as well for GLEW to be able to "connect" to them.

06-21-2011, 03:51 AM
Use an extension loading library to make everything easy :

All the extra functions not in the standard ABI are in glext.h :

The details if you want to understand why OpenGL is to be used that way :