Oop & Vertex Buffers

In my previous post, I listed unopen to tyke issues I had alongside the majority Beginning Direct3D Game Programming, 2d Edition. And I accept unopen to other one: the majority does non learn proficient class-based design. Admittedly it's difficult to blame the writer though -- he has a lot of cloth to encompass in addition to is trying to illustrate kernel concepts without bogging us downward inwards extraneous code.

However, realizing that my uncomplicated flying simulator needed a CShip class, I dutifully created 1 to encapsulate the required functions (InitDeviceObjects, RestoreDeviceObjects, InvalidateDeviceObjects, etc.) of the Common Files Framework. I idea it pretty slick that I could exactly telephone call upwards m_MyShip->Render() within my application class' Render method, in addition to I didn't accept a work alongside my custom ship cast having it's ain vertex buffer until I read Bubba's shipping (#9) on this forum. Although I for sure am leery close taking coding advice from a guy named "Bubba", I'm curious close his comment that "The renderer should trace all objects from 1 vertex buffer."

Understandably, if I accept multiple ships alongside the same geometry it is somewhat wasteful to exercise multiple vertex buffers (one inwards each ship instance, used past times its Render method). So which means is best?

It may live on fourth dimension for me to invest inwards a "best practices of game development" book.

Subscribe to receive free email updates:

0 Response to "Oop & Vertex Buffers"

Post a Comment