Jump to content
  • Advertisement
Sign in to follow this  
McZ

OpenGL the world of texturing.. how to handle them?

This topic is 4979 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

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.

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!