Simple renderer in .net with SharpGL (openGL)

Re: Simple renderer in .net with SharpGL (openGL)
I have now the colors ready, but I am in trouble with the global behaviour of the openGL understanding.
As far as I have understand the whole thing, I have three different matrices:
Textures (not yet used)

At first I set the projection matrix to the values I need.
At second step I set the modelview matrix.
Now I put the model into the modelview.

The following code currently gives blank window:
gl = Me.OpenGLControl2.OpenGL

        gl.Viewport(0, 0, OpenGLControl2.Width, OpenGLControl2.Height)

        gl.LookAt(CDbl(gradiusOfBoundingbox / Math.Sin(fov / 2)), CDbl(gradiusOfBoundingbox / Math.Sin(5 / 2)), CDbl(gradiusOfBoundingbox / Math.Sin(5 / 2)), CDbl(0), CDbl(0), CDbl(0), CDbl(0), CDbl(-1), CDbl(0))
        gl.Perspective(CDbl(fov), CDbl(OpenGLControl2.Width / OpenGLControl2.Height), CDbl(2), CDbl(2 * gradiusOfBoundingbox + 2))

        gl.Rotate(45.0F, 0.0F, 1.0F, 0.0F) 'Rotation for LDView like viewing angle
        gl.Rotate(22.5, 1, 0, 1)                'Rotation for LDView like viewing angle
        gl.Translate(gradiusOfBoundingbox, 0, gradiusOfBoundingbox)

I am right with my thoughts how this should work and I have only a stupid thinking error, or is the behaviour different than I wrote above??

Any help is very welcome.
« Next Oldest | Next Newest »

Messages In This Thread
Re: Simple renderer in .net with SharpGL (openGL) - by Michael Heidemann - 2013-12-06, 17:30

Forum Jump:

Users browsing this thread: 1 Guest(s)