No idea where this should go (Happy or angry).
I've decided to play around with the idea of doing some graphical game programming, and I've been looking at using C# with Tao SDL and OpenGL...
Well, things work (for the most part) but I'v had to do some really funky stuff. A lot of the code I'm using at the moment was lifted from a tutorial and slightly modified by me, and I'm now trying to figure out how to render text using SDL_TTF....
Here's a line that loads a font... I didn't even know about System.Runtime.InteropServices until this stuff... Thank god my intuition was right ant these lines match lines I found earlier in the tutorial, because there's no way on earth I'd have figured this out entirely on my own.
IntPtr fontptr = SdlTtf.TTF_OpenFont("c:\windows\fonts\calibri.ttf",12);
SdlTtf.TTF_Font font = (SdlTtf.TTF_Font)Marshal.PtrToStructure(fontptr,typeof(SdlTtf.TTF_Font));
I'd always wondered how you worked with pointers to structures and such in c#, since it has so many limitations on how pointers can be used, since they're not really supposed to be used unless absolutely needed.
It's too bad I can't use inline assembly instructions in C# though, my friends are using some inline assembly for using MMX instructions for some number crunching for OGL, since OGL's built in stuff seems to be slower (and those inline assembly segments are retardedly simple)
Hopefully I can get this SDL_TTF stuff working nicely with opengl in this thing, most of what I'm going on is either SDL_TTF without OGL in c# or SDL_TTF with OGL in C++, which is a bit different thanks to Tao.
EDIT: This shit is driving me mad, lol. It's so hard to figure out how to make this stuff work with no real OGL experience, since I've been basically translating and modifying a C++/CLI piece of code and trying to make it work with code from the original tutorial I started with. My brain hurts D: