mirror of
				https://github.com/Drezil/imgui.git
				synced 2025-11-03 22:51:06 +01:00 
			
		
		
		
	Added comments
This commit is contained in:
		@@ -89,8 +89,8 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        // Load texture
 | 
					        // Load texture
 | 
				
			||||||
        unsigned char* pixels;
 | 
					        unsigned char* pixels;
 | 
				
			||||||
        int width, height;
 | 
					        int width, height, bytes_per_pixels;
 | 
				
			||||||
        io.Fonts->GetTexDataAsRGBA32(pixels, &width, &height);
 | 
					        io.Fonts->GetTexDataAsRGBA32(pixels, &width, &height, &bytes_per_pixels);
 | 
				
			||||||
        // TODO: copy texture to graphics memory. 
 | 
					        // TODO: copy texture to graphics memory. 
 | 
				
			||||||
        // TODO: store your texture pointer/identifier in 'io.Fonts->TexID'
 | 
					        // TODO: store your texture pointer/identifier in 'io.Fonts->TexID'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										1
									
								
								imgui.h
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								imgui.h
									
									
									
									
									
								
							@@ -773,6 +773,7 @@ struct ImFontAtlas
 | 
				
			|||||||
    // User is in charge of copying the pixels into graphics memory, then call SetTextureUserID()
 | 
					    // User is in charge of copying the pixels into graphics memory, then call SetTextureUserID()
 | 
				
			||||||
    // After loading the texture into your graphic system, store your texture handle in 'TexID' (ignore if you aren't using multiple fonts nor images)
 | 
					    // After loading the texture into your graphic system, store your texture handle in 'TexID' (ignore if you aren't using multiple fonts nor images)
 | 
				
			||||||
    // RGBA32 format is provided for convenience and high compatibility, but note that all RGB pixels are white, so 75% of the memory is wasted.
 | 
					    // RGBA32 format is provided for convenience and high compatibility, but note that all RGB pixels are white, so 75% of the memory is wasted.
 | 
				
			||||||
 | 
					    // Pitch = Width * BytesPerPixels
 | 
				
			||||||
    IMGUI_API void              GetTexDataAsAlpha8(unsigned char** out_pixels, int* out_width, int* out_height, int* out_bytes_per_pixel = NULL);  // 1 byte per-pixel
 | 
					    IMGUI_API void              GetTexDataAsAlpha8(unsigned char** out_pixels, int* out_width, int* out_height, int* out_bytes_per_pixel = NULL);  // 1 byte per-pixel
 | 
				
			||||||
    IMGUI_API void              GetTexDataAsRGBA32(unsigned char** out_pixels, int* out_width, int* out_height, int* out_bytes_per_pixel = NULL);  // 4 bytes-per-pixel
 | 
					    IMGUI_API void              GetTexDataAsRGBA32(unsigned char** out_pixels, int* out_width, int* out_height, int* out_bytes_per_pixel = NULL);  // 4 bytes-per-pixel
 | 
				
			||||||
    IMGUI_API void              SetTexID(void* id)  { TexID = id; }
 | 
					    IMGUI_API void              SetTexID(void* id)  { TexID = id; }
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user