mirror of
https://github.com/TheRedShip/RT_GPU.git
synced 2025-09-27 18:48:36 +02:00
+ | Renderer working
This commit is contained in:
@ -300,15 +300,17 @@ void Renderer::initRender(void)
|
||||
SWS_BILINEAR, nullptr, nullptr, nullptr);
|
||||
}
|
||||
|
||||
void Renderer::addImageToRender(Shader &shader)
|
||||
void Renderer::addImageToRender(GLuint &texture)
|
||||
{
|
||||
std::vector<float> image;
|
||||
std::vector<float> image(WIDTH * HEIGHT * 4);
|
||||
|
||||
AVPacket *pkt;
|
||||
long int videoFrameOffset;
|
||||
long int outputImageOffset;
|
||||
|
||||
(void) shader;
|
||||
// image = shader.getOutputImage();
|
||||
|
||||
glBindTexture(GL_TEXTURE_2D, texture);
|
||||
glGetTexImage(GL_TEXTURE_2D, 0, GL_RGBA, GL_FLOAT, image.data());
|
||||
glBindTexture(GL_TEXTURE_2D, 0);
|
||||
|
||||
for (int x = 0; x < WIDTH; x++)
|
||||
{
|
||||
@ -401,7 +403,7 @@ void Renderer::addPoint(float time)
|
||||
_path.insert(pos, newPoint);
|
||||
}
|
||||
|
||||
void Renderer::update(Shader &shader)
|
||||
void Renderer::update(GLuint &texture)
|
||||
{
|
||||
double curTime;
|
||||
|
||||
@ -422,7 +424,7 @@ void Renderer::update(Shader &shader)
|
||||
|
||||
if(!_testMode)
|
||||
{
|
||||
addImageToRender(shader);
|
||||
addImageToRender(texture);
|
||||
_frameCount++;
|
||||
}
|
||||
makeMovement(curTime - _curSplitStart, curTime);
|
||||
|
Reference in New Issue
Block a user