Is GLEW necessary to use shaders? [solved: NOT necessary]

Started by
16 comments, last by transistor09 14 years, 2 months ago
http://www.gamedev.net/community/forums/topic.asp?topic_id=557319&whichpage=1&#3579464
Advertisement
Oh, OK. Gonna stick with the GLEW; thanks everyone!
Umm, scratch that, there was an error (you can clearly see it in my posted code) in my file loader. Everything works fine without GLEW.

For me, binding extensions is easier than converting a VC6 project to work with CodeBlocks.
Quote:Original post by V-manI like GLEW. It makes my program run 5 times faster. You have to call glewInit.
Please tell me that's a joke. On the small chance you're serious... why so? Also, do you need to call the glewInit() function if you compile the GLEW files into your program (and thus not link it in)?

Quote:Also, do you need to call the glewInit() function if you compile the GLEW files into your program (and thus not link it in)?

Yes. I bet its the function that GLEW uses to bind extensions. If you try to use any function before glewInit(), the program fails. [GL]Extensions are done differently than linking. You have to manually initialize the function pointer to it's prototype.
Quote:Original post by transistor09
Quote:Also, do you need to call the glewInit() function if you compile the GLEW files into your program (and thus not link it in)?

Yes. I bet its the function that GLEW uses to bind extensions. If you try to use any function before glewInit(), the program fails. [GL]Extensions are done differently than linking. You have to manually initialize the function pointer to it's prototype.
Correct. However, GLee handles this under the hood (unlike GLEW).

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

Quote:Original post by maxgpgpu
Quote:Original post by V-manI like GLEW. It makes my program run 5 times faster. You have to call glewInit.
Please tell me that's a joke. On the small chance you're serious... why so? Also, do you need to call the glewInit() function if you compile the GLEW files into your program (and thus not link it in)?


It was a joke. This thread seems kind of too boring for my taste.
Anyway, GLEW is the best.
GLEE, every time you call a gl function, GLEE checks to see if it has initialized. It might not have an effect on performance, but I prefer GLEW's way.

Have fun with GL!
Sig: http://glhlib.sourceforge.net
an open source GLU replacement library. Much more modern than GLU.
float matrix[16], inverse_matrix[16];
glhLoadIdentityf2(matrix);
glhTranslatef2(matrix, 0.0, 0.0, 5.0);
glhRotateAboutXf2(matrix, angleInRadians);
glhScalef2(matrix, 1.0, 1.0, -1.0);
glhQuickInvertMatrixf2(matrix, inverse_matrix);
glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);
Quote:Original post by V-manThis thread seems kind of too boring for my taste.
Better than homework assignment solution request or illegible Engrish.

This topic is closed to new replies.

Advertisement