Shaders not supported, have GLEW / GLEXT?

Hello all! So… I’m working on some code on a new machine, and I can’t seem to get shader support… I have GLEW and GLEXT set up, but any calls to try to create a shader or program crash… Tried using both the glCreateShader and glCreateShaderObjectARB and both fail… not sure where I’m going wrong?

What’s your hardware? It may simply be that it doesn’t support these features.

Haha, I know this one. With some older GLs, the shader and program IDs start with 0. So a zero id is a valid id. Just accept it and hope for the best.

Hahaha duh, I didn’t even think about it, I’m on a cheap laptop and never even considered it.

Welll it throws an exception from inside the gl call and the whole thing grinds to a halt so I don’t know if that’s the issue this time, but I’ll keep that in mind. :slight_smile:

How can an exception be thrown in C code? Try the GLee library as an alternative to GLEW, it’s simpler and more light-weight. Maybe some foolish C++ code fails to know a 0 id might be valid and throws an exception.

Did you install a driver? There are regularly people asking the same question, that just work with the pre-installed windows-driver, which does NOT contain a real OpenGL driver.

Jan.

If you are on windows, move to linux or freebsd. There, even with a crappy laptop, you’ll have access to shaders in software mode, just don’t expect blazing speeds :slight_smile:

Well, I just switched this over to a desktop and getting the same problem, some null pointer issue. Unhandled exception at 0x00000000…

I didn’t on the other machine. I’ve moved this to a desktop with a 8400 GS / NVIDIA drivers and still getting the same problems. My gl.h is copyrighted MS, linking against the foo32.lib set… is this not right?

I actually do all of my dev in Fedora… I move it to Windows and nothing works XD

UPDATE.

SIGH. I switched this over to Linux aaaaaand… still doesn’t work. Segfault. Here’s my code.


	glewInit();

	m_ShaderProgram = glCreateProgram();
	m_VertexShader = glCreateShader( GL_VERTEX_SHADER );
	m_FragmentShader = glCreateShader( GL_FRAGMENT_SHADER );

For some reason, glewInit() is returning Missing GL Version …? Crashes on createProgram… if I comment that out, crashes on CreateShader… not sure what’s going on…

Crisis averted… I didn’t have an active opengl context yet… >_< I had this being called in my render object’s initialize function and had accidentally moved that one line above my CreateWindow call… ohhhhhhhhhhhhhhhh to catch silly errors. lol

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.