Jump to content
  • Advertisement
Sign in to follow this  
JackTheRapper

OpenGL OpenGL Shaders 101

This topic is 3536 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I'm currently using a fixed-pipeline for my OpenGL projects. I stopped programming as a hobby a good few years back (2000/2001) and my word, things have changed! I REALLY want to get into the bowels of my videocard and use vertex shaders but I am really unsure how to go about this... I've read lots of articles but they all seem to rely on some nVidia CGL thing which I have absolutely no idea what this is (propriety?). I would be most grateful if someone could give me the lowdown of what I need to install and what I need to setup to use shaders in OGL. DX seesm to do this transparently via the usual API calls... is this an edge that X has over OGL? will I have to use proprietary extension that tie me down to one manufacturer? My video card supports OGL 1.4 Thanks in advance and please be kind about my ignorance on the topic :D

Share this post


Link to post
Share on other sites
Advertisement
http://www.lighthouse3d.com/opengl/glsl/index.php?intro

here You have some grate and quite simple info to start coding in opengl using shaders.

As far as I know You need to have at least opengl 1.5 or better - opengl 2.0 gfx card to support shaders.

Share this post


Link to post
Share on other sites
Thanks for the reply.

Sorry, my bad, my card supports OGL 1.5 :D I have a final major project for uni coming up in a few weeks... I'm used to multitexturing with fixed pipeline, in ur experience would it be worth detouring to learn shaders? I am under the impression they are far more flexible than the fixed p method, but would the learning curve be too steep (and thus stick to waht I know)?

again, thanks for the advice :D

edit: I have 1.5 compiance but the Lighthouse page says I need the GL_ARB_fragment_shader extension which, according to OpenGL Extension Viewer 3.0 is an OpenGL 2.0 extension, unless I'm missing something?

Share this post


Link to post
Share on other sites
hmm... intersting! I found this document: http://mindfuck.de-brauwer.be/articles/shader/index.php

Furthermore, my card supports the following extensions:

GL_ARB_vertex_program
GL_ARB_fragment_program

In this thread (http://www.gamedev.net/community/forums/topic.asp?topic_id=514368), the following dialogue takes place:

Quote:
ok, so i found that the intel GMA 950 supports

GL_ARB_fragment_program
GL_ARB_vertex_program

but not

GL_ARB_shader_objects
GL_ARB_shading_language_100

does that make sense? what are they two above good for if you cant make shaders without the two below?

thanks!



Quote:
GL_ARB_vertex/fragment_program is different from GL_ARB_vertex/fragment_shader. The first one is a separate, and old, shader interface. Second one is the newer you use with GL_ARB_shader_objects.


Quote:
ah i see the difference now. thanks brother bob.

so how is it possible to get a GLSL shader running with those two extensions only?


Quote:
Cg can compile GLSL code to those assembly forms (GL_ARB_fragment_program, GL_ARB_vertex_program)


Is this information correct?

Share this post


Link to post
Share on other sites
thanks for the info!

I managed to get shaders working and the setup was actually relatively painless! I am eagerly looking forward to multitexturing in this manner as it appears much more simple this way than the vintage FP approach :D

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!