Code Monkey home page Code Monkey logo

opengl-series's Introduction

About

This is a repository of open-source code to accompany a series of OpenGL articles on http://tomdalling.com/

List of articles:

  1. Getting Started in Xcode, Visual C++, and Linux
  2. Textures
  3. Matrices, Depth Buffering, Animation
  4. Cameras, Vectors & Input
  5. Model Assets & Instances
  6. Diffuse Point Lighting
  7. More Lighting: Ambient, Specular, Attenuation, Gamma
  8. Even More Lighting: Directional Lights, Spotlights, & Multiple Lights

Ports & Related Resources

Credits

Thanks to Martin (SpartanJ) Golini for the Linux ports.

Thanks to Sidharth Juyal of Whacky Labs for the iOS ports.

Thanks to Vyacheslav (ZeronSix) Zeronov for the C# port.

License

Licensed under the Apache License, Version 2.0. See LICENSE.txt.

opengl-series's People

Contributors

mariuz avatar spartanj avatar tomdalling 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  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

opengl-series's Issues

ERROR LNK2001/2019 sln

When I built the sln, I got "glfw3.lib(context.c.obj) : error LNK2019: unresolved external symbol __imp__sscanf referenced in function _parseVersionString".

Then I found the solution in the stackoverflow: You can also add an additional library to your linker input i.e, legacy_stdio_definitions.lib

Go to Properties > Linker > Input.

glUseProgram for each render is not necessary

I'm currently only at article 3, but after glancing over the last article this practice seems to persist:
Using glUseProgram(shaderID) before rendering, and then using glUseProgram(0) afterwards, for each iteration. I thought this was weird and tried to refactor your code in article 3 so that gProgram->use() is called before the main loop, and gProgram->stopUsing() is called after.

This does not break the behaviour of the program so I then continued on to ##OpenGL on freenode IRC and asked what was considered good practice. A user named Bloodlust told me that "Langdal the preferred way is to never unbind", and that you should only call glUseProgram whenever you are setting or changing shader programs. Furthermore, installing and uninstalling (I'm not sure what the correct terminology is here) the shader program for each render operation introduces unnecessary overhead.

I just wanted to let you know in case you did not know this.

Porting to different languages

These articles are perfect. The bad thing is that source code is C++/Obj-C only. But C++ is not the only language that can be used with OpenGL. Personally i wrote a C# port which is located here. It would be nice to add a link to it to the README.md of this repo. If someone has a Java, Python, etc.. port, he should post a link here too.

'register' storage class specifier is deprecated

I'm getting this error when trying to build on OS X Mavericks 10.9.2 (Build 13C1021) in Xcode 5.1.1 (Build 5B1008):
osx/thirdparty/glm/glm/core/type_half.inl:138:3: 'register' storage class specifier is deprecated

I'd be happy to make changes given some direction. Would you prefer to:

  1. Add the "-Wdeprecated-register" flag at a project level
  2. Use #pragma to push/pop the flag where the offending code exists
  3. Update the code to remove register

or something else?

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.