Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

zsunshine

A question about glBlendColorEXT

This topic is 5280 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello! I''m working on the Bluescreening with OGL. My question is why glBlendColorEXT always leads the program crashes. My code is as follows: #include <gl\gl.h> #include <gl\glut.h> #include <gl\glu.h> #include <gl\glaux.h> #include "glext.h" typedef void (APIENTRY *PFNGLBLENDCOLORPROC)(GLclampf red, GLclampf green,GLclampf blue, GLclampf alpha); PFNGLBLENDCOLORPROC glBlendColorEXT = (PFNGLBLENDCOLORPROC) wglGetProcAddress("glBlendColorEXT"); ...... void render(void) { ... glBindTexture(GL_TEXTURE_2D, 0); glEnable(GL_BLEND); glBlendFunc(GL_ONE,GL_CONSTANT_ALPHA_EXT); glBlendColorEXT(0.0F, 0.0F, 1.0F, 1.0F); //draw something.... ... } My program works fine if glBlendColorEXT does not exist. Please help!!! Thanks!

Share this post


Link to post
Share on other sites
Advertisement
You need to create the redering context before getting the function pointers. In other words, you cannot initialize the function pointer in file scope like that.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!