diff --git a/libraries/model-networking/src/model-networking/ModelCache.cpp b/libraries/model-networking/src/model-networking/ModelCache.cpp index 09a2377759..780cf83649 100644 --- a/libraries/model-networking/src/model-networking/ModelCache.cpp +++ b/libraries/model-networking/src/model-networking/ModelCache.cpp @@ -270,7 +270,7 @@ static NetworkMesh* buildNetworkMesh(const FBXMesh& mesh, const QUrl& textureBas NetworkMesh* networkMesh = new NetworkMesh(); int totalIndices = 0; - bool checkForTexcoordLightmap = false; + //bool checkForTexcoordLightmap = false; @@ -393,8 +393,7 @@ static NetworkMaterial* buildNetworkMaterial(const FBXMaterial& material, const auto textureCache = DependencyManager::get(); NetworkMaterial* networkMaterial = new NetworkMaterial(); - int totalIndices = 0; - bool checkForTexcoordLightmap = false; + //bool checkForTexcoordLightmap = false; networkMaterial->_material = material._material; @@ -430,7 +429,7 @@ static NetworkMaterial* buildNetworkMaterial(const FBXMaterial& material, const networkMaterial->emissiveTexture = textureCache->getTexture(textureBaseUrl.resolved(QUrl(material.emissiveTexture.filename)), EMISSIVE_TEXTURE, material.emissiveTexture.content); networkMaterial->emissiveTextureName = material.emissiveTexture.name; - checkForTexcoordLightmap = true; + //checkForTexcoordLightmap = true; auto lightmapMap = model::TextureMapPointer(new model::TextureMap()); lightmapMap->setTextureSource(networkMaterial->emissiveTexture->_textureSource); @@ -491,8 +490,8 @@ void NetworkGeometry::modelParseError(int error, QString str) { } -const NetworkMaterial* NetworkGeometry::getShapeMaterial(unsigned int shapeID) { - if ((shapeID >= 0) && (shapeID < _shapes.size())) { +const NetworkMaterial* NetworkGeometry::getShapeMaterial(int shapeID) { + if ((shapeID >= 0) && (shapeID < (int)_shapes.size())) { int materialID = _shapes[shapeID]->_materialID; if ((materialID >= 0) && ((unsigned int)materialID < _materials.size())) { return _materials[materialID].get(); diff --git a/libraries/model-networking/src/model-networking/ModelCache.h b/libraries/model-networking/src/model-networking/ModelCache.h index 3713adc9b0..1110d36e3e 100644 --- a/libraries/model-networking/src/model-networking/ModelCache.h +++ b/libraries/model-networking/src/model-networking/ModelCache.h @@ -88,7 +88,7 @@ public: // This would be the final verison // model::MaterialPointer getShapeMaterial(int shapeID); - const NetworkMaterial* getShapeMaterial(unsigned int shapeID); + const NetworkMaterial* getShapeMaterial(int shapeID); void setTextureWithNameToURL(const QString& name, const QUrl& url); diff --git a/libraries/model/src/model/TextureMap.cpp b/libraries/model/src/model/TextureMap.cpp index c2551d276d..e3031e2b4d 100755 --- a/libraries/model/src/model/TextureMap.cpp +++ b/libraries/model/src/model/TextureMap.cpp @@ -59,7 +59,7 @@ gpu::Texture* TextureUsage::create2DTextureFromImage(const QImage& srcImage, con int opaquePixels = 0; int translucentPixels = 0; - bool isTransparent = false; + //bool isTransparent = false; int redTotal = 0, greenTotal = 0, blueTotal = 0, alphaTotal = 0; const int EIGHT_BIT_MAXIMUM = 255; QColor averageColor(EIGHT_BIT_MAXIMUM, EIGHT_BIT_MAXIMUM, EIGHT_BIT_MAXIMUM); @@ -112,7 +112,7 @@ gpu::Texture* TextureUsage::create2DTextureFromImage(const QImage& srcImage, con averageColor = QColor(redTotal / imageArea, greenTotal / imageArea, blueTotal / imageArea, alphaTotal / imageArea); - isTransparent = (translucentPixels >= imageArea / 2); + //isTransparent = (translucentPixels >= imageArea / 2); } gpu::Texture* theTexture = nullptr; @@ -269,7 +269,7 @@ gpu::Texture* TextureUsage::createCubeTextureFromImage(const QImage& srcImage, c int opaquePixels = 0; int translucentPixels = 0; - bool isTransparent = false; + //bool isTransparent = false; int redTotal = 0, greenTotal = 0, blueTotal = 0, alphaTotal = 0; const int EIGHT_BIT_MAXIMUM = 255; QColor averageColor(EIGHT_BIT_MAXIMUM, EIGHT_BIT_MAXIMUM, EIGHT_BIT_MAXIMUM); @@ -322,7 +322,7 @@ gpu::Texture* TextureUsage::createCubeTextureFromImage(const QImage& srcImage, c averageColor = QColor(redTotal / imageArea, greenTotal / imageArea, blueTotal / imageArea, alphaTotal / imageArea); - isTransparent = (translucentPixels >= imageArea / 2); + //isTransparent = (translucentPixels >= imageArea / 2); } gpu::Texture* theTexture = nullptr; diff --git a/libraries/render-utils/src/Model.cpp b/libraries/render-utils/src/Model.cpp index 7cf965951b..93ec7c96dd 100644 --- a/libraries/render-utils/src/Model.cpp +++ b/libraries/render-utils/src/Model.cpp @@ -1727,9 +1727,9 @@ void Model::segregateMeshGroups() { // Run through all of the meshes, and place them into their segregated, but unsorted buckets int shapeID = 0; for (int i = 0; i < (int)networkMeshes.size(); i++) { - const NetworkMesh& networkMesh = *(networkMeshes.at(i).get()); + //const NetworkMesh& networkMesh = *(networkMeshes.at(i).get()); const FBXMesh& mesh = geometry.meshes.at(i); - const MeshState& state = _meshStates.at(i); + //const MeshState& state = _meshStates.at(i); // Create the render payloads int totalParts = mesh.parts.size(); diff --git a/tests/gpu-test/src/main.cpp b/tests/gpu-test/src/main.cpp index 9b0856c832..f8eb361cb9 100644 --- a/tests/gpu-test/src/main.cpp +++ b/tests/gpu-test/src/main.cpp @@ -190,7 +190,7 @@ public: glm::vec3 unitscale { 1.0f }; glm::vec3 up { 0.0f, 1.0f, 0.0f }; - glm::vec3 camera_position { 1.5f * sinf(t), 0.0f, 1.5f * cos(t) }; + glm::vec3 camera_position { 1.5f * sinf(t), 0.0f, 1.5f * cosf(t) }; static const vec3 camera_focus(0); static const vec3 camera_up(0, 1, 0); @@ -249,9 +249,9 @@ public: static auto startUsecs = usecTimestampNow(); float seconds = getSeconds(startUsecs); - seconds /= 4.0; + seconds /= 4.0f; int shapeIndex = ((int)seconds) % 4; - bool wire = seconds - floor(seconds) > 0.5f; + bool wire = seconds - (float)floor(seconds) > 0.5f; batch.setModelTransform(Transform()); batch._glColor4f(0.8f, 0.25f, 0.25f, 1.0f);