mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-31 05:40:04 +00:00 
			
		
		
		
	Merge pull request #977 from yuriks/glenable-tex2d
GL Renderer: Remove erroneous glEnable(GL_TEXTURE_2D) calls
This commit is contained in:
		
						commit
						cea45af64d
					
				
					 1 changed files with 5 additions and 8 deletions
				
			
		|  | @ -147,20 +147,17 @@ void OpenGLState::Apply() { | ||||||
| 
 | 
 | ||||||
|     // Textures
 |     // Textures
 | ||||||
|     for (unsigned texture_index = 0; texture_index < ARRAY_SIZE(texture_units); ++texture_index) { |     for (unsigned texture_index = 0; texture_index < ARRAY_SIZE(texture_units); ++texture_index) { | ||||||
|         if (texture_units[texture_index].enabled_2d != cur_state.texture_units[texture_index].enabled_2d) { |         if (texture_units[texture_index].enabled_2d != cur_state.texture_units[texture_index].enabled_2d || | ||||||
|  |             texture_units[texture_index].texture_2d != cur_state.texture_units[texture_index].texture_2d) { | ||||||
|  | 
 | ||||||
|             glActiveTexture(GL_TEXTURE0 + texture_index); |             glActiveTexture(GL_TEXTURE0 + texture_index); | ||||||
| 
 | 
 | ||||||
|             if (texture_units[texture_index].enabled_2d) { |             if (texture_units[texture_index].enabled_2d) { | ||||||
|                 glEnable(GL_TEXTURE_2D); |                 glBindTexture(GL_TEXTURE_2D, texture_units[texture_index].texture_2d); | ||||||
|             } else { |             } else { | ||||||
|                 glDisable(GL_TEXTURE_2D); |                 glBindTexture(GL_TEXTURE_2D, 0); | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
| 
 |  | ||||||
|         if (texture_units[texture_index].texture_2d != cur_state.texture_units[texture_index].texture_2d) { |  | ||||||
|             glActiveTexture(GL_TEXTURE0 + texture_index); |  | ||||||
|             glBindTexture(GL_TEXTURE_2D, texture_units[texture_index].texture_2d); |  | ||||||
|         } |  | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     // Framebuffer
 |     // Framebuffer
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue