From: Sylvain <be...@be...> - 2012-06-09 07:49:07
|
Btw we're going off-topic. The question at hand is about demos bargains : - Real-world/reusable samples vs. FreeGLUT "test cases": externals dependencies (libs, C++...) vs. standalone code - Portable demos that run anywhere vs. Android-specific demo: GLES2 (more strict) vs. GL2 code John T.: don't let your hatred against trimmed-down GL3 and GLES2 affect your arguments ;) Cheers! - Sylvain On Sat, Jun 09, 2012 at 09:34:18AM +0200, Sylvain wrote: > Hi, > > On Sat, Jun 09, 2012 at 08:40:30AM +0300, John Tsiombikas wrote: > > On Fri, Jun 08, 2012 at 07:23:19PM +0200, Sylvain wrote: > > > Hi John, > > > > > > On Fri, Jun 08, 2012 at 04:52:05PM +0300, John Tsiombikas wrote: > > > > On Fri, Jun 08, 2012 at 08:35:22PM +0800, Diederick C. Niehorster wrote: > > > > > - con: shading calculations are done in view space, which is > > > > > (apparently) not current practice. > > > > > ... > > > > > - pro: shading calculations done in object space, and shaders > > > > > otherwise demonstrate best practices. > > > > > > > > "current practice" ? Shading calculations are much simpler in view > > > > space, what's the argument for doing them in object space? > > > > > > World space, not object space. > > > > Ok world space, go on... are you going to present the benefit of doing > > lighting in world space then, instead of view space where it's much > > simpler and efficient? > > I don't know, when I discussed best practices off-line with Diederick, > it was about GPU-side vs. CPU-side matrix computations. > > I personnaly prefer world space because I find it easier to understand > and debug, when everything is done in a reference space that doesn't > move. AFAIK the Unity 3D framework does that. I would be interested > in knowing why it is more efficient to compute in view space. > > I don't have a strong opinion about this. > > > > > > Anyone doing serious work will use one matrix API or another, and glm > > > > > is a common and simple one. > > > > > > > > Everyone I know has his own vector/matrix code lying around and being > > > > reused for ever. Glm, I never even heard about. > > > > > > It brings the GLSL matrix syntax to C++. I suggest you have a look :) > > > > I have my own, thanks :) > > Been using it for about a decade now, and it has both a C++ and a plain > > C interface, so I can use it in all of my projects (most of them are C): > > http://gfxtools.svn.sourceforge.net/viewvc/gfxtools/libvmath/ > > In my tutorials I chose GLM because this brought a unified matrix > syntax, easier to understand and use. It also has decent > documentation, support for Android, and a number of extensions > (transformations, perlin noise...), which I also needed in the > tutorial series. There are a number of other matrix libs out there, > and I can imagine everybody has its preference, though it makes sense > to me to check the alternatives from time to time. > > -- > Sylvain |