parent
b1177a325a
commit
c677c6b164
6 changed files with 2 additions and 38 deletions
@ -1,14 +0,0 @@ |
|||||||
#include "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); |
|
||||||
} |
|
@ -1,16 +0,0 @@ |
|||||||
#pragma once |
|
||||||
|
|
||||||
#include "cereal/visionipc/visionbuf.h" |
|
||||||
|
|
||||||
#ifdef __APPLE__ |
|
||||||
#include <OpenGL/gl3.h> |
|
||||||
#else |
|
||||||
#include <GLES3/gl3.h> |
|
||||||
#endif |
|
||||||
|
|
||||||
class EGLImageTexture { |
|
||||||
public: |
|
||||||
EGLImageTexture(const VisionBuf *buf); |
|
||||||
~EGLImageTexture(); |
|
||||||
GLuint frame_tex = 0; |
|
||||||
}; |
|
Loading…
Reference in new issue