Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

GLSL version considerations?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
5 replies to this topic

#1 blueshogun96   Crossbones+   -  Reputation: 448

Like
0Likes
Like

Posted 04 March 2013 - 01:58 PM

Now that I have OpenGL 3.2 working under MacOSX, now I'd like to know this: what version of GLSL is best to use?

 

Maybe it doesn't really matter, but I've seen some tutorials (for Windows) use 150 while others use 330 or higher.  I haven't used GLSL as much as I should have so I'm not 100% sure.  Been using Cg and HLSL mostly.  

 

Thanks.

 

Shogun.


Shogun3D Development Blog (Last Update: April 11, 2013)

Latest Update: Mac-Metro Anyone?

 

Shogun3D on Tumblr! happy.png


Sponsor:

#2 claesson92   Members   -  Reputation: 284

Like
1Likes
Like

Posted 04 March 2013 - 02:49 PM

http://en.wikipedia.org/wiki/GLSL#Versions

 

That's a list of which GLSL version was released with what version of OpenGL.

 

The numbers declared in the files, such as 150 and 330 is the first and second part of the GLSL version number without the period (.) if I'm not mistaken.

 

Use an as new version as you can.

 

Edit: http://renderingpipeline.com/2012/03/shader-model-and-glsl-versions/ Another list with thier respective version numbers.


Edited by claesson92, 04 March 2013 - 02:53 PM.


#3 blueshogun96   Crossbones+   -  Reputation: 448

Like
0Likes
Like

Posted 04 March 2013 - 03:15 PM

Okay, now I understand.  330 is for OpenGL 3.3.  Since I'm confined to use OpenGL 3.2, I have to stick with 150.  Thanks.

 

Shogun.


Shogun3D Development Blog (Last Update: April 11, 2013)

Latest Update: Mac-Metro Anyone?

 

Shogun3D on Tumblr! happy.png


#4 bwebster890   Members   -  Reputation: 132

Like
0Likes
Like

Posted 04 March 2013 - 03:50 PM

I would say use whatever version suits the code you are writing, if you are planning on using Immediate mode then you'll need to use GLSL 1.2 but if you plan on using Buffer Objects then go ahead and use 1.5. Seeing that you want to use OpenGL 3.2 I would expect that you plan on using Buffer Objects. Um, also do you have a specific reason to use OpenGL 3.2 over 3.3?



#5 mhagain   Members   -  Reputation: 3827

Like
1Likes
Like

Posted 04 March 2013 - 04:58 PM

I would say use whatever version suits the code you are writing, if you are planning on using Immediate mode then you'll need to use GLSL 1.2 but if you plan on using Buffer Objects then go ahead and use 1.5. Seeing that you want to use OpenGL 3.2 I would expect that you plan on using Buffer Objects. Um, also do you have a specific reason to use OpenGL 3.2 over 3.3?

 

MaxOSX only supports GL3.2 so the OP has no choice in the matter.

 

An interesting alternative is to use immediate mode but with glVertexAttrib calls instead of the more familiar glVertex/glTexCoord/etc; may be useful as an intermediate step when converting old immediate mode code but I'm not sure if OSX allows it.


It appears that the gentleman thought C++ was extremely difficult and he was overjoyed that the machine was absorbing it; he understood that good C++ is difficult but the best C++ is well-nigh unintelligible.


#6 blueshogun96   Crossbones+   -  Reputation: 448

Like
0Likes
Like

Posted 05 March 2013 - 01:40 AM

^ This.  When Apple decides it's time to update it's OpenGL implementation, then I can move on to a later version.

 

glVertexAttrib is new to me.  I was hoping there would be something like this to make it a bit simpler to render 2D primitives (i.e. HUD) with dynamic vertex data.  IMO a VBO would be overkill for that.  I need to further research that API subset.  Thanks for sharing!

 

Shogun.


Shogun3D Development Blog (Last Update: April 11, 2013)

Latest Update: Mac-Metro Anyone?

 

Shogun3D on Tumblr! happy.png





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS