From: Stefanos A. <sta...@gm...> - 2008-08-24 14:34:21
|
> >>> While it's good to have functions that *generate* this data, is it really > >>> a good idea to hide the *drawing* part behind a glsDrawShape function? > >>> Maybe it would be better to simply return these four arrays and handle the > >>> drawing inside the tutorial? > >>> > >>> Just trying to understand the focus of the shape functions. What do you > >>> say? > >>> > >> Well, the problem with any form of generation of that type is this: > >> where are you going to put it? You can't put it into a user-supplied > >> buffer object because it might be too big (and having a query for the > >> size makes creating them very complex). And if you have it create the > >> buffer, how do you communicate the data format to the user? I see your point. At the correct point, we can crack open the shape functions and to show the user what's inside, but there's no need to bog down e.g. a lighting tutorial with vertex uploading. On the other hand, having a "standardized" format for communicating vertex attributes to the user could be useful. That way, a future model loader would be able to provide data in the same way as the shape functions do. But that's not really pertinent right now (just expressing an idea oft-discussed at the OpenTK forums). |