35 lines
816 B
C++
35 lines
816 B
C++
#pragma once
|
|
|
|
#include <dvc_config.h>
|
|
#include <dvc_pre_declare.h>
|
|
#include "math/dvc_vector4.h"
|
|
#include "device/dvc_pixel_buffer.h"
|
|
|
|
class AdapterTexture
|
|
{
|
|
public:
|
|
void init(int32_t canvasWidth, int32_t canvasHeight);
|
|
void resize(int32_t canvasWidth, int32_t canvasHeight);
|
|
void updateTexture(void);
|
|
void updateTexture(int32_t start_x, int32_t start_y, const davinci::PixelBuffer<davinci::fVector4>& buffer);
|
|
void updateTexture(int32_t start_x, int32_t start_y, const davinci::PixelBuffer<float32_t>& buffer);
|
|
void draw(void);
|
|
|
|
uint32_t getTextureID(void) const {
|
|
return m_canvasTexture;
|
|
}
|
|
private:
|
|
uint32_t m_canvasTexture;
|
|
|
|
int32_t m_canvasWidth;
|
|
int32_t m_canvasHeight;
|
|
|
|
int32_t m_textureWidth;
|
|
int32_t m_textureHeight;
|
|
|
|
uint8_t* m_textureBuff;
|
|
public:
|
|
AdapterTexture();
|
|
~AdapterTexture();
|
|
};
|