Jump to content
  • Advertisement
Sign in to follow this  
mattropo1is

OpenGL GLSL in MFC

This topic is 4174 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

Hi all, I've been playing around for a long time, and have several nice container classes that wrap OpenGL/glu libraries into a nice CView/CWnd classes. However, I'm trying to do this for GLSL and am having trouble. Can you wrap GLSL libraries in a class like this? I've got demo apps up and running using GLEW no problem, but it always creates its own window. Is there a way to create/use GLSL functionality in MFC? Thanks

Share this post


Link to post
Share on other sites
Advertisement
Yes, of course. MFC doesn't care and neither does GLSL.
If you have been using GL before, then it should be obvious. WHat is the problem you are having?

Share this post


Link to post
Share on other sites
So, I have my normal OGL apps working just fine using gl/glu/glaux.h and corresponding MS libs. However, when I try to add any GLSL commands such as:
GLuint testFS;
testFS = glCreateShader(GL_FRAGMENT_SHADER);
glCompileShader(testFS);

The compiler obviously complains that it doesn't recognize those symbols. I thought I could use GLEW, but one of GLEW's startup sequence commands is glutCreateWindow(), but I want to use the CView's window, not create a new one. So, a couple quick questions:
1. Do microsoft's GL libraries support GLSL? Are there new ones that do?
2. Can I use GLSL w/o using GLEW?
3. or is there a method to get GLEW to attach itself to the existing CView/CWnd window?


Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!