1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-12-26 09:29:45 +00:00

Added a note to future self, put the scan edge generator back to the way round it was before.

This commit is contained in:
Thomas Harte 2016-02-27 22:51:37 -05:00
parent 60d35fa72b
commit 3449120c24
2 changed files with 7 additions and 1 deletions

View File

@ -158,6 +158,12 @@ void CRT::advance_cycles(unsigned int number_of_cycles, unsigned int source_divi
#define lateral(v) next_run[kCRTSizeOfVertex*v + kCRTVertexOffsetOfLateral]
#define timestamp(v) (*(uint32_t *)&next_run[kCRTSizeOfVertex*v + kCRTVertexOffsetOfTimestamp])
// Vertex output is arranged as:
//
// [0/4] 3
//
// 1 [2/5]
if(next_run)
{
// set the type, initial raster position and type of this run

View File

@ -375,7 +375,7 @@ void CRT::prepare_shader()
glUniform2f(positionConversionUniform, _horizontal_flywheel->get_scan_period(), _vertical_flywheel->get_scan_period() / (unsigned int)_vertical_flywheel_output_divider);
float scan_angle = atan2f(1.0f / (float)_height_of_display, 1.0f);
float scan_normal[] = { sinf(scan_angle), -cosf(scan_angle)};
float scan_normal[] = { sinf(scan_angle), cosf(scan_angle)};
float multiplier = (float)_horizontal_flywheel->get_standard_period() / ((float)_height_of_display * (float)_horizontal_flywheel->get_scan_period());
scan_normal[0] *= multiplier;
scan_normal[1] *= multiplier;