1
0
mirror of https://github.com/TomHarte/CLK.git synced 2026-04-20 10:17:05 +00:00

Establish shared attributes.

This commit is contained in:
Thomas Harte
2026-02-03 16:44:10 -05:00
parent 35030e879e
commit f0da231f22
3 changed files with 32 additions and 1 deletions
@@ -2475,6 +2475,7 @@
4BD235C52F312C3A0094AFAE /* Rectangle.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = Rectangle.hpp; sourceTree = "<group>"; };
4BD235C62F312C3A0094AFAE /* Rectangle.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = Rectangle.cpp; sourceTree = "<group>"; };
4BD235C82F326A280094AFAE /* DirtyZone.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = DirtyZone.hpp; sourceTree = "<group>"; };
4BD235C92F32A2780094AFAE /* CommonAtrributes.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = CommonAtrributes.hpp; sourceTree = "<group>"; };
4BD388411FE34E010042B588 /* 9918Base.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = 9918Base.hpp; sourceTree = "<group>"; };
4BD388872239E198002D14B5 /* 68000Tests.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = 68000Tests.mm; sourceTree = "<group>"; };
4BD424DD2193B5340097291A /* TextureTarget.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TextureTarget.cpp; sourceTree = "<group>"; };
@@ -5407,6 +5408,7 @@
4BD235BF2F312C0C0094AFAE /* CompositionShader.cpp */,
4BD235C12F312C0C0094AFAE /* CopyShader.cpp */,
4BD235C62F312C3A0094AFAE /* Rectangle.cpp */,
4BD235C92F32A2780094AFAE /* CommonAtrributes.hpp */,
4BD235BE2F312C0C0094AFAE /* CompositionShader.hpp */,
4BD235C02F312C0C0094AFAE /* CopyShader.hpp */,
4BD235C82F326A280094AFAE /* DirtyZone.hpp */,
@@ -0,0 +1,26 @@
//
// CommonAtrributes.hpp
// Clock Signal
//
// Created by Thomas Harte on 03/02/2026.
// Copyright © 2026 Thomas Harte. All rights reserved.
//
#pragma once
#include <vector>
namespace Outputs::Display::OpenGL {
/*!
The named attributes shared by the union of all shaders that consume Scans.
*/
inline std::vector<std::string> scan_attributes() {
return std::vector<std::string>{
"scanEndpoint0DataOffset",
"scanEndpoint1DataOffset",
"scanDataY"
};
};
}
+4 -1
View File
@@ -6,7 +6,9 @@
// Copyright © 2026 Thomas Harte. All rights reserved.
//
#include "CommonAtrributes.hpp"
#include "CompositionShader.hpp"
#include "Outputs/ScanTargets/BufferingScanTarget.hpp"
namespace {
@@ -382,7 +384,8 @@ OpenGL::Shader OpenGL::composition_shader(
auto shader = OpenGL::Shader(
api,
prefix + vertex_shader,
prefix + fragment_shader
prefix + fragment_shader,
scan_attributes()
);
//