Git Product home page Git Product logo

opengl4tutorials's Introduction

OpenGL 4 for C#/.NET Tutorials

I've begun creating tutorials based loosely on the NeHe tutorials, which were (and still are) quite popular for learning OpenGL. However, these tutorials use the more modern programmable pipeline, as well as the opengl4csharp library.

These tutorials have been built on Windows PCs, but should work with minimal modifications on Linux and Mac OS X.

Each tutorial has an accompanying video on my youtube account, where I create the tutorial source code from scratch.

License

Check the included LICENSE.md file for the license associated with this code.

Building each Project

Each tutorial includes a .sln and .csproj file which will create an OpenGL program. Both the .sln and .csproj are compatible with Visual Studio 2010 and later. All of the associated .dlls (such as Tao.FreeGlut and OpenGL) are included in the libs folder of each project. Currently some projects may contain references to textures that do not exist in the repository. I am working to secure open source content that I can freely distribute under the repository, and will update the projects when possible.

Tutorials

Tutorial 1: Opening an OpenGL window

Tutorial 1 on YouTube

Tutorial 1

Tutorial 2: Rendering 2D Shapes

Tutorial 2 on YouTube

Tutorial 2

Tutorial 3: Color and Linear Interpolation

Tutorial 3 on YouTube

Tutorial 3

Tutorial 4: Rotation via the Model Matrix

Tutorial 4 on YouTube

Tutorial 4

Tutorial 5: Rendering 3D Shapes

Tutorial 5 on YouTube

Tutorial 5

Tutorial 6: Texture Mapping

Tutorial 6 on YouTube

Tutorial 6

Tutorial 7: Lighting, Keyboard Control and Fullscreen

Tutorial 7 on YouTube

Tutorial 7

Tutorial 8: Alpha Blending

Tutorial 8 on YouTube

Tutorial 8

Tutorial 9: Billboards and Particles

Tutorial 9

Tutorial 10: Bitmap Font and Orthographic Projection

Tutorial 10

Tutorial 11: Waving Flag using Vertex Shader

Tutorial 11

Tutorial 12: Points, Particles and Antialiasing (Multisampling)

Tutorial 12

Tutorial 13: Simple Normal Mapping in Shader

Tutorial 13

Tutorial 14: Rotating Objects with the Mouse

Tutorial 14

Tutorial 15: Quaternion Based First Person Camera

Tutorial 15

opengl4tutorials's People

Contributors

giawa avatar mitkonikov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

opengl4tutorials's Issues

Not splitting correctly

In tutorial 16 > class ObjLoader > Line 307, 308, 309, I get weird splitting.
The string to split is 3/5/5 (for example) > After splitting is 3/5, and could not calculate int.Parse(indices[0]) - vertexOffset.
I was wondering, was that working for you? Because I exported an objs from 3ds max. There were some problems like additional spaces in the obj (where should not excisted), but this issue is in the code. And I was wondering is Tutorial 16 still in construction or is it complete? I am on vacation now, but when I get home, I will try the objs from the link you gave to the previous issue. Thanks.

Tutorial 5 border color

I'm trying to modify tutorial 5 so that the edges of the cube are always the same color, regardless of the color of each face of the cube. Something like this:

se1Yzm

How could I achieve this? I've been struggling for hours now

Tutorial 16 is missing the enterprise.obj

All tutorials run except #16 Could not find a part of the path '...\OpenGLTutorial16\OpenGLTutorial16\bin\Debug\enterprise\enterprise.obj'. The obj doesn't seem to exist in any directory.

bug with mouse rotation in OpenGLTutorial15

i couldn't detect the cause of the bug but bug is in your OnMove function x or y gets 1 above or below the value of downX/Y and it doesn't send mouse to the downX/Y cordinates so it increases yaw and pitch. i just modified the condition like this:
if((x == downX && y == downY) || Math.Pow((downX - x), 2) + Math.Pow((downY - y), 2) < 16) return;

and it works. i hope it helps

you can see problem here:
http://pastebin.com/9xRZHipQ

Set perspective for cube to take all available screen

I'm taking a look at tutorial 15. I'm wondering how I could set the default camera zoom (or perspective) for the cube to take all avaiable screen space (without overflow).

I'm aiming to achieve something like this:
image

In provided code, I would have to press "W" until the zoom makes the cube take all available screen height. Is it a way to set this default zoom dinamically taking into account the cube size so it always take all screen height or width without overflowing?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.