mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-02-24 02:53:54 +08:00
* remove comma two support
* cleanup release files
* little more
* more libs
* no more gralloc
* add snpe back
old-commit-hash: 5c48e7bc86
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);
|
|
}
|