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

Smoothed output device changes, killing some dead state. Added an explicit glFinish to suggest that the problem is synchronisation rather than any sort of data or shader error.

This commit is contained in:
Thomas Harte 2016-04-19 22:21:26 -04:00
parent 7aa87723a9
commit 145c0b3b71
2 changed files with 6 additions and 7 deletions

View File

@ -226,6 +226,7 @@ void OpenGLOutputBuilder::draw_frame(unsigned int output_width, unsigned int out
{
glDrawArrays(GL_LINES, 0, (GLsizei)((new_data_size - first_data_length) / SourceVertexSize));
}
glFinish();
}
// transfer to screen
@ -286,7 +287,6 @@ void OpenGLOutputBuilder::perform_output_stage(unsigned int output_width, unsign
{
// draw
glUniform4fv(timestampBaseUniform, 1, timestampBases);
glFlush();
GLsizei primitive_count = (GLsizei)(count / OutputVertexSize);
GLsizei max_count = (GLsizei)((OutputVertexBufferDataSize - start) / OutputVertexSize);
@ -688,11 +688,11 @@ void OpenGLOutputBuilder::set_output_device(OutputDevice output_device)
{
_output_device = output_device;
// for(int builder = 0; builder < NumberOfFields; builder++)
// {
// _run_builders[builder]->reset();
// }
// _composite_src_runs->reset();
for(int builder = 0; builder < NumberOfFields; builder++)
{
_run_builders[builder]->reset();
}
_composite_src_output_y = 0;
}
}

View File

@ -60,7 +60,6 @@ class OpenGLOutputBuilder {
std::shared_ptr<std::mutex> _output_mutex;
// transient buffers indicating composite data not yet decoded
std::unique_ptr<CRTRunBuilder> _composite_src_runs;
uint16_t _composite_src_output_y;
char *get_output_vertex_shader(const char *header);