skaslev / gl3w

Simple OpenGL core profile loading
http://github.com/skaslev/gl3w
The Unlicense
709 stars 160 forks source link

Some non-functional improvements to gl3w #1

Closed yuriks closed 14 years ago

yuriks commented 14 years ago

Hello! I've made some changes to you gl3w script so that the generated sources compile cleanly as C++ code. (Should also compile as pure C, but I have not tested.)

skaslev commented 14 years ago

Hey Yuri!

Sorry for the late reply. I moved to Irvine, CA and I was busy relocating.

Anyway, thanks for the feedback. I committed part of your changes to gl3w. Since I am using mainly gcc, I haven't seen any of the warnings that msvc might give on the generated code. If you have any issues, don't hesitate to contact me.

However, I disagree about the return value of gl3wGetProcAddress. Since very few of the functions that gl3wGetProcAddress might return take zero arguments you will need a typecast anyway. Thus I think it's perfectly reasonable that its return type is just void. I guess dlsym returns void because of the same reasoning.