Skip to content

Commit a3b0c33

Browse files
committed
Add DesignerSerializationVisibility to fix WFO1000 errors on .NET 10
1 parent dd7d51c commit a3b0c33

2 files changed

Lines changed: 22 additions & 0 deletions

File tree

Crystallography.OpenGL/GLControlAlpha.cs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ public enum FragShaders {
148148

149149
#region プロパティ
150150

151+
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] //260405Cl 追加
151152
public string ToolTip { set { toolTip.SetToolTip(glControl, value); } }
152153

153154
/// <summary>VisualStudioデザイナーの編集の時はTrue</summary>
@@ -179,10 +180,12 @@ public enum FragShaders {
179180
// this application
180181

181182
/// <summary>画像の最大幅 (PPLLのパラメータ)</summary>
183+
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] //260405Cl 追加
182184
[Category("Rendering properties")]
183185
public int MaxWidth { get; set; } = 2560;
184186

185187
/// <summary>画像の最大高さ (PPLLのパラメータ)</summary>
188+
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] //260405Cl 追加
186189
[Category("Rendering properties")]
187190
public int MaxHeight { get; set; } = 1440;
188191

@@ -191,25 +194,30 @@ public enum FragShaders {
191194
/// ここの数値をどれくらい大きくするか。オリジナルでは20にしていたが。。。
192195
/// この値を変更しても、SetShader()は実行されない (その後FragShaderを変更する必要あり)。
193196
/// </summary>
197+
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] //260405Cl 追加
194198
[Category("Rendering properties")]
195199
public int NodeCoefficient { get; set; } = 10;
196200

197201
/// <summary>PPLL時に、どれだけの数の重なり合いを考慮するかをパラメータ.</summary>
202+
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] //260405Cl 追加
198203
[Category("Rendering properties")]
199204
public int MaxFragments { get; set; } = 100;
200205

201206
/// <summary>DDP 時に最大何回 peel pass を回すか. 1 pass で前後 2 層ずつ進む。</summary>
207+
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] //260405Cl 追加
202208
[Category("Rendering properties")]
203209
public int DualDepthPeelingPasses { get; set; } = 12; // (260319Ch) 品質と速度の中間点として 24 層相当を既定値にする
204210

205211
/// <summary>
206212
/// DDP peel loop の終了判定に occlusion query を使うか。
207213
/// 既定では GPU/CPU stall を避けるため無効。
208214
/// </summary>
215+
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] //260405Cl 追加
209216
[Category("Rendering properties")]
210217
public bool DualDepthPeelingUseOcclusionQuery { get; set; } = false; // (260319Ch) 速度優先の既定値では query の同期待ちを避ける
211218

212219
/// <summary>OIT 系パスの最終画像に対する後段 AA.</summary>
220+
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] //260405Cl 追加
213221
[Category("Rendering properties")]
214222
public PostAntiAliasingModes PostAntiAliasing
215223
{
@@ -233,6 +241,7 @@ public PostAntiAliasingModes PostAntiAliasing
233241

234242
#region Depth Cueing
235243
/// <summary>Depth cueingのプロパティ。変更すると、SetDepthCueing()が走る.</summary>
244+
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] //260405Cl 追加
236245
[Category("Rendering properties")]
237246
public (bool Enabled, double Zfar, double Znear) DepthCueing
238247
{
@@ -254,27 +263,33 @@ public PostAntiAliasingModes PostAntiAliasing
254263

255264
#region マウス関連
256265
/// <summary>マウスによる回転操作を許可するか</summary>
266+
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] //260405Cl 追加
257267
[Category("Mouse Operation")]
258268
public bool AllowMouseRotation { get; set; } = true;
259269

260270
/// <summary>マウスによる平行移動操作を許可するか</summary>
271+
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] //260405Cl 追加
261272
[Category("Mouse Operation")]
262273
public bool AllowMouseTranslating { get; set; } = true;
263274

