#197 [patch] Support for GLSL filetype

closed-fixed
General (289)
2
2008-09-12
2008-08-19
No

Hi all,

I've working today on creating a GLSL (OpenGL's Shading Language) filetype support for Geany.
It works fine now (as my tests shows), and I propose it as a patch for the latest SVN (r2900).

I join a patch, but if it doesn't work right with the ctags file (stranges bytes in ctags could be altered?), just tell me and I upload the original ctags file.

Best regards

Discussion

  • Colomban Wendling

    Logged In: YES
    user_id=2153708
    Originator: YES

    Ooops, I missed to update symbols.c fort tags (why was it working for me?). New patch fixes this leak.
    File Added: geany_glsl.patch

     
  • Colomban Wendling

    • priority: 5 --> 2
     
  • Colomban Wendling

    updated GLSL support patch

     
  • Colomban Wendling

    Logged In: YES
    user_id=2153708
    Originator: YES

    Humm... Speed is not friend of efficiency.
    Sorry for this third update, but my latest patch contains two build files not deleted before creating the patch (why, I dunno, but it's there).
    I've check this one, it seems good (and it applies right!), I home this time is the one.

    Sorry for this many annoying updates.
    File Added: geany_glsl.patch

     
  • Nick Treleaven

    Nick Treleaven - 2008-08-26

    Logged In: YES
    user_id=1268692
    Originator: NO

    Hi,
    Thanks for the patch. We'll commit the new filetype soon.

     
  • Nick Treleaven

    Nick Treleaven - 2008-08-26
    • assigned_to: nobody --> ntrel
     
  • Nick Treleaven

    Nick Treleaven - 2008-08-27
    • status: open --> pending-accepted
     
  • Nick Treleaven

    Nick Treleaven - 2008-08-27

    Logged In: YES
    user_id=1268692
    Originator: NO

    I've now committed most of the patch, but removed the built-in support for glsl.tags. We think this is not common enough to be part of the Geany distribution. It should be possible to use that file as a custom tags file by renaming it to e.g. std.glsl.tags. I didn't get it to work though, maybe because of the following:

    Unfortunately the symbol list doesn't recognise any tags such as:
    void main(void){}

    So it seems there's something wrong with the tagmanager/geany code for GLSL. Does it work for you?

     
  • Nick Treleaven

    Nick Treleaven - 2008-08-27

    Logged In: YES
    user_id=1268692
    Originator: NO

    Hmm, the symbol list is now working for me, sorry (I had rebuilt but there seemed to be some problem with the autotools after an svn switch command, perhaps this didn't link in the new TM code - after an ./autogen.sh it was fine).

    The tags file (renamed to std.glsl.tags and put in ~/.geany/tags) doesn't seem to be working though, not sure why. It gets recognised by Geany in a debug message, but not the contents. Was it created by 'geany -g' ?

     
  • Nobody/Anonymous

    Logged In: NO

    Hello,

    Thanks for commit in SVN.
    But I don't think that removing tags is a good idea: I think that the GLSL functions & variables are too deeply part of the language to forgot it. I.e., GLSL uses some of the language's variables to get most of the data from the user or the graphic card, like vertices, pixels and so (see example below, only nor and pos variables user-defined).
    Let me give you an extra link to the GLSL 1.3 specifications if you want to see a little the language design: http://www.opengl.org/registry/doc/GLSLangSpec.Full.1.30.08.pdf

    For me the tagmanger works well (as with C in facts). (I've tested with the true SVN, not my personally patched copy). I've tried all GLSL codes I have and a simple "void main(void){}", all works well as expected for me.
    For tags, I've tried with an external tags file, and it works for me both if I dynamically import it with "Tools => Load tags" or if I put a std.glsl.tags in my ~/.geany/tags/std.glsl.tags. It doesn't work if I put it into the root Geany's datadir (/usr/local/share/geany for me), but I think it is expected.
    It is really strange you didn't get a least the same tags as with a C file.

    A GLSL vertex shader code (made by a friend of mine) for example:

    varying vec3 nor, pos;

    void main (void)
    {
    pos = vec3 (gl_ModelViewMatrix * gl_Vertex);
    nor = gl_NormalMatrix * gl_Normal;

    gl_TexCoord[0] = gl_MultiTexCoord0;
    gl_Position = gl_ProjectionMatrix * vec4 (pos, 1.0);
    }

     
  • Colomban Wendling

    Logged In: YES
    user_id=2153708
    Originator: YES

    Hum, sorry, I've skipped your new response.

    Yes, the tags files was done width geany, but I think it is possible that the patch was wrong with the special bytes.
    I upload it separately, I hope it'll work (the file works for me).

    PS: sorry, the previous message is from me, I forget to login.
    File Added: std.glsl.tags

     
  • Colomban Wendling

    • status: pending-accepted --> open-accepted
     
  • Colomban Wendling

    tags for GLSL filetype

     
  • Nick Treleaven

    Nick Treleaven - 2008-08-28
    • status: open-accepted --> pending-fixed
     
  • Nick Treleaven

    Nick Treleaven - 2008-08-28

    Logged In: YES
    user_id=1268692
    Originator: NO

    Thanks for the example code.

    The uploaded std.glsl.tags file now works correctly for me (the 0xCC, 0xCX bytes were wrong in the patch).

    I've made this std.glsl.tags file available for download here:
    http://geany.uvena.de/Download/Extras

    We won't distribute it with Geany, as many Geany users won't use it, but also because our plan is not to ship tags files with Geany releases. In future all tags files will need to be downloaded separately.

     
  • SourceForge Robot

    • status: pending-fixed --> closed-fixed
     
  • SourceForge Robot

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks