mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 07:10:05 +00:00 
			
		
		
		
	Generate multiple texture atlases when first atlas is full
This commit is contained in:
		
							parent
							
								
									7198d1c7af
								
							
						
					
					
						commit
						9766e02f32
					
				
					 10 changed files with 205 additions and 141 deletions
				
			
		|  | @ -18,6 +18,7 @@ struct TextureAttributes | |||
| { | ||||
|    TextureAttributes() : | ||||
|        valid_ {false}, | ||||
|        layerId_ {}, | ||||
|        position_ {}, | ||||
|        size_ {}, | ||||
|        sLeft_ {}, | ||||
|  | @ -27,13 +28,15 @@ struct TextureAttributes | |||
|    { | ||||
|    } | ||||
| 
 | ||||
|    TextureAttributes(boost::gil::point_t position, | ||||
|    TextureAttributes(std::size_t         layerId, | ||||
|                      boost::gil::point_t position, | ||||
|                      boost::gil::point_t size, | ||||
|                      float               sLeft, | ||||
|                      float               sRight, | ||||
|                      float               tTop, | ||||
|                      float               tBottom) : | ||||
|        valid_ {true}, | ||||
|        layerId_ {layerId}, | ||||
|        position_ {position}, | ||||
|        size_ {size}, | ||||
|        sLeft_ {sLeft}, | ||||
|  | @ -44,6 +47,7 @@ struct TextureAttributes | |||
|    } | ||||
| 
 | ||||
|    bool                valid_; | ||||
|    std::size_t         layerId_; | ||||
|    boost::gil::point_t position_; | ||||
|    boost::gil::point_t size_; | ||||
|    float               sLeft_; | ||||
|  | @ -70,7 +74,7 @@ public: | |||
| 
 | ||||
|    void   RegisterTexture(const std::string& name, const std::string& path); | ||||
|    bool   CacheTexture(const std::string& name, const std::string& path); | ||||
|    void   BuildAtlas(size_t width, size_t height); | ||||
|    void   BuildAtlas(std::size_t width, std::size_t height); | ||||
|    GLuint BufferAtlas(gl::OpenGLFunctions& gl); | ||||
| 
 | ||||
|    TextureAttributes GetTextureAttributes(const std::string& name); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat