Giter Club home page Giter Club logo

objecttk's Issues

Exception in ProgramFactory, public static T Create<T>() when starting any of examples

Whenever I try to start any of the examples from tree list, a window with white rectangle on black background briefly shows and I get an exception

An unhandled exception of type 'System.Exception' occurred in ObjectTK.dll
Invalid effect key: 330

'Examples.exe' (CLR v4.0.30319: Examples.exe): Loaded 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\Remote Debugger\x64\Runtime\Microsoft.VisualStudio.Debugger.Runtime.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

Unhandled Exception: System.Exception: Invalid effect key: 330 ---> System.ArgumentOutOfRangeException: Length cannot be less than zero.
Parameter name: length
   at System.String.Substring(Int32 startIndex, Int32 length)
   at ObjectTK.Shaders.ProgramFactory.GetShaderSource(String effectKey, List`1 included) in C:\ObjectTK\LIB\ObjectTK\ObjectTK\Shaders\ProgramFactory.cs:line 107
   --- End of inner exception stack trace ---
   at ObjectTK.Shaders.ProgramFactory.GetShaderSource(String effectKey, List`1 included) in C:\ObjectTK\LIB\ObjectTK\ObjectTK\Shaders\ProgramFactory.cs:line 113
   at ObjectTK.Shaders.ProgramFactory.GetShaderSource(String effectKey, List`1 included) in C:\ObjectTK\LIB\ObjectTK\ObjectTK\Shaders\ProgramFactory.cs:line 154
   at ObjectTK.Shaders.ProgramFactory.Create[T]() in C:\ObjectTK\LIB\ObjectTK\ObjectTK\Shaders\ProgramFactory.cs:line 85
   at Examples.BasicExamples.SkyboxExample.OnLoad(Object sender, EventArgs e) in C:\ObjectTK\LIB\ObjectTK\Examples\BasicExamples\SkyboxExample.cs:line 32
   at System.EventHandler`1.Invoke(Object sender, TEventArgs e)
   at OpenTK.GameWindow.Run(Double updates_per_second, Double frames_per_second)
   at Examples.ExampleBrowser.RunExample(TreeNode node) in C:\ObjectTK\LIB\ObjectTK\Examples\ExampleBrowser.cs:line 70
   at Examples.ExampleBrowser.TreeViewExamples_NodeMouseDoubleClick(Object sender, TreeNodeMouseClickEventArgs e) in C:\ObjectTK\LIB\ObjectTK\Examples\ExampleBrowser.cs:line 57
   at System.Windows.Forms.TreeView.OnNodeMouseDoubleClick(TreeNodeMouseClickEventArgs e)
   at System.Windows.Forms.TreeView.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
   at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   at Examples.ExampleBrowserEntry.Main() in C:\ObjectTK\LIB\ObjectTK\Examples\ExampleBrowserEntry.cs:line 17
The program '[10176] Examples.exe' has exited with code 0 (0x0).

ObjectTK 2.0 Checklist

Current tasks:

  • Add debug extension/tool.
  • Discuss texture implementations
  • Add embedded resource loading
  • Add .obj importer
  • Add some basic primitive vertex arrays
  • Add typed Shaders
  • Add 3D package
  • Figure out how to deal with extensions (like aniso filtering)

Pass Data to Fragment Shader.

I'm new to OpenGL. I played with the examples and noticed that I can't send data directly to the fragment shaders instead of that I need to send to the vertex shader then the vertex shader sends it to the fragment shader. Is this normal?

Shader compilation error

When I try to compile the shaders from the included exemples I get an error telling me that the version directive must be first statement.
I've looked at the code and it looks like some sort of line number reference is appended before anything and it seems to be the cause of the issue.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.