You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							14 lines
						
					
					
						
							411 B
						
					
					
				
			
		
		
	
	
							14 lines
						
					
					
						
							411 B
						
					
					
				| #include "selfdrive/common/visionimg.h"
 | |
| 
 | |
| #include <cassert>
 | |
| 
 | |
| EGLImageTexture::EGLImageTexture(const VisionBuf *buf) {
 | |
|   glGenTextures(1, &frame_tex);
 | |
|   glBindTexture(GL_TEXTURE_2D, frame_tex);
 | |
|   glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, buf->width, buf->height, 0, GL_RGB, GL_UNSIGNED_BYTE, nullptr);
 | |
|   glGenerateMipmap(GL_TEXTURE_2D);
 | |
| }
 | |
| 
 | |
| EGLImageTexture::~EGLImageTexture() {
 | |
|   glDeleteTextures(1, &frame_tex);
 | |
| }
 | |
| 
 |