Skip to main content
GameDev.net gamedev.net
🔒 Locked

CsGL glVertexPointer()

Started by MeeZ May 2, 2004 at 2:54 AM 3 replies 700+ views
Original Post
MeeZ
MeeZ
For a few days now I have been working on porting a couple of my OpenGL programms from VC++ to C#. Anyway, I am using CsGL for my OpenGL functions etc... But for some reason I can not get glVertexPointer() or glTexCoordPointer() to work. Mainly because in the RedBook and OpenGL specs it gives the final paramter of these functions are pointers, But we don''t use pointers with C# (.NET framework). Can someone PLEASE tell me how I can use both of these functions without the use of pointers? I think you can define an array of the points you want rendered or something, and somhow use that? I am not sure. But I would really appreciate ANY help with this, there is bugger all on the net! Thanks HEAPS in advance. Cheers, MeeZ
MeeZ
silvermace
silvermace
sounds like you will have to write a C or C++ opengl rendering
driver for your engine and have it manage all the data externaly

its probably the fastest and easiest alternative

sorry i couldnt be of more help, i have no C# experience
Irix

[edited by - silvermace on May 2, 2004 6:03:08 AM]
snake__
snake__
You can use pointers with IntPtr (System.IntPtr) or with unsafe code.
I don''t know for ScGL, but in Tao you can also use arrays for stuff like that.


Use Tao framework it has everything (AFAIK, CsGL doesn''t get updated anymore) --> http://www.randyridge.com/
MeeZ
MeeZ
Hey, thanks fellas. Umm.. yeah, i want to stay clear of having to write C++ code, considering I am working on porting to C#. That would defeat my purpose. But an idea to keep in mind if all else fails.
As for Tao, how the hell to you obtain a copy of it? I have been to the download section numerous times, try to download the framework, and get some crappy unknown file? What''s going on?

Anyway, thanks heaps for your time and effort.

Cheers,

MeeZ
MeeZ
snake__
snake__
I think you''ll have to run those batch files (in Scripts/Windows/... folder) you get with download. That''ll generate dlls for you (Tao.OpenGl.dll,...). You''ll find them in Build folder then.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.