I don`t believe it`s not possible to change texture for the same object/ship You render the stored texture for given ship. Then you change that texture to another one and render that one.StuartMorgan wrote:What you are suggesting is wrong and is not how rendering works.Wrymn wrote:You load texture of ship with 100% hull. You draw the texture as normal. Then when hull gets bellow 60%, you destroy the texture for given ship and free it from memory. Then you allocate new texture to that spot. This texture will be texture with hull a bit damaged.
The same goes for other percentages. Don`t see why it would take GPU memory, you are still drawing one texture. Only this texture is in memory and this texture needs to be send to GPU. Only thing that would get bigger, is entire project or installation of final game since it needs more high quality textures or .pngs.
But ok you are the developer of Galaxial this is just an suggestion how it could be done with almost no performance decrease xD
Textures are loaded (uploaded to the GPU and sit in texture memory) when the game starts. If you want to render 100 identical ships, they all use the same texture.
Constantly allocating and freeing texture data for each ship would be extremely slow.
You store different textures in ram memory, then switch texture you want to draw. If this wouldn`t work, then I don`t know how was I doing it for past years