Sunday 6 September 2009

Shaders Without GLEW

After several failed attempts to get shaders working in my tiny opengl framework for blitzmax without using the glew module, I have had some success. At first the code would crash in debug and release mode but give no reason, after a few attempts a week or so ago I gave up.

I returned to the code today after Zawran had be trying to get FBO's working in the framework and encountering the same type of errors as me. After spending alot of time trying to work out what exactly glew does with its pointers from wglprocaddress I came to the conclusion that I was doing that part right so it had to be something else, a trip to the bmax forums and hunting for anything useful I final found something that made me thing about how the extern command works, this lead me to a final piece of information that hopefully has solved the issues.

I have emailed a test exe to Zawran since he runs an Nvidia card and I run an ATI, hopefully if it works for him as well I may have finally cracked it and we can add any needed extensions. The interesting thing is the test exe including the shader code came out when compressed with kkrunchy at a mere 25kb, the same thing using the glew module is 50kb without the shaders included in the exe, a nice bit of space saving. Maybe we can make a 64kb demo with bmax yet!

No comments:

Post a Comment