Example for C# + Tao OpenGL ?

This topic is 4370 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

Are there any examples for tao opengl in c#??? the moss basic things, like loading texture, blending or so. have found a few on the net, but are very bad documented. or are there any books on this topic? thanx

Share on other sites
Like in MickDuprez's post, take a look at the Tao Framework's Spinning Triangle on the Wiki. Aside from that, have a look at the examples that are provided when you download the framework.

The good thing about the Tao Framework is that it follows the underlaying libraries almost directly. This means that you can follow a C++ tutorial and just copy and paste the code, putting a "Gl." or a "Glu." before any OpenGL calls.

Share on other sites
thanx, i tried the triangle example:
and copied the following lines into my little
program:

Il.ilInit();
Ilut.ilutInit();

but just did not work. i am confused the
spinning triangle does not use opengl
commands like:
glBindTexture(GL_TEXTURE_2D, texture);

but those 3 lines seems to be all is needed

any idea what could be wrong?

thanx.

P.S. ever used c++ before, thats why have all
the problems. :(

Share on other sites
You're right, glBindTexture isn't called. I think it still works because DevIL might call it for you..... You could try something like this:

int tex;void Init(){    Il.ilInit();    Ilu.iluInit();    Ilut.ilutInit();}void LoadTexture(){    tex = Ilut.ilutGLLoadImage("test.jpg");    Gl.glBindTexture(Gl.GL_TEXTURE_2D, tex);}

Call Init, followed by LoadTexture. Be sure you're drawing code is correct...

Share on other sites
works now, thanx Rob Loach !

Share on other sites
btw
returns a boolen value, not int

Share on other sites
Quote:
 Original post by sitwindbtwIlut.ilutGLLoadImage("test.jpg");returns a boolen value, not int
I think that was a typo in the latest release of Tao.DevIL. The fix is in the SVN and will be out in the next release. You could easily just checkout the repository and then build Tao.DevIL with the fix. It has also been updated to the latest version of DevIL since then.

1. 1
2. 2
Rutin
22
3. 3
4. 4
frob
17
5. 5

• 33
• 13
• 12
• 10
• 12
• Forum Statistics

• Total Topics
632573
• Total Posts
3007138

×