From: Michael Brooks on
Hello Michal:

>"Michal Suchanek" <hramrach(a)centrum.cz> 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.

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
(like OpenGL 2.0+ in the recent ATI, Nvidia and Intel drivers) then you
could modify this section and other sections of code to use the alternate
(i.e. older) function names. However, I don't believe your drivers support
shaders at all.

Michael

From: Michal Suchanek on
2010/1/15 Michael Brooks <michael.brooks(a)shaw.ca>:
> Hello Michal:
>
>> "Michal Suchanek" <hramrach(a)centrum.cz> 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

From: Phillip Gawlowski on
On 15.01.2010 07:40, Michal Suchanek wrote:

> 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).

http://www.intel.com/support/graphics/sb/cs-010512.htm

They weren't particularly good until recently, but they are there.

The one thing that worked out of the box in my last Linux experiment
with Ubuntu was Compiz Fusion and WiFi. ;)

--
Phillip Gawlowski

From: Michal Suchanek on
2010/1/15 Phillip Gawlowski <pg(a)thimian.com>:
> On 15.01.2010 07:40, Michal Suchanek wrote:
>
>> 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).
>
> http://www.intel.com/support/graphics/sb/cs-010512.htm
>
> They weren't particularly good until recently, but they are there.
>

These *are* the X11/Mesa drivers and they *are* bad as in having few
features, possibly in part because of limitations of the Intel
hardware.

The stability has also worsened recently. Too many chipset revisions
with different hardware issues I guess.

Thanks

Michal

From: Michael Brooks on
Hello Michal:

"Michal Suchanek" <hramrach(a)centrum.cz> wrote in message
news:a5d587fb1001150147g76ab218aw2beb6a7c663cadc8(a)mail.gmail.com...
> 2010/1/15 Phillip Gawlowski <pg(a)thimian.com>:
>> On 15.01.2010 07:40, Michal Suchanek wrote:
>>
>>> 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).
>>
>> http://www.intel.com/support/graphics/sb/cs-010512.htm
>>
>> They weren't particularly good until recently, but they are there.
>
> These *are* the X11/Mesa drivers and they *are* bad as in having few
> features, possibly in part because of limitations of the Intel
> hardware.
>
> The stability has also worsened recently. Too many chipset revisions
> with different hardware issues I guess.
>
> Thanks
>
> Michal

Sorry to hear that. I do most of my work in Windows. I just booted my
desktop into Mint Linux 7 which already had the Nvidia 3D drivers installed
then installed ruby 1.8.7, glut, ruby-opengl and ran the
gears_with_shaders.rb file just fine. I've had the best success with Nvidia
under Linux. Even the Geforce Go 6150 in my old HP tx1000 laptop supports
OpenGL 2.1 in Mint Linux 8. I've had some success with ATI in Linux but it
varies greatly for different models and from distro-to-distro. I'd heard
that the Intel x3100 IGP and later chipsets were supposed to support OpenGL
2.0+ but haven't had direct experience with them.

Michael