Skip to main content
gamedev.net
🔒 Locked

Using extensions

Started by AzureRain Dec 11, 2008 at 12:49 PM 4 replies 1.7k views
Original Post
AzureRain
AzureRain
Hi all, I'm trying to use the extension described here: http://opengl.org/registry/specs/EXT/blend_minmax.txt but when I try to compile I get this warning: warning C4013: 'BlendEquationEXT' undefined; assuming extern returning int and this error: error C2065: 'MAX_EXT' : undeclared identifier I have included , and glGetString(GL_EXTENSIONS) does return an extension "GL_EXT_blend_minmax" so I'm confused as to what's going on. Anyone can shed any light?
http://fashionhangover.blogspot.com
shwasasin
shwasasin
Hey,
Couple questions for ya...Did you search your glext.h file to ensure MAX_EXT is there? Are you sure it's not prefixed with GL_ as many of the OpenGL constants are (i.e. GL_MAX_EXT)? I'm not sure how old the extension is, but did you ensure you have the latest glext.h from the OpenGL Extension Registry website?
swiftcoder
swiftcoder
You can save yourself a lot of trouble by using a 3rd party library to handle loading extensions. My personal favourite is GLee.
Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]
songho
songho
Here is how to set up extension functions without 3rd party extension helpers;

// in order to get function prototypes from glext.h, define GL_GLEXT_PROTOTYPES before including glext.h#define GL_GLEXT_PROTOTYPES#include "glext.h"// function pointers for GL_EXT_blend_minmax extension// Windows needs to get function pointers from ICD OpenGL drivers,// because opengl32.dll does not support extensions higher than v1.1.#ifdef _WIN32PFNGLBLENDEQUATIONEXTPROC pglBlendEquationEXT = 0;#define glBlendEquationEXT pglBlendEquationEXT#endifint main(){...    // get function pointer if "GL_EXT_blend_minmax" is supported    glBlendEquationEXT = (PFNGLBLENDEQUATIONEXTPROC)wglGetProcAddress("glBlendEquationEXT");...}


[Edited by - songho on December 12, 2008 2:06:38 PM]
V-man
V-man
Quote:
Original post by AzureRain
Hi all,

I'm trying to use the extension described here:
http://opengl.org/registry/specs/EXT/blend_minmax.txt

but when I try to compile I get this warning:
warning C4013: 'BlendEquationEXT' undefined; assuming extern returning int

and this error:
error C2065: 'MAX_EXT' : undeclared identifier

I have included , and glGetString(GL_EXTENSIONS) does return an extension "GL_EXT_blend_minmax" so I'm confused as to what's going on.

Anyone can shed any light?


They strip things in the specifications.
Don't forget to add GL_ or gl or whatever.

Use glBlendEquationEXT instead of BlendEquationEXT
AzureRain
AzureRain
Thanks for all the replies :)

I've added in the gl in front, and followed songho's method.
Now it compiles ok, so I guess it should be fine.
Thanks guys!
http://fashionhangover.blogspot.com

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.