the world of texturing.. how to handle them?

Started by
-1 comments, last by McZ 19 years, 4 months ago
well.. I have come to the stage where I want to re-write my engine once again.. anyway, I would like to know some different aproaches to handle textures, loading etc. when using both D3D and OpenGL rendersystems (well not at the same time though but as loadable plugins) I have seen that some people use a API specefic texture class derived from a simple class what is the benefit from that? can I do without it? e.g. class CTexture { ... }; class CTextureGL { ... }; class CTextureD3D { ... }; if I have the above then the API interface should manage the texture some way like this maybe CTexture *tex = RenderAPI->CreateTexture(width,heigh,data); which would return the derived class for use later.. or I could have just one class CTextureHandle { uint id; ... }; and then create the texture like above but with the difference that the RenderAPI will only return the internal ID for the texture it has set up could be the OpenGL Texture ID or an id into a list of RenderAPI specefic CTextureData classes that has the info on the current texture to use.. altough I guess this would narrow down the access to manipulate the textures in code.

This topic is closed to new replies.

Advertisement