From: Michal Suchanek Date: 2010-01-15T15:40:28+09:00 Subject: Re: 3D with Ruby (Ogre ?) 2010/1/15 Michael Brooks : > Hello Michal: > >> "Michal Suchanek" wrote: >>> >>> I used the the gears.rb as the basis for a OpenGL programmable shader >>> (i.e. >>> GLSL) version of the gears program. The intro to it and download can be >>> found through here: >>> >>> http://osdir.com/ml/ruby-talk/2009-03/msg00749.html >>> >> FWIW this does nt work for me on Linux. >> >> $ ruby gears_using_shaders.rb >> Error - The program has terminated because the environment does not > > s>upport OpenGL 2.0 or greater GLSL shaders. >> >> $ glxinfo >> name of display: :0.0 >> display: :0  screen: 0 >> direct rendering: Yes >> server glx vendor string: SGI >> server glx version string: 1.2 >> OpenGL vendor string: DRI R300 Project >> OpenGL renderer string: Mesa DRI R300 (RV515 7153) 20090101  TCL >> OpenGL version string: 1.5 Mesa 7.6.1 > > I implemented the OpenGL 2.0 or greater version of the shader functions so > you'll likely need to install OpenGL 2.0 or greater drivers for your video > card.  It looks like you're running the software-only OpenGL drivers that > come with Linux. direct rendering: Yes It isn't software only but they don't seem to support OpenGL 2. > > In the initialize procedure I do the following check for the required OpenGL > functions: > >   # Exit if the environment can't handle the OpenGL 2.0 style >   # GLSL shader api commands >   if not (GL.respond_to?('CreateProgram') and >           GL.respond_to?('CreateShader') and >           GL.respond_to?('ShaderSource') and >           GL.respond_to?('CompileShader') and >           GL.respond_to?('AttachShader') and >           GL.respond_to?('LinkProgram') and >           GL.respond_to?('DeleteShader') and >           GL.respond_to?('DeleteProgram')) >     puts('Error - The program has terminated because the environment does ' > + >          'not support OpenGL 2.0 or greater GLSL shaders.') >     exit >   end > > In theory, if your MESA / SGI driver supported shaders through ARB > extensions (like some earlier OpenGL's did) instead of as built in functions Yes, there are some ARB extensions listed. > (like OpenGL 2.0+ in the recent ATI, Nvidia and Intel drivers) then you The problem is that Intel does not do special driver for Linux, their hardware is supposedly supported by X11/Mesa and the proprietary drivers for ATI/nVidia cards simply don't work (tried with recent cards about half an year ago). > could modify this section and other sections of code to use the alternate Running a demo is as far as I got in using OpenGL so I guess I will pass on this for now. > (i.e. older) function names.  However, I don't believe your drivers support > shaders at all. > It supports fragment and vertex programs. I don't know it that's sufficient but I think FireGL V3350 should support some shading. Thanks Michal