Archived

This topic is now archived and is closed to further replies.

RCV

Graphics API 'style' Question

Recommended Posts

If you had the choice would you prefer a directX.drawPrimitive or a drawPoints() drawLineStrip() drawTriangleStrip() etc.. style API.. Im very intersted in hearing your oppinion.

Share this post


Link to post
Share on other sites
Neither.
I prefer to do my rendering through a camera object.

Something like:

  
void Mesh::render(Camera *camera){
camera->setTexture(texture);
camera->render(vertexBuffer);
}





Some people say: ''Life sucks, then you die''.
I disagree.
I say: ''Life sucks, then you get cancer, go into chemotherapy, you lose all your hair and you feel bad about yourself, then the cancer goes into remission but you get a stroke and you can''t move your right side anymore, you get hit by a truck and then MAYBE you die.
Dennis Leary - Comedy Routine.

Share this post


Link to post
Share on other sites
I prefer the "drawPoints(), drawLineStrip(), drawTriangleStrip(), etc.." method because it gives me the freedom to decide how I want to structure things--I can give it a "directX.drawPrimitive" wrapper myself but have it work like I want rather than be forced to conform to the APIs structuring.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Im not exactly sure what you mean by ''because it gives me the freedom to decide how I want to structure things''.

Are we talking about the vertex data-structures or??
if we are I cant really see why one should be better than the other (both can support flexible vertex formats).

Because to me it looks like the prefered DirectX (OpenGL) method of ''drawPrimitive'' provides more flexibilty -> its easy to change the type of render output without changing the code.

Im very interested to hear some pro/cons for each method of doing it.

Share this post


Link to post
Share on other sites