Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 13 Jul 2012
Offline Last Active Sep 27 2016 01:04 PM

Posts I've Made

In Topic: NeHe iOS Lesson 01 Q&A

13 July 2012 - 03:39 PM


One month ago I started programming in OpenGL environnement. First in VBA, I made a little Glut based Application to see .obj model. It was my first dive and after some results, I decided to move forward to a full language (VB.net)
The approach was different. So I took the CSGL library to give it a try in Visual Studio Express.
Then I made some search on internet to see how people were calling the CSGL library in VB.net.
I saw a lot of sample. Most of them were not for the latest version of VB.net so I had to drop them.
Then I came to C++ sample and tried to parse them in VB.net.
On this site I found a very good tutorial explaining the first thing to achief in order to get a working OpenGL environnement. I found some other samples at Chintaka Rukshan's website and some other at O'Reily's website.
And then I tried to get a good OpenGL environnement.

I first translated the sample of Chintaka (from c) then O'Reily (from old VB.net (no Marshalling))
Then I tried the VB.net sample zip given on the NeHe Tutorial Website.

None of them are good.
Sure you can draw some OpenGL stuff with these sample but when you begin to get information about your rendering context or if you try to swap buffers or if you want some other special opengl features, then you're just going nowhere.

Then I started from scratch. I took some info at Msdn's website and saw that the tutorial of Nehe was almost the same as explained by Microsoft. Thus why the VB.net sample compiled by X is not following these rules. ???
Sure it was hard to get it with the new Marshalling system. The imports in VB.net are not like just adding the .h header file. We have to tell VB.net how to manage these libraries.
Now I've finally My hWnd, My hDC and my hRC. WndProc is receiving the message. My code is the correct mirror of the C++ lesson.
Next Week I'll try to make my sample available so that VB.net developers can start with the same context as the one explained in NeHe tutorial.