mosra / magnum

Lightweight and modular C++11 graphics middleware for games and data visualization
https://magnum.graphics/
Other
4.81k stars 440 forks source link

More examples #102

Open mosra opened 9 years ago

mosra commented 9 years ago

A running list of examples and various sources that could be fun to implement, fun to play with and attracting new users. Help welcome -- pick somethings that's not done yet, ask around and contribute. Ideal together with submitting a guest post about the example.

Porting cool things done with other libs

Mainly to show how the same thing can be done with less (or more?!) code, not with an intention to steal:

mosra commented 9 years ago

Object picking example is done in mosra/magnum-examples@f45a301d13b24e142ace964e587482ddabd361de. Not yet ported to ES3/WebGL, will do that later.

mosra commented 8 years ago

Added a possible ray-tracing example using compute shaders to the list (http://blog.lwjgl.org/ray-tracing-with-opengl-compute-shaders-part-i/)

mosra commented 7 years ago

Shadow mapping example added via mosra/magnum-examples#24.

williamjcm commented 6 years ago

Personally, I'd like to see more 2D-focused examples, as many of the current examples are 3D-focused.

Things like displaying a static 2D background, or using multiple images to create a single assembled sprite, would help me greatly for a project I'm working on.

mosra commented 6 years ago

@williamjcm Added to the list, thank you! I might have some people contributing with new example code in the near future, so maybe someone will pick this up before I get to it.

mosra commented 6 years ago

Extended the list with two easy example ideas -- floating point drift visualization and comparison of various interpolation methods. Ideally combining these with the new Animation framework.

brempusz commented 5 years ago

I would like to add something to the list (or extend "2D rendering" section): pong. There is a lot of advanced examples but I would like to see how to implement simple "game loop": load some textures (ball, paddle), handle input, calculate movement with frame time, draw everything on screen.

mosra commented 5 years ago

@brempusz Added to the list, thanks! :)

isc30 commented 5 years ago

+1 to the 2D resources

NSkelsey commented 5 years ago

After some discussion in the gitter channel related to the TextExample in 2D and some of my own struggles with graphics concepts it would be helpful to have a largish example with a 3D scene inside of which there are 3D objects, bill-boarded objects and labels. These "figures" should all be projected into screen space using a single camera to demonstrate various common projections that are performed in applications to implement them.

For starters, a simple 3D text example that could be expanded lives in my fork of this repo.

Edit -- maybe going further, having multiple cameras and the ability to switch between them would similarly demonstrate the extensibility of the Magnum.