|
View:
New views
6 Messages
—
Rating Filter:
Alert me
|
|
|
ARB errorsHello all,
I've been trying to use several different ARB calls recently, and no matter what I try I get the same crash & burn error :( For instance, the following code: mHandleFrag = Gl.glCreateShaderObjectARB(Gl.GL_FRAGMENT_SHADER_ARB); errors with: "An unhandled exception of type 'System.NullReferenceException' occured in tao.opengl.dll. Additional information: Object reference not set to an instance of an object." Before this call I am doing these calls: string extensions = Marshal.PtrToStringAnsi(Gl.glGetString(Gl.GL_EXTENSIONS) ); string version = Marshal.PtrToStringAnsi(Gl.glGetString(Gl.GL_VERSION) ); bool res; res = Tao.OpenGl.GlExtensionLoader.LoadExtension(simpleOpenGlControl1, "glCreateShaderObjectARB", true); res = Tao.OpenGl.GlExtensionLoader.LoadExtension(simpleOpenGlControl1, "glShaderSourceARB", true); res = Tao.OpenGl.GlExtensionLoader.LoadExtension(simpleOpenGlControl1, "glCompileShaderARB", true); res = Tao.OpenGl.GlExtensionLoader.LoadExtension(simpleOpenGlControl1, "glCreateProgramObjectARB", true); res = Tao.OpenGl.GlExtensionLoader.LoadExtension(simpleOpenGlControl1, "glAttachObjectARB", true); res = Tao.OpenGl.GlExtensionLoader.LoadExtension(simpleOpenGlControl1, "glLinkProgramARB", true); which all return nice values- the extensions string has everything present, and gl version is 2.0.1. Res=true for all. LoadAllExtensions() makes no difference. I had the same errors when trying multitexturing calls. Running XP SP2, nVidia 5700 latest drivers, Tao 1.2 (tried both the downloadable dlls and built from svn). I'd be very happy if someone could provide a solution to this problem! cheers, Phil |
|
|
Re: ARB errorsBumpy bump bump. Does anyone have any ideas what might be wrong? I really need to use ARB extensions!!
tia, Phil |
|
|
Re: ARB errorsOn 1/26/06, PhilF (sent by Nabble.com) <lists@...> wrote:
> Hello all, > I've been trying to use several different ARB calls recently, and no matter > what I try I get the same crash & burn error :( For instance, the following > code: > > mHandleFrag = Gl.glCreateShaderObjectARB(Gl.GL_FRAGMENT_SHADER_ARB); You're calling glCreateShaderObjectARB on the global OpenGL context, but ... > bool res; > res = > Tao.OpenGl.GlExtensionLoader.LoadExtension(simpleOpenGlControl1, > "glCreateShaderObjectARB", true); ... you're passing in simpleOpenGlControl1 as an OpenGL context instace. But it's not a context; because it gets passed in as an "object" type, you're not getting a compilation error, but you really should be getting a runtime error there. I'll try to add in some better type checking there. Also, you're calling LoadExtension which takes an -extension- name, not a function name. Try: Tao.OpenGl.GlExtensionLoader.LoadExtension("GL_ARB_shader_objects"); or just Tao.OpenGl.GlExtensionLoader.LoadAllExtensions(); - Vlad _______________________________________________ Tao-list mailing list Tao-list@... http://galactus.ximian.com/mailman/listinfo/tao-list |
|
|
Re: ARB errorsD'oh! Silly errors :( It no longer crashes, many thanks Vlad :)
I was also missing a simpleOpenGlControl1.MakeCurrent() before the loadextensions. Just get two odd errors on LoadAllExtensions() now (don't think they will affect my program): OpenGL claimed that 'GL_NV_half_float' was supported, but couldn't find 'glVertexWeighthNV' entry point OpenGL claimed that 'GL_NV_half_float' was supported, but couldn't find 'glVertexWeighthvNV' entry point on with the coding! cheers, Phil |
|
|
Re: ARB errors (now in Tao 2.0)I know this is old, but I'm having the same sort of issue. I'm in the new Tao 2.0. In 2.0, LoadExtensions is deprecated. I've tried it anyway and it doesn't help.
Gl.IsExtensionSupported("GL_ARB_shader_objects") returns true every time, but any call to an ARB function I want throws a NullReferenceException. Maybe I should be using the Tao source instead of library? I know GetDelegateForExtensionMethod can be used fine, but you'd have to create a bajillion delegates. Anybody? |
|
|
Re: TAO ARB NullReferenceException SOLVED!Ah it turns out a designer function was setting the size of my control, which was trying to set the viewport and initialize the static members of the Gl class --- before my rendering context was established. Once I cleared out the resize, all my delegates were assigned correctly. Run Tao Framework from source if you want to find problems, I guess.
|
| Free embeddable forum powered by Nabble | Forum Help |