mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 11:30:06 +00:00 
			
		
		
		
	Populate cached images into the texture atlas
This commit is contained in:
		
							parent
							
								
									0f9fbdbf63
								
							
						
					
					
						commit
						4c093d65f6
					
				
					 5 changed files with 104 additions and 18 deletions
				
			
		|  | @ -27,6 +27,8 @@ static constexpr size_t kPointsPerVertex      = 10; | |||
| static constexpr size_t kBufferLength = | ||||
|    kNumTriangles * kVerticesPerTriangle * kPointsPerVertex; | ||||
| 
 | ||||
| static const std::string kTextureName = "lines/default-1x7"; | ||||
| 
 | ||||
| class GeoLine::Impl | ||||
| { | ||||
| public: | ||||
|  | @ -115,7 +117,7 @@ void GeoLine::Initialize() | |||
|    } | ||||
| 
 | ||||
|    p->texture_ = | ||||
|       util::TextureAtlas::Instance().GetTextureAttributes("lines/default-1x7"); | ||||
|       util::TextureAtlas::Instance().GetTextureAttributes(kTextureName); | ||||
| 
 | ||||
|    gl.glGenVertexArrays(1, &p->vao_); | ||||
|    gl.glGenBuffers(1, &p->vbo_); | ||||
|  | @ -248,6 +250,9 @@ void GeoLine::Impl::Update() | |||
|    { | ||||
|       gl::OpenGLFunctions& gl = context_->gl(); | ||||
| 
 | ||||
|       texture_ = | ||||
|          util::TextureAtlas::Instance().GetTextureAttributes(kTextureName); | ||||
| 
 | ||||
|       // Latitude and longitude coordinates in degrees
 | ||||
|       const float lx = points_[0].latitude_; | ||||
|       const float rx = points_[1].latitude_; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat