Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5f43504

Browse files
committed
Add link to Rust version
1 parent 61eeea4 commit 5f43504

3 files changed

Lines changed: 36 additions & 100 deletions

File tree

00_Introduction.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ for a great introduction of computer graphics concepts.
4444
You can use C instead of C++ if you want, but you will have to use a different
4545
linear algebra library and you will be on your own in terms of code structuring.
4646
We will use C++ features like classes and RAII to organize logic and resource
47-
lifetimes.
47+
lifetimes. There is also an [alternative version](https://github.com/bwasty/vulkan-tutorial-rs) of this tutorial available for Rust developers.
4848

4949
## E-book
5050

config.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222
"Vulkan Specification": "https://www.khronos.org/registry/vulkan/specs/1.0-wsi_extensions/pdf/vkspec.pdf",
2323
"Vulkan Quick Reference": "https://www.khronos.org/files/vulkan10-reference-guide.pdf",
2424
"LunarG Vulkan SDK": "https://lunarg.com/vulkan-sdk/",
25-
"Vulkan Hardware Database": "http://vulkan.gpuinfo.org/"
25+
"Vulkan Hardware Database": "http://vulkan.gpuinfo.org/",
26+
"Tutorial for Rust": "https://github.com/bwasty/vulkan-tutorial-rs"
2627
}
2728
},
2829
"ignore": {

daux.patch

Lines changed: 33 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
From bbf1e7e34f2dc687cb9507ad6ad1d2597e1f9006 Mon Sep 17 00:00:00 2001
1+
From e0550e64598b7b22897f98cd2c56f2a8b09a1063 Mon Sep 17 00:00:00 2001
22
From: Alexander Overvoorde <[email protected]>
3-
Date: Sun, 6 May 2018 17:44:07 +0200
3+
Date: Sun, 26 Aug 2018 19:53:42 +0200
44
Subject: [PATCH] Adjust theme for Vulkan tutorial
55

66
---
77
daux/VulkanLinkProcessor.php | 69 ++++
88
templates/content.php | 25 +-
9-
templates/layout/00_layout.php | 2 +-
9+
templates/layout/00_layout.php | 21 +-
1010
templates/layout/05_page.php | 22 +-
1111
themes/daux/css/theme-blue.min.css | 2 +-
1212
themes/daux/css/theme-green.min.css | 2 +-
@@ -20,7 +20,7 @@ Subject: [PATCH] Adjust theme for Vulkan tutorial
2020
themes/daux/less/structure.less | 27 +-
2121
themes/daux/less/theme-blue.less | 10 +-
2222
themes/daux_singlepage/css/main.min.css | 2 +-
23-
16 files changed, 948 insertions(+), 139 deletions(-)
23+
16 files changed, 967 insertions(+), 139 deletions(-)
2424
create mode 100644 daux/VulkanLinkProcessor.php
2525

2626
diff --git a/daux/VulkanLinkProcessor.php b/daux/VulkanLinkProcessor.php
@@ -147,7 +147,7 @@ index 2febe38..f1083bd 100644
147147
</article>
148148

149149
diff --git a/templates/layout/00_layout.php b/templates/layout/00_layout.php
150-
index 868dd05..774a8a5 100755
150+
index 868dd05..8926ed8 100755
151151
--- a/templates/layout/00_layout.php
152152
+++ b/templates/layout/00_layout.php
153153
@@ -8,7 +8,7 @@
@@ -159,8 +159,34 @@ index 868dd05..774a8a5 100755
159159
<!-- Mobile -->
160160
<meta name="apple-mobile-web-app-capable" content="yes" />
161161
<meta name="viewport" content="width=device-width, initial-scale=1.0">
162+
@@ -31,6 +31,25 @@
163+
<!--[if lt IE 9]>
164+
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
165+
<![endif]-->
166+
+
167+
+ <!-- Matomo -->
168+
+ <script type="text/javascript">
169+
+ var _paq = _paq || [];
170+
+ /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
171+
+ _paq.push(["setDocumentTitle", document.domain + "/" + document.title]);
172+
+ _paq.push(["setCookieDomain", "*.vulkan-tutorial.com"]);
173+
+ _paq.push(["setDomains", ["*.vulkan-tutorial.com"]]);
174+
+ _paq.push(['trackPageView']);
175+
+ _paq.push(['enableLinkTracking']);
176+
+ (function() {
177+
+ var u="//matomo.while.io/";
178+
+ _paq.push(['setTrackerUrl', u+'piwik.php']);
179+
+ _paq.push(['setSiteId', '2']);
180+
+ var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
181+
+ g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
182+
+ })();
183+
+ </script>
184+
+ <!-- End Matomo Code -->
185+
</head>
186+
<body class="<?= $params['html']['float'] ? 'with-float' : ''; ?>">
187+
<?= $this->section('content'); ?>
162188
diff --git a/templates/layout/05_page.php b/templates/layout/05_page.php
163-
index 1bd8752..6f507a4 100755
189+
index 1bd8752..9715453 100755
164190
--- a/templates/layout/05_page.php
165191
+++ b/templates/layout/05_page.php
166192
@@ -4,11 +4,6 @@
@@ -202,7 +228,7 @@ index 1bd8752..6f507a4 100755
202228
foreach ($params['html']['links'] as $name => $url) {
203229
echo '<a href="' . $url . '" target="_blank">' . $name . '</a><br>';
204230
+
205-
+ if ($name == "Support the website") {
231+
+ if ($name == "Support the website" || $name == "Vulkan Hardware Database") {
206232
+ echo '<br>';
207233
+ }
208234
} ?>
@@ -1446,94 +1472,3 @@ index 457a809..20a1f39 100755
14461472
--
14471473
2.7.4
14481474

1449-
From 007f00ba9fce5214028d999b29594fae45f3f425 Mon Sep 17 00:00:00 2001
1450-
From: =?UTF-8?q?St=C3=A9phane=20Goetz?= <[email protected]>
1451-
Date: Thu, 18 May 2017 23:43:02 +0200
1452-
Subject: [PATCH] Fix TOC links that are escaped, also handle uniqueness, fixes
1453-
#461
1454-
1455-
---
1456-
.../HTML/ContentTypes/Markdown/TOC/Processor.php | 38 +++++++++++++++++-----
1457-
1 file changed, 29 insertions(+), 9 deletions(-)
1458-
1459-
diff --git a/libs/Format/HTML/ContentTypes/Markdown/TOC/Processor.php b/libs/Format/HTML/ContentTypes/Markdown/TOC/Processor.php
1460-
index bfe6a75..c7f3090 100644
1461-
--- a/libs/Format/HTML/ContentTypes/Markdown/TOC/Processor.php
1462-
+++ b/libs/Format/HTML/ContentTypes/Markdown/TOC/Processor.php
1463-
@@ -42,6 +42,7 @@ class Processor implements DocumentProcessorInterface
1464-
1465-
$headings = [];
1466-
1467-
+ $document->heading_ids = [];
1468-
$walker = $document->walker();
1469-
while ($event = $walker->next()) {
1470-
$node = $event->getNode();
1471-
@@ -55,9 +56,8 @@ class Processor implements DocumentProcessorInterface
1472-
continue;
1473-
}
1474-
1475-
- $id = $this->addId($node);
1476-
-
1477-
- $headings[] = new Entry($node, $id);
1478-
+ $this->ensureHeadingHasId($document, $node);
1479-
+ $headings[] = new Entry($node);
1480-
}
1481-
1482-
if (count($headings) && (count($tocs) || $this->hasAutoTOC())) {
1483-
@@ -74,18 +74,39 @@ class Processor implements DocumentProcessorInterface
1484-
}
1485-
}
1486-
1487-
- protected function addId(Heading $node)
1488-
+ protected function getUniqueId(Document $document, $proposed) {
1489-
+ if ($proposed == "page_") {
1490-
+ $proposed = "page_section_" . (count($document->heading_ids) + 1);
1491-
+ }
1492-
+
1493-
+ // Quick path, it's a unique ID
1494-
+ if (!in_array($proposed, $document->heading_ids)) {
1495-
+ $document->heading_ids[] = $proposed;
1496-
+ return $proposed;
1497-
+ }
1498-
+
1499-
+ $extension = 1; // Initialize the variable at one, so on the first iteration we have 2
1500-
+ do {
1501-
+ $extension++;
1502-
+ } while (in_array("$proposed-$extension", $document->heading_ids));
1503-
+
1504-
+ return "$proposed-$extension";
1505-
+ }
1506-
+
1507-
+ /**
1508-
+ * @param Heading $node
1509-
+ */
1510-
+ protected function ensureHeadingHasId(Document $document, Heading $node)
1511-
{
1512-
- // If the node has an ID, no need to generate it
1513-
+ // If the node has an ID, no need to generate it, just check it's unique
1514-
$attributes = $node->getData('attributes', []);
1515-
if (array_key_exists('id', $attributes) && !empty($attributes['id'])) {
1516-
- // TODO :: check for uniqueness
1517-
+ $node->data['attributes']['id'] = $this->getUniqueId($document, $attributes['id']);
1518-
1519-
return $attributes['id'];
1520-
}
1521-
1522-
// Well, seems we have to generate an ID
1523-
-
1524-
$walker = $node->walker();
1525-
$inside = [];
1526-
while ($event = $walker->next()) {
1527-
@@ -107,8 +128,7 @@ class Processor implements DocumentProcessorInterface
1528-
1529-
$text = 'page_' . DauxHelper::slug(trim($text));
1530-
1531-
- // TODO :: check for uniqueness
1532-
- $node->data['attributes']['id'] = $text;
1533-
+ $node->data['attributes']['id'] = $this->getUniqueId($document, $text);
1534-
}
1535-
1536-
/**
1537-
--
1538-
2.14.3
1539-

0 commit comments

Comments
 (0)