Table of Contents

Class DummyRenderDevice

Namespace
SearchAThing.OpenGL.Core
Assembly
netcore-opengl-core.dll

A render device that doesn't write GL pixel anywhere.
This object can be used for testing purpouse.

public class DummyRenderDevice : IRenderDevice, INotifyPropertyChanged
Inheritance
DummyRenderDevice
Implements
Inherited Members

Constructors

DummyRenderDevice(in Size)

public DummyRenderDevice(in Size size)

Parameters

size Size

Properties

Size

Retrieve actual size of the device screen (pixels).

public Size Size { get; set; }

Property Value

Size

TransferGLPixelsCount

Stats counter of TransferGLPixels(GL) calls.

public int TransferGLPixelsCount { get; set; }

Property Value

int

Methods

OnPropertyChanged(string?)

invoke this method to forward propertchanged event notification. note: not needed to specify propertyName set by compiler service to called property.

protected void OnPropertyChanged(string? propertyName = null)

Parameters

propertyName string

Post(Action)

Used by GLControl to emit PropertyChanged event.
This is needed in most frameworks that allow ui interactions only from the ui thread itself.
Its necessary expecially if want to access ui data from a separate Task running in parallel.

public void Post(Action action)

Parameters

action Action

Action to be executed in ui thread.

TransferGLPixels(GL)

Use given GL object to issue a ReadPixel and transfer them to destination device.
Following some details how this function is involved in the rendering process:

Here an example implementation given from the TransferGLPixels(GL):
\snippet{'trimleft'} src/render/OffscreenRenderDevice.cs OffscreenTrasferGLPixels

public void TransferGLPixels(GL GL)

Parameters

GL GL

Events

PropertyChanged

public event PropertyChangedEventHandler? PropertyChanged

Event Type

PropertyChangedEventHandler