From: Christopher H. <Chr...@vi...> - 2004-08-29 17:47:55
|
Hi, I'm really stuck on (probably) a very simple problem. I need to read my buffer so that I can pass it on to a special TV broadcast graphics card that will output the graphics on the fly. I want to use the glReadPixels command to save my buffer into a System.IntPtr object. So I use the following code (vb.net): '---------------------- Dim buf As Int32 =3D 0 Dim pbuf As New IntPtr(buf) glReadPixels(0, 0, 720, 576, GL_RGBA, GL_UNSIGNED_BYTE, pbuf) '---------------------- When it gets to glReadPixels I get a nullpointer exception. Now please don't refer me to the FAQ, because I have read it and I read about your workaround for passing a *void by using CSGL.Pointers.Ptypes. The problem is that vb.net will not just let me pass something like a PUInt32 to glReadPixels and I can't use Ctype() to convert it either. I'm sure the solution is very simple, but I just need somebody to show me the line of vb.net code that will do the trick. Any help greatly appreciated! Regards, Chris |