.vs
-.vscode
build/
packages/
datas
--- /dev/null
+{
+ // Use IntelliSense to learn about possible attributes.
+ // Hover to view descriptions of existing attributes.
+ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
+ "version": "0.2.0",
+ "configurations": [
+ {
+ "name": ".NET Core Launch (ClearScreen)",
+ "type": "coreclr",
+ "request": "launch",
+ "preLaunchTask": "build ClearScreen",
+ "program": "${workspaceFolder}/build/Debug/netcoreapp3.1/ClearScreen",
+ "args": [],
+ "cwd": "${workspaceFolder}/build/Debug/netcoreapp3.1/",
+ "stopAtEntry": false,
+ "console": "internalConsole"
+ },
+ {
+ "name": ".NET Core Launch (Triangle)",
+ "type": "coreclr",
+ "request": "launch",
+ "preLaunchTask": "build Triangle",
+ "program": "${workspaceFolder}/build/Debug/netcoreapp3.1/Triangle",
+ "args": [],
+ "cwd": "${workspaceFolder}/build/Debug/netcoreapp3.1/",
+ "stopAtEntry": false,
+ "console": "internalConsole"
+ },
+ {
+ "name": ".NET Core Launch (pbr)",
+ "type": "coreclr",
+ "request": "launch",
+ "preLaunchTask": "build pbr",
+ "program": "${workspaceFolder}/build/Debug/netcoreapp3.1/pbr",
+ "args": [],
+ "cwd": "${workspaceFolder}/build/Debug/netcoreapp3.1/",
+ "stopAtEntry": false,
+ "console": "internalConsole"
+ },
+ {
+ "name": ".NET Core Launch (deferred)",
+ "type": "coreclr",
+ "request": "launch",
+ "preLaunchTask": "build deferred",
+ "program": "${workspaceFolder}/build/Debug/netcoreapp3.1/deferred",
+ "args": [],
+ "cwd": "${workspaceFolder}/build/Debug/netcoreapp3.1/",
+ "stopAtEntry": false,
+ "console": "internalConsole"
+ },
+ {
+ "name": ".NET Core Launch (console)",
+ "type": "coreclr",
+ "request": "launch",
+ "preLaunchTask": "build",
+ "program": "${workspaceFolder}/build/Debug/netcoreapp3.1/Triangle",
+ "args": [],
+ "cwd": "${workspaceFolder}/build/Debug/netcoreapp3.1/",
+ "console": "internalConsole",
+ "stopAtEntry": false
+ },
+ {
+ "name": ".NET Core Attach",
+ "type": "coreclr",
+ "request": "attach",
+ "processId": "${command:pickProcess}"
+ }
+ ]
+}
\ No newline at end of file
--- /dev/null
+{
+ "version": "2.0.0",
+ "tasks": [
+ {
+ "label": "build Triangle",
+ "command": "dotnet",
+ "type": "process",
+ "args": [
+ "build",
+ "${workspaceFolder}/samples/Triangle/Triangle.csproj",
+ "/property:GenerateFullPaths=true",
+ "/property:SolutionDir=${workspaceFolder}/",
+ "/property:Configuration=Debug",
+ "/consoleloggerparameters:NoSummary"
+ ],
+ "problemMatcher": "$msCompile"
+ },
+ {
+ "label": "build ClearScreen",
+ "command": "dotnet",
+ "type": "process",
+ "args": [
+ "build",
+ "${workspaceFolder}/samples/ClearScreen/ClearScreen.csproj",
+ "/property:GenerateFullPaths=true",
+ "/property:SolutionDir=${workspaceFolder}/",
+ "/property:Configuration=Debug",
+ "/consoleloggerparameters:NoSummary"
+ ],
+ "problemMatcher": "$msCompile"
+ },
+ {
+ "label": "build pbr",
+ "command": "dotnet",
+ "type": "process",
+ "args": [
+ "build",
+ "${workspaceFolder}/samples/pbr/pbr.csproj",
+ "/property:GenerateFullPaths=true",
+ "/property:SolutionDir=${workspaceFolder}/",
+ "/property:Configuration=Debug",
+ "/consoleloggerparameters:NoSummary"
+ ],
+ "problemMatcher": "$msCompile"
+ },
+ {
+ "label": "build deferred",
+ "command": "dotnet",
+ "type": "process",
+ "args": [
+ "build",
+ "${workspaceFolder}/samples/deferred/deferred.csproj",
+ "/property:GenerateFullPaths=true",
+ "/property:SolutionDir=${workspaceFolder}/",
+ "/property:Configuration=Debug",
+ "/consoleloggerparameters:NoSummary"
+ ],
+ "problemMatcher": "$msCompile"
+ },
+ {
+ "label": "publish",
+ "command": "dotnet",
+ "type": "process",
+ "args": [
+ "publish",
+ "${workspaceFolder}/samples/Triangle/Triangle.csproj",
+ "/property:GenerateFullPaths=true",
+ "/property:SolutionDir=${workspaceFolder}/",
+ "/property:Configuration=Debug",
+ "/consoleloggerparameters:NoSummary"
+ ],
+ "problemMatcher": "$msCompile"
+ },
+ {
+ "label": "watch",
+ "command": "dotnet",
+ "type": "process",
+ "args": [
+ "watch",
+ "run",
+ "${workspaceFolder}/samples/Triangle/Triangle.csproj",
+ "/property:GenerateFullPaths=true",
+ "/property:SolutionDir=${workspaceFolder}/",
+ "/property:Configuration=Debug",
+ "/consoleloggerparameters:NoSummary"
+ ],
+ "problemMatcher": "$msCompile"
+ }
+ ]
+}
\ No newline at end of file
--- /dev/null
+custom: "https://www.paypal.me/GrandTetraSoftware"
//Most simple example of the `VkWindow` class usage to output something on screen.
namespace ClearScreen {
- class Program : VkWindow {
+ class Program : SampleBase {
//excutable entry point
static void Main (string[] args) {
//the base constructor will create the window with GLFW
ushort[] indices = { 0, 1, 2, 2, 0, 3 };
int currentImgIndex = 0;
string[] imgPathes = {
- vke.samples.Utils.GetDataFile ("models/Bricks16_col.jpg"),
+ vke.samples.Utils.GetDataFile ("textures/texspace256.jpg"),
vke.samples.Utils.GetDataFile ("textures/texturearray_rocks_bc3_unorm.ktx"),
vke.samples.Utils.GetDataFile ("textures/texture.jpg"),
vke.samples.Utils.GetDataFile ("textures/tex256.jpg"),
bool queryUpdatePrefilCube, showDebugImg;
Vector4 lightPos = new Vector4 (1, 0, 0, 0);
- uint curModelIndex = 13;
+ uint curModelIndex = 0;
protected override void initVulkan () {
base.initVulkan ();
public uint Index { get; internal set; }
List<VkAttachmentReference> colorRefs = new List<VkAttachmentReference>();
List<VkAttachmentReference> inputRefs = new List<VkAttachmentReference>();
- MarshaledObject<VkAttachmentReference> depthRef;
+ public VkAttachmentReference? DepthReference;
List<VkAttachmentReference> resolveRefs = new List<VkAttachmentReference>();
List<uint> preservedRefs = new List<uint>();
public void AddResolveReference (uint attachment, VkImageLayout layout = VkImageLayout.ColorAttachmentOptimal) {
AddResolveReference (new VkAttachmentReference { attachment = attachment, layout = layout });
}
- public VkAttachmentReference DepthReference {
- set {
- if (depthRef != null)
- depthRef.Dispose ();
- depthRef = new MarshaledObject<VkAttachmentReference> (value);
- }
- }
/// <summary>
/// after having fetched the vkSubpassDescription structure, the lists of attachment are pinned,
/// so it is mandatory to call the UnpinLists methods after.
/// </summary>
- public VkSubpassDescription SubpassDescription {
+ internal VkSubpassDescription SubpassDescription {
get {
VkSubpassDescription subpassDescription = new VkSubpassDescription ();
subpassDescription.pipelineBindPoint = VkPipelineBindPoint.Graphics;
if (resolveRefs.Count > 0)
subpassDescription.pResolveAttachments = resolveRefs.Pin ();
- if (depthRef != null)
- subpassDescription.pDepthStencilAttachment = depthRef.Pointer;
+ if (DepthReference.HasValue)
+ subpassDescription.pDepthStencilAttachment = DepthReference.Value.Pin();
return subpassDescription;
}
}
- public void UnpinLists () {
+ internal void UnpinLists () {
if (colorRefs.Count > 0)
colorRefs.Unpin ();
if (inputRefs.Count > 0)
preservedRefs.Unpin ();
if (resolveRefs.Count > 0)
resolveRefs.Unpin ();
+ if (DepthReference.HasValue)
+ DepthReference.Unpin();
}
public static implicit operator uint(SubPass sp) => sp.Index;