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.
		
		
		
		
			
				
					15 lines
				
				401 B
			
		
		
			
		
	
	
					15 lines
				
				401 B
			| 
								 
											4 years ago
										 
									 | 
							
								#include "common/visionimg.h"
							 | 
						||
| 
								 
											5 years ago
										 
									 | 
							
								
							 | 
						||
| 
								 
											6 years ago
										 
									 | 
							
								#include <cassert>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 
											5 years ago
										 
									 | 
							
								EGLImageTexture::EGLImageTexture(const VisionBuf *buf) {
							 | 
						||
| 
								 | 
							
								  glGenTextures(1, &frame_tex);
							 | 
						||
| 
								 | 
							
								  glBindTexture(GL_TEXTURE_2D, frame_tex);
							 | 
						||
| 
								 
											4 years ago
										 
									 | 
							
								  glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, buf->width, buf->height, 0, GL_RGB, GL_UNSIGNED_BYTE, nullptr);
							 | 
						||
| 
								 
											5 years ago
										 
									 | 
							
								  glGenerateMipmap(GL_TEXTURE_2D);
							 | 
						||
| 
								 | 
							
								}
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 
											5 years ago
										 
									 | 
							
								EGLImageTexture::~EGLImageTexture() {
							 | 
						||
| 
								 | 
							
								  glDeleteTextures(1, &frame_tex);
							 | 
						||
| 
								 
											5 years ago
										 
									 | 
							
								}
							 |