1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-23 03:32:32 +00:00

Returned some video output. Enough significantly to reduce my paranoia.

This commit is contained in:
Thomas Harte 2016-11-17 13:37:53 +08:00
parent 1f91d29434
commit aca1fa0577
3 changed files with 15 additions and 6 deletions

View File

@ -203,10 +203,13 @@ void CRT::advance_cycles(unsigned int number_of_cycles, unsigned int source_divi
// Construct the output run
uint8_t *next_run = openGL_output_builder_.array_builder.get_output_storage(OutputVertexSize);
if(next_run)
{
output_x1() = output_run_.x1;
output_position_y() = output_run_.y;
output_tex_y() = output_y;
output_x2() = (uint16_t)horizontal_flywheel_->get_current_output_position();
}
openGL_output_builder_.array_builder.flush();
openGL_output_builder_.unlock_output();

View File

@ -130,7 +130,13 @@ uint8_t *ArrayBuilder::Buffer::reget_storage(size_t &size)
void ArrayBuilder::Buffer::flush()
{
if(submitted_data && !is_full && allocated_data > submitted_data)
if(allocated_data > submitted_data)
{
flushed_data = allocated_data;
return;
}
if(submitted_data)
{
memcpy(data.data(), &data[flushed_data], allocated_data - flushed_data);
allocated_data -= flushed_data;

View File

@ -11,7 +11,7 @@
#include <vector>
#include <mutex>
#include <atomic>
#include <memory>
#include "OpenGL.hpp"