[Plib-devel] Changing VTable triangles (+ blend and texture modes)
Brought to you by:
sjbaker
From: Sam S. <sa...@sp...> - 2000-08-06 16:42:56
|
Hi, I'm currently putting together an explosion class for an ssg example (sparks, smoke, debris that sort of thing). It seems quite an overhead to have this structure: explosion | +----- ssgTransform | | | +------- ssgVTable (spark) | +----- ssgTransform | | | +------- ssgVTable (spark) | +----- ssgTransform | | | +------- ssgVTable (spark) | etc. If there was a setVertex(int n, sgVec3) method in ssgVTable then I could get rid of all transforms and individual spark nodes and just have one ssgVTable that rendered the lot (and also one bounding sphere). ie: explosion | +----- ssgVTable (sparks) | +----- ssgVTable (smoke) | etc. Does it seem sensible to add this method (I'll try it when I have some working code and test the speed difference). The only oddity it would have is that you'd have to destroy and recreate the display list if it's been created (but then you shouldn't be calling setVertex on a diplay list node now should you :) ). Another question (should probably go to plib-users but I don't seem to get the subscribe confirmation messages back at the moment) - blend and texture modes. How are these set? There's the enable (GL_BLEND) in ssgSimpleState, but where do you set the blend mode parameters? Likewise for the texture environment modes. Do you use the pre and post draw callbacks? That seems a little bit ugly to me - am I missing something? Sam |