GLSL in MFC
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
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?
If you have been using GL before, then it should be obvious. WHat is the problem you are having?
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?
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?
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement