mirror of
https://github.com/godotengine/FBX2glTF.git
synced 2026-01-06 02:09:48 +03:00
This all needs rewriting, but at least let's make it not crash on Windows.
This commit is contained in:
@@ -89,11 +89,10 @@ std::shared_ptr<TextureData> TextureBuilder::combine(
|
||||
int channels = includeAlphaChannel ? 4 : 3;
|
||||
|
||||
std::vector<uint8_t> mergedPixels(static_cast<size_t>(channels * width * height));
|
||||
std::vector<pixel> pixels(texes.size());
|
||||
std::vector<const pixel*> pixelPointers(texes.size());
|
||||
for (int xx = 0; xx < width; xx++) {
|
||||
for (int yy = 0; yy < height; yy++) {
|
||||
pixels.clear();
|
||||
std::vector<pixel> pixels(texes.size());
|
||||
std::vector<const pixel*> pixelPointers(texes.size(), nullptr);
|
||||
for (int jj = 0; jj < texes.size(); jj++) {
|
||||
const TexInfo& tex = texes[jj];
|
||||
// each texture's structure will depend on its channel count
|
||||
@@ -216,4 +215,4 @@ std::shared_ptr<TextureData> TextureBuilder::simple(int rawTexIndex, const std::
|
||||
new TextureData(textureName, *gltf.defaultSampler, *gltf.images.hold(image)));
|
||||
textureByIndicesKey.insert(std::make_pair(key, texDat));
|
||||
return texDat;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user