mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-30 06:50:06 +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}; | ||||
| 
 | ||||
|    std::uint16_t rangeMin_ {0}; | ||||
|    float         scale_ {1.0f}; | ||||
| 
 | ||||
|    bool colorTableNeedsUpdate_ {false}; | ||||
|    bool sweepNeedsUpdate_ {false}; | ||||
| }; | ||||
|  | @ -298,6 +301,9 @@ void RadarProductLayer::Render( | |||
| 
 | ||||
|    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.glBindTexture(GL_TEXTURE_1D, p->texture_); | ||||
|    gl.glBindVertexArray(p->vao_); | ||||
|  | @ -553,8 +559,8 @@ void RadarProductLayer::UpdateColorTable( | |||
|                    colorTable.data()); | ||||
|    gl.glGenerateMipmap(GL_TEXTURE_1D); | ||||
| 
 | ||||
|    gl.glUniform1ui(p->uDataMomentOffsetLocation_, rangeMin); | ||||
|    gl.glUniform1f(p->uDataMomentScaleLocation_, scale); | ||||
|    p->rangeMin_ = rangeMin; | ||||
|    p->scale_    = scale; | ||||
| } | ||||
| 
 | ||||
| } // namespace scwx::qt::map
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat