mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-02-21 22:53:52 +08:00
* remove comma two support * cleanup release files * little more * more libs * no more gralloc * add snpe back
15 lines
411 B
C++
15 lines
411 B
C++
#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);
|
|
}
|