
RenderStack C# preview
Posted Monday, 13 June, 2011 - 19:50 by tksuoran inAn initial C# version of RenderStack is now available from http://neure.ath.cx/renderstack_new/
Currently there is not much documentation and only few examples.
Feedback is welcome.


Comments
Re: RenderStack C# preview
Hello, ...
I want to try your project but to execute all the examples I always get the same error "An exception occurred in the type initializer for 'OpenTK.DisplayDevice'." in this line of code
OpenTK.DisplayDevice chosenDisplay = OpenTK.DisplayDevice.Default;My system:
Microsoft Windows 7 Ultimate 32 bit
Graphics: ATI Radeon HD 3800 Series [ version: 3.0.10524 Context Compatibility Profile]
Any ideas to solve the problem?
Miguel
Re: RenderStack C# preview
The copy of OpenTK included in RenderStack is a snapshot from SVN (with small modifications). I have taken the latest SVN version today and minimized my changes; You can redownload the archive (sorry, same name). and try again.
I also dropped forward compatible and debug flags from graphics context, I'm not sure if that could help with some compatibility issues. Let me know if the new version works any better.
Are you able to run any other OpenTK programs?
Re: RenderStack C# preview
This project seems very good, it's just what I had in mind for a game engine. But this way seems very handy for a general purpose visualization toolkit. Good work, well done ! :)
I downloaded the archive
version 11.06, June 12, 2011
And it compiled great, however when I tried to run example.Scene it did not work.
I will try later to download from SVN in case it is updated better.
Re: RenderStack C# preview
The Scene calls RenderStack.Graphics.Configuration.GL3 = true; in Program.cs line 63. This triggers code path in RenderStack.Graphics/Program.cs line 170. If your graphics card doesn't really support GL3 then this is not going to work. In the error message "Unable to find an entry point named 'glBindFragDataLocation'" hints that your driver might not have GL3 support.
A few options to fix:
- Scene example could test for GL3 and abort if it not found. Not nice for those who have older graphics cards or drivers.
- Modify scene example shader to only use GL2. Not nice if you want to promote GL3.
- Hack the shader compiler to "backport" GL3 shader sources to work with older GL version. There is actually some code in RenderStack.Graphics/Shader.cs, look out for SHADER_COMPATIBILITY_HACK define. But this relies on conventions not really documented anywhere (except Shader.cs source), so I have disabled it as it is not general purpose and only works with shaders I have written.
Re: RenderStack C# preview
I downloaded a OpenTK SVN snapshot, I have compiled, and everything works fine. RenderStack I downloaded again from your website and I still get the same error.
Re: RenderStack C# preview
Fiddler, would you happen to have any ideas?
Re: RenderStack C# preview
flopoloco, I've updated the zip with GL 2.1 compatible codes. The shaders are now GLSL version 120 and there was also a small issue with Framebuffer. As a bonus the examples have now been tested in Ubuntu 11.04 (running in vmware) with monodevelop, the scene example currently needs manual copy for res files though.
migueltk, can you try to drop the OpenTK project reference and add OpenTK.dll from elsewhere as reference instead?
Re: RenderStack C# preview
Really curious, I added a reference to OpenTK.dll as indicated tksuoran and everything works fine.I do not understand!. Thanks for the help.
Re: RenderStack C# preview
Glad to hear that helped, even though I don't quite understand why. Must be something in the way OpenTK.dll is built..
Re: RenderStack C# preview
I finally got it to work. It's strange though, I have nVidia 256 GTX
RenderStack.Graphics.Configuration.GL3 = false;