This project is read-only.

Recommendation for newbies

Feb 15, 2013 at 9:29 PM
I have written a lot of C# code but I am totally new to OpenGL.

I am wondering if anyone can recommend an introductory book for a total OpenGL novice., preferably one oriented at least toward Windows, if not C#.

Much of the documentation here appears to assume that the reader is well acquainted with OpenGL.

I'd like something a bit more elementary than the red book, which assumes that the user is familiar with basic graphics concepts.

Thanks in advance,
Michael Bate
Feb 16, 2013 at 1:11 PM
Hi Michael,

Personally, I went through the red book to learn, so am not sure what is a good book to recommend, BUT I can recommend this site:

http://nehe.gamedev.net/

There is lots of good information in the 'Legacy Tutorials' section.
Feb 16, 2013 at 4:58 PM
Thank you!

I am starting to go through the Legacy Tutorials that you recommended. I hope they are not too aimed at game developers. I am not a game developer and do not play computer games.

I have looked at the red book. But when I take your FormSimpleDrawing example and replace your drawing code with the very first example in the red book, nothing happens. Here is what I replace it with:
             gl.ClearColor (0.0f, 0.0f, 0.0f, 0.0f);
             gl.Color(1.0f, 1.0f, 1.0f);

            gl.Begin(OpenGL.GL_POLYGON);
                    gl.Vertex (0.25f, 0.25f, 0.0f);
                    gl.Vertex (0.75f, 0.25f, 0.0f);
                    gl.Vertex (0.75f, 0.75f, 0.0f);
                    gl.Vertex (0.25f, 0.75f, 0.0f);
            gl.End();
            gl.Flush();
Tweaking the X and Y values (and also the Z values) in the gl.Vertex calls has no effect. I leave your preceding code in place:
            OpenGL gl = this.openGLControl1.OpenGL;
            gl.Clear(OpenGL.GL_COLOR_BUFFER_BIT | OpenGL.GL_DEPTH_BUFFER_BIT);    // Clear The Screen And The Depth Buffer
            gl.LoadIdentity();                    // Reset The View
Inserting this line from the red book does not help:
gl.Ortho(0.0f, 1.0f, 0.0f, 1.0f, -1.0f, 1.0f);
I do not fully understand the environment that SharpGL sets up.

I am trying to do something very simple - display a bunch of line fragments (using gl.Begin(OpenGL.GL_LINE_STRIP);) and allow the user to view them from different angles.

Maybe I should start from a different example.

Thanks again,
Michael
Feb 23, 2013 at 5:04 PM
Hi,

I'd guess from this that the issue may be that you are either doing projection transformations in your main render loop, rather in the resize method, or that you are not doing projection transformations in the resize method and the geometry that you are drawing is simply not in the field of view of what you're seeing. I'd take a look at some of the simple SGL examples and see how you can put an axis and grid in your scene - it'll make it easier to determine where the viewpoint is :)


On 16 February 2013 17:58, MichaelBate <notifications@codeplex.com> wrote:

From: MichaelBate

Thank you!

I am starting to go through the Legacy Tutorials that you recommended. I hope they are not too aimed at game developers. I am not a game developer and do not play computer games.

I have looked at the red book. But when I take your FormSimpleDrawing example and replace your drawing code with the very first example in the red book, nothing happens. Here is what I replace it with:
             gl.ClearColor (0.0f, 0.0f, 0.0f, 0.0f);
             gl.Color(1.0f, 1.0f, 1.0f);

            gl.Begin(OpenGL.GL_POLYGON);
                    gl.Vertex (0.25f, 0.25f, 0.0f);
                    gl.Vertex (0.75f, 0.25f, 0.0f);
                    gl.Vertex (0.75f, 0.75f, 0.0f);
                    gl.Vertex (0.25f, 0.75f, 0.0f);
            gl.End();
            gl.Flush();
Tweaking the X and Y values (and also the Z values) in the gl.Vertex calls has no effect. I leave your preceding code in place:
            OpenGL gl = this.openGLControl1.OpenGL;
            gl.Clear(OpenGL.GL_COLOR_BUFFER_BIT | OpenGL.GL_DEPTH_BUFFER_BIT);    // Clear The Screen And The Depth Buffer
            gl.LoadIdentity();                    // Reset The View
Inserting this line from the red book does not help:
gl.Ortho(0.0f, 1.0f, 0.0f, 1.0f, -1.0f, 1.0f);
I do not fully understand the environment that SharpGL sets up.

I am trying to do something very simple - display a bunch of line fragments (using gl.Begin(OpenGL.GL_LINE_STRIP);) and allow the user to view them from different angles.

Maybe I should start from a different example.

Thanks again,
Michael

Read the full discussion online.

To add a post to this discussion, reply to this email (sharpgl@discussions.codeplex.com)

To start a new discussion for this project, email sharpgl@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com