• Advertisement
Sign in to follow this  

Naming structures

This topic is 2774 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

An image is uploaded to a texture.
An index array is uploaded to an index buffer.
A vertex array is uploaded to a vertex buffer.

shared_ptr<Texture> addTexture( shared_ptr<Image> image, ClampMode clampMode, Filtering filtering, float anisotropy );

shared_ptr<Indexbuffer> addIndexbuffer( const IndexArray &indices );

shared_ptr<Vertexbuffer> addVertexbuffer( const VertexArray &vertices, PrimitiveTopology topology );


A structure which contains a vertex array, an optional index array and an array of images is called a Mesh. When this mesh's arrays have been uploaded to the GPU, what could i call the structure containing the returned buffers? I'd like to stick to my naming convention of simple, established expressions, so I don't like UploadedMesh, MeshProxy etc. too much.. Any ideas?

Share this post


Link to post
Share on other sites
Advertisement
What makes this any less a "Mesh" than your other "Mesh"? It sounds like they're both "Meshes", just with different internal representations (which, of course, cries out for them to implement a common interface). How 'bout LocalMesh and GPUMesh?

Share this post


Link to post
Share on other sites
Quote:
Original post by Sneftel
What makes this any less a "Mesh" than your other "Mesh"?


One structure contains actual data (vertices, indices, pixels) while the other merely contains references to buffers in graphics card memory. So while the first structure can be loaded and saved from disk, the other has to be created a runtime from the first.

Share this post


Link to post
Share on other sites
How about Mesh for the resource (where just verts, tris stored) and MeshInstance/MeshEntity for the instance?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement