Search code examples
macosopenglxamaringlslxamarin-studio

Xamarin crashes editing shader code


Writing if statements in my GLSL shader code crashes Xamarin Studio. Also declaring a vec3, vec4 or other miscellaneous data types will initiate the eternal hang also.

It seems Xamarin can't parse the foreign language. And that's fine, I don't need it to, but I do need to be able to work on my code.

Can I disable parsing, error checking, etc for specific files in my solution?


Solution

  • (extending our comments from your question)

    Xamarin 6.1 editing shader files with if/else, vec2/vec3/vec4, etc.. without any issues:

    enter image description here

    Shown is a Addin that extends the mime type text/x-cgsrc (CGSyntaxMode.xml) with some minor additions for:

    <File pattern="*.shader" />
    <File pattern="*.fs" />  
    <File pattern="*.vs" />  
    <File pattern="*.cginc" />  
    <File pattern="*.vert" />  
    <File pattern="*.tese" />  
    <File pattern="*.tesc" />  
    <File pattern="*.geom" />  
    <File pattern="*.frag" />  
    <File pattern="*.comp" />               
    

    Dark Theme setting in 6.1:

    enter image description here