GLSL to come?

Hej community!

I just read that the newest OpenGL 2.1 includes a shading language called GLSL. Is that in any way subject to JOGL?

I have to admit that i don’t fully understand what this would mean, but would this enable JOGL users to import Blender models into JOGL? I had the impression when I read about it. Anyway this is what I am looking for. :smiley:

Cheers, Eric

  1. IIRC, GLSL is already available though Jogl or LWJGL.
  2. You don’t need GLSL to load blender models.
  1. What do you mean by “or”? I won’t switch now to LWJGL! 8)
  2. So is there any description or example of how to do it? You won’t believe how many hours I already spent searching for a way to import blender models into JOGL… :frowning:

Hint : I know no tool that can import .blend files. You have to export from blender to another format (.OBJ for static objects, e.g. or Cal3D/MD2/MD5 for animated objects).

For a list of the OpenGL 2.0 functions that connect to GLSL, see http://developer.3dlabs.com/documents/glslmanpage_index.htm - there are oepnGL extensions that are equivalent to these (basically they just end in ARB, although some of them have the “Shader” part replaced with “Object”), see ARB_shader_objects, ARB_vertex_shader, ARB_fragment_shader (and maybe some of the related ARB extensions). For tips on programming in GLSL, just do a google search for “GLSL”, “GLSL tutorial” or the like - that 3dlabs web site has a bunch of good samples, too.

The order for a basic fragment/vertex shader combo is as follows in this order:

glCreateShader(GL_FRAGMENT_SHADER)
glCreateShader(GL_VERTEX_SHADER)

glShaderSource on the fragment shader
glShaderSource on the vertex shader

glCompileShader on the fragment shader
glCompileShader on the vertex shader

glCreateProgram

glAttachShader on the fragment shader and the shader program
glAttachShader on the vertex shader and the shader program

glLinkProgram

[quote="<MagicSpark.org [ BlueSky ]>,post:4,topic:28138"]
Hint : I know no tool that can import .blend files. You have to export from blender to another format (.OBJ for static objects, e.g. or Cal3D/MD2/MD5 for animated objects).
[/quote]
I know about the exporting, I just don’t know how to import them into JOGL… :frowning:

I know about the exporting, I just don’t know how to import them into JOGL… :frowning:
[/quote]
I know somebody wrote a loader for JOGL.

Now if you want facility, choose Xith3D, Java3D or jME.

[quote="<MagicSpark.org [ BlueSky ]>,post:7,topic:28138"]
I know somebody wrote a loader for JOGL.
[/quote]
So this means that one really has to write such a loader by himself?
OK then, how can I contact this person or access this loader?

[quote="<MagicSpark.org [ BlueSky ]>,post:7,topic:28138"]
Now if you want facility, choose Xith3D, Java3D or jME.
[/quote]
Thanks, but I would like to stick to pure JOGL. I already tried Java3D before which was way too complicated for my taste. Meaning I prefer no-scenegraph based extensions. :slight_smile:

Well, just snap your fingers and go there : http://www.java-gaming.org/forums/index.php?topic=14021.0