264275
/// <summary>マウスによるスケーリング操作を許可するか</summary>
276+
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] //260405Cl 追加
265277
[Category("Mouse Operation")]
266278
public bool AllowMouseScaling { get; set; } = true;
267279

280+
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] //260405Cl 追加
268281
[Category("Mouse Operation")]
269282
public RotationModes RotationMode { get; set; } = RotationModes.Object;
270283

284+
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] //260405Cl 追加
271285
[Category("Mouse Operation")]
272286
public TranslatingModes TranslatingMode { get; set; } = TranslatingModes.View;
273287

274288
#endregion
275289

276290

277291
/// <summary>投影モード</summary>
292+
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] //260405Cl 追加
278293
[Category("Rendering properties")]
279294
public ProjectionModes ProjectionMode { get => projectionMode; set { projectionMode = value; setProjMatrix(); } }
280295
private ProjectionModes projectionMode = ProjectionModes.Orhographic;
@@ -379,6 +394,7 @@ public Matrix3D WorldMatrixEx
379394
private Vec2d projCenter = new(0, 0);
380395

381396
/// <summary>投影面の横の長さ(GL空間での単位)</summary>
397+
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] //260405Cl 追加
382398
[Category("Geometry")]
383399
public double ProjWidth { get => projWidth; set { projWidth = value; setProjMatrix(); } }
384400

Crystallography.OpenGL/OpenTK.GLControl/GLControl.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ public class GLControl : Control
4343
/// Gets or sets a value representing the current graphics API.
4444
/// This value cannot be changed after the control has been initialized (before <see cref="OnHandleCreated(EventArgs)"/> is triggered).
4545
/// </summary>
46+
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] //260405Cl 追加
4647
[Category("OpenGL")]
4748
public ContextAPI API
4849
{
@@ -64,6 +65,7 @@ public ContextAPI API
6465
/// Gets or sets a value representing the current graphics API profile.
6566
/// This value cannot be changed after the control has been initialized (before <see cref="OnHandleCreated(EventArgs)"/> is triggered).
6667
/// </summary>
68+
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] //260405Cl 追加
6769
[Category("OpenGL")]
6870
public ContextProfile Profile
6971
{
@@ -85,6 +87,7 @@ public ContextProfile Profile
8587
/// Gets or sets a value representing the current graphics profile flags.
8688
/// This value cannot be changed after the control has been initialized (before <see cref="OnHandleCreated(EventArgs)"/> is triggered).
8789
/// </summary>
90+
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] //260405Cl 追加
8891
[Category("OpenGL")]
8992
public ContextFlags Flags
9093
{
@@ -106,6 +109,7 @@ public ContextFlags Flags
106109
/// Gets or sets a value representing the current version of the graphics API.
107110
/// This value cannot be changed after the control has been initialized (before <see cref="OnHandleCreated(EventArgs)"/> is triggered).
108111
/// </summary>
112+
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] //260405Cl 追加
109113
[Category("OpenGL")]
110114
public Version APIVersion
111115
{
@@ -127,6 +131,7 @@ public Version APIVersion
127131
/// Gets or sets the <see cref="GLControl"/> used to share OpenGL resources.
128132
/// This value cannot be changed after the control has been initialized (before <see cref="OnHandleCreated(EventArgs)"/> is triggered).
129133
/// </summary>
134+
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] //260405Cl 追加
130135
[Category("OpenGL")]
131136
public GLControl? SharedContext
132137
{
@@ -154,6 +159,7 @@ public GLControl? SharedContext
154159
/// An event-driven window will wait for events before updating/rendering. It is useful for non-game applications,
155160
/// where the program only needs to do any processing after the user inputs something.
156161
/// </summary>
162+
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] //260405Cl 追加
157163
[Category("Behavior")]
158164
public bool IsEventDriven
159165
{

0 commit comments

Comments
 (0)