Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: GLSL language version?  (Read 3866 times)

0 Members and 1 Guest are viewing this topic.

Xeon06

  • Jr. Member
  • **
  • Posts: 58
    • View Profile
GLSL language version?
« 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?

panithadrum

  • Sr. Member
  • ****
  • Posts: 304
    • View Profile
    • Skyrpex@Github
    • Email
GLSL language version?
« Reply #1 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();
}

Xeon06

  • Jr. Member
  • **
  • Posts: 58
    • View Profile
GLSL language version?
« Reply #2 on: May 01, 2010, 08:09:37 pm »
Will you port it to .Net? :D

panithadrum

  • Sr. Member
  • ****
  • Posts: 304
    • View Profile
    • Skyrpex@Github
    • Email
GLSL language version?
« Reply #3 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!

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
GLSL language version?
« Reply #4 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.
Laurent Gomila - SFML developer

Xeon06

  • Jr. Member
  • **
  • Posts: 58
    • View Profile
GLSL language version?
« Reply #5 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.

 

anything