C#, TAO & OpenGL

Started by
10 comments, last by GameDev.net 17 years, 8 months ago
Hi there! After working with C++ and OpenGL for some years I now I thought it would be time to try something new. So I started with C# today :-) What I'd like to create is a little 3D-editor. But to get started I need to have access to OpenGL functions in my C# app. So I looked all over the web and found only TAO (which is free). Sadly there are NO tutorials or anything on their website... So could anyone give me a hint (or sample code) on how to access OpenGL in C# via TAO? (note: I'm a total noob!) Thank's a lot :-D
Advertisement
Look in source\examples they have a whole section of OpenGL tutorials - NeHe from nehe.gamedev.net.
literally all you do is include the Tao namespace and add Gl. to your opengl calls and constants and you are set.

its the exact same.


using Tao.OpenGL

void foo()
{
Gl.glBegin(Gl.GL_QUAD);
//stuff
Gl.glEnd();
}

I tried that, but all I get is an error saying:
"The name 'Gl' does not exist in the current context"

I already added two references to "Tao framework windows platform API key binding" and "Tao.OpenGL".
I also added "using Tao.OpenGl;" and "using Tao.Platform.Windows;" to my code.
Is there anything else I have to do??
Did you also add the Tao.OpenGl dll to your project as a reference?
As I said: "I already added two references to "Tao framework windows platform API key binding" and "Tao.OpenGL"."

Is that what you meant?
Quote:Original post by VanKurt
As I said: "I already added two references to "Tao framework windows platform API key binding" and "Tao.OpenGL"."

Is that what you meant?


Have you added a reference to the actual dlls rather then just telling it to attempt to import functions from those namespaces?
Anything posted is personal opinion which does not in anyway reflect or represent my employer. Any code and opinion is expressed “as is” and used at your own risk – it does not constitute a legal relationship of any kind.
I'm not quite sure ;-)

What I did was click on "Project-> Add reference" (in VisualStudio2005).
There I selected items called "Tao framework windows platform API key binding" and "Tao.OpenGL".
These had path properties like "C:\Tao\bin\Tao.platform.windows.dll".

Was that right? What else can I do?
That sounds about right. Open up the dlls in the object browser and see if you figure out what you are supposed to be including.

I was going to be looking at the Tao stuff in a few weeks time myself - don't have time right now.

At least one of the Tao team is a regular - Rob Loach.
Anything posted is personal opinion which does not in anyway reflect or represent my employer. Any code and opinion is expressed “as is” and used at your own risk – it does not constitute a legal relationship of any kind.
the only problem with tao is that it doesn't support GLSL. I posted several times on their mailing list about this but no one could give me any real help. I'd love to use it too but the guys working on it are busy with real world stuff so they haven't been able to fix it. maybe the 1.3 release fixes this... I'm not sure, the mailing list seems dead

This topic is closed to new replies.

Advertisement