The Artima Developer Community
Sponsored Link

Agile Buzz Forum
The limits of "future compatible" OpenGL 3.0

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
James Robertson

Posts: 29924
Nickname: jarober61
Registered: Jun, 2003

David Buck, Smalltalker at large
The limits of "future compatible" OpenGL 3.0 Posted: Sep 13, 2008 1:43 PM
Reply to this message Reply

This post originated from an RSS feed registered with Agile Buzz by James Robertson.
Original Post: The limits of "future compatible" OpenGL 3.0
Feed Title: Michael Lucas-Smith
Feed URL: http://www.michaellucassmith.com/site.atom
Feed Description: Smalltalk and my misinterpretations of life
Latest Agile Buzz Posts
Latest Agile Buzz Posts by James Robertson
Latest Posts From Michael Lucas-Smith

Advertisement

Right now there's an NVidia driver for OpenGL 3.0 on Windows. That's it... nothing more. This has caused by a small problem with shaders. I've been working hard to remove all the deprecated entry points and defines in OpenGL, but I can't do that as easily in the OpenGL Shader Language (GLSL) 1.30 changes.

All of the fixed-functionality variables, gl_Color, gl_Texcoord, glFragData, gl_FragColor, so on and so forth... they're all gone. The syntax for GLSL has also changed slightly. The new spec defines 'in' and 'out' which is pretty obvious. You need it too to specify an 'out' vector in a fragment shader for your output colour.

The only way to set the output colour in a fragment shader is to set gl_FragColor or gl_FragData.. but both of these are deprecated, so how are you meant to do it now? Well, you define an out vector and then you bind that variable to an output buffer. This is pretty neat and generalized. The function call to glBindFragDataLocation works, but we have a problem...

Because we don't have an OpenGL 3.0 driver, we don't have access to the GLSL 1.30 language. In GLSL 1.20 you -cannot- have a varying vector in a fragment shader, thus you cannot actually use glBindFragDataLocation.. thus you cannot write to the output buffers using a "future compatible" OpenGL 3.0 sort of style.

Bummer. So while our OpenGL programs can be future compatible, our GLSL programs cannot. Syntax changes, built in changes, variable changes mean that no matter what we do - right now, all your fragment shaders will have to be touched up again. At least your vertex shaders can stay mostly the same, though the in/out syntax change will have to be applied.

This is a big problem because it's unlikely we'll see OpenGL 3.0 drivers spread about everywhere for a long while. Sigh.

Read: The limits of "future compatible" OpenGL 3.0

Topic: Seaside in Orlando Previous Topic   Next Topic Topic: It is the Phone Company...

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use