SFML community forums

Help => Graphics => Topic started by: Xeon06 on May 01, 2010, 02:59:25 pm

Title: GLSL language version?
Post by: Xeon06 on May 01, 2010, 02:59:25 pm
Hey all,

I'm using SFML.Net 2.0 and I want to learn to use shaders with GLSL. Only thing is, I found many tutorials on the internet but they all are for different versions and they explicitly say to avoid certain older functions since they are deprecated since x version and whatnot. My question is, what version does SFML use? Is it even related to SFML? If not, how can I find out the version on my computer? At run time?
Title: GLSL language version?
Post by: panithadrum on May 01, 2010, 04:48:21 pm
You can check your current GLSL version (among other cool things) using my lib SFEX: http://www.sfml-dev.org/forum/viewtopic.php?t=2541

Code: [Select]
#include <sfex.hpp>
#include <iostream>

int main()
{
    sfex::Init();
    std::cout << "Your GLSL version is: " << sfex::Gpu::GetGlslVersion() << std::endl;
    sfex::Close();
}
Title: GLSL language version?
Post by: Xeon06 on May 01, 2010, 08:09:37 pm
Will you port it to .Net? :D
Title: GLSL language version?
Post by: panithadrum on May 01, 2010, 11:31:15 pm
Quote from: "Xeon06"
Will you port it to .Net? :D


I never tried .Net :-S I don't even know where to start!
Title: GLSL language version?
Post by: Laurent on May 02, 2010, 12:53:58 am
Quote
I never tried .Net :-S I don't even know where to start!

Three solutions:
1. Use C++/CLI to build your .Net assemblies (libraries), so that you can use native C++ in them
2. Make a C DLL, and use it to create a C# assembly using P/Invoke
3. Rewrite the entire thing from scratch in C#

2 and 3 are be compatible with Mono (Linux), 1 is not -- at least when I last checked -- but easier.
Title: GLSL language version?
Post by: Xeon06 on May 02, 2010, 01:17:07 am
Quote from: "panithadrum"
Quote from: "Xeon06"
Will you port it to .Net? :D


I never tried .Net :-S I don't even know where to start!


Haha, what I meant by that is that I'm looking for a .NET solution.