refactoring resources/buffers/textures