mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 03:10:05 +00:00 
			
		
		
		
	Merge pull request #447 from dpaulat/hotfix/bad-radar-color-tables
Make sure shared uniforms are updated correctly per-map pane
This commit is contained in:
		
						commit
						38d36d37f6
					
				
					 1 changed files with 8 additions and 2 deletions
				
			
		|  | @ -58,6 +58,9 @@ public: | ||||||
| 
 | 
 | ||||||
|    bool cfpEnabled_ {false}; |    bool cfpEnabled_ {false}; | ||||||
| 
 | 
 | ||||||
|  |    std::uint16_t rangeMin_ {0}; | ||||||
|  |    float         scale_ {1.0f}; | ||||||
|  | 
 | ||||||
|    bool colorTableNeedsUpdate_ {false}; |    bool colorTableNeedsUpdate_ {false}; | ||||||
|    bool sweepNeedsUpdate_ {false}; |    bool sweepNeedsUpdate_ {false}; | ||||||
| }; | }; | ||||||
|  | @ -298,6 +301,9 @@ void RadarProductLayer::Render( | ||||||
| 
 | 
 | ||||||
|    gl.glUniform1i(p->uCFPEnabledLocation_, p->cfpEnabled_ ? 1 : 0); |    gl.glUniform1i(p->uCFPEnabledLocation_, p->cfpEnabled_ ? 1 : 0); | ||||||
| 
 | 
 | ||||||
|  |    gl.glUniform1ui(p->uDataMomentOffsetLocation_, p->rangeMin_); | ||||||
|  |    gl.glUniform1f(p->uDataMomentScaleLocation_, p->scale_); | ||||||
|  | 
 | ||||||
|    gl.glActiveTexture(GL_TEXTURE0); |    gl.glActiveTexture(GL_TEXTURE0); | ||||||
|    gl.glBindTexture(GL_TEXTURE_1D, p->texture_); |    gl.glBindTexture(GL_TEXTURE_1D, p->texture_); | ||||||
|    gl.glBindVertexArray(p->vao_); |    gl.glBindVertexArray(p->vao_); | ||||||
|  | @ -553,8 +559,8 @@ void RadarProductLayer::UpdateColorTable( | ||||||
|                    colorTable.data()); |                    colorTable.data()); | ||||||
|    gl.glGenerateMipmap(GL_TEXTURE_1D); |    gl.glGenerateMipmap(GL_TEXTURE_1D); | ||||||
| 
 | 
 | ||||||
|    gl.glUniform1ui(p->uDataMomentOffsetLocation_, rangeMin); |    p->rangeMin_ = rangeMin; | ||||||
|    gl.glUniform1f(p->uDataMomentScaleLocation_, scale); |    p->scale_    = scale; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| } // namespace scwx::qt::map
 | } // namespace scwx::qt::map
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat