mirror of
				https://github.com/RetroDECK/ES-DE.git
				synced 2025-04-10 19:15:13 +00:00 
			
		
		
		
	Enabled linear interpolation support for ImageComponent::setRawImage()
This commit is contained in:
		
							parent
							
								
									66bd934a61
								
							
						
					
					
						commit
						47c321e434
					
				|  | @ -131,7 +131,7 @@ void ImageComponent::setImage(const std::shared_ptr<TextureResource>& texture, b | |||
| void ImageComponent::setRawImage(const unsigned char* data, size_t width, size_t height) | ||||
| { | ||||
|     mTexture.reset(); | ||||
|     mTexture = TextureResource::get(""); | ||||
|     mTexture = TextureResource::get("", false, false, true, mLinearInterpolation); | ||||
|     mTexture->initFromPixels(data, width, height); | ||||
| 
 | ||||
|     resize(); | ||||
|  |  | |||
|  | @ -63,6 +63,7 @@ TextureResource::TextureResource(const std::string& path, | |||
|         // loaded and unloaded. This would normally be a video texture, where the player
 | ||||
|         // reserves a texture to later be used for the video rendering.
 | ||||
|         mTextureData = std::shared_ptr<TextureData>(new TextureData(tile)); | ||||
|         mTextureData->setLinearMagnify(linearMagnify); | ||||
|         mSize = glm::ivec2 {0.0f, 0.0f}; | ||||
|     } | ||||
|     sAllTextures.insert(this); | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue
	
	 Leon Styhre
						Leon Styhre