This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository direct3d.

View the commit online.

commit f46505a6f3a2dc710351ad51ab30fc9f1165be94
Author: Vincent Torri <[email protected]>
AuthorDate: Tue Aug 2 08:33:53 2022 +0200

    Add comment about evolution of code, fix display error
---
 src/d3d_0.c | 11 +++++++++--
 src/d3d_1.c | 13 +++++++++++--
 src/d3d_2.c | 14 +++++++++++---
 src/d3d_3.c | 13 ++++++++++---
 src/d3d_4.c | 13 ++++++++++---
 5 files changed, 51 insertions(+), 13 deletions(-)

diff --git a/src/d3d_0.c b/src/d3d_0.c
index d5e7910..a495e72 100644
--- a/src/d3d_0.c
+++ b/src/d3d_0.c
@@ -1,5 +1,12 @@
-
-/* gcc -g -O2 -Wall -Wextra -o d3d_0 d3d_0.c win.c -ld3d11 -ldxgi -luuid -D_WIN32_WINNT=0x0A00 */
+/*
+ * Tutorial part 0
+ *
+ * Only stub functions, no Direct3D yet
+ *
+ * Compilation:
+ *
+ * gcc -g -O2 -Wall -Wextra -o d3d_0 d3d_0.c win.c -ld3d11 -ldxgi -luuid -D_WIN32_WINNT=0x0A00
+ */
 
 #include <stdlib.h> /* calloc() free() */
 #include <stdio.h>  /* printf() fflush() */
diff --git a/src/d3d_1.c b/src/d3d_1.c
index 2e062eb..7800079 100644
--- a/src/d3d_1.c
+++ b/src/d3d_1.c
@@ -1,5 +1,14 @@
-
-/* gcc -g -O2 -Wall -Wextra -o d3d_1 d3d_1.c win.c -ld3d11 -ldxgi -luuid -D_WIN32_WINNT=0x0A00 */
+/*
+ * Tutorial part 1
+ *
+ * Initialization / shutdown of D3D
+ * Handle resize
+ * Fill background with a single color
+ *
+ * Compilation:
+ *
+ * gcc -g -O2 -Wall -Wextra -o d3d_1 d3d_1.c win.c -ld3d11 -ldxgi -luuid -D_WIN32_WINNT=0x0A00
+ */
 
 #include <stdlib.h> /* calloc() free() malloc() */
 #include <stdio.h>  /* printf() fflush() */
diff --git a/src/d3d_2.c b/src/d3d_2.c
index aa17733..a2bf2ad 100644
--- a/src/d3d_2.c
+++ b/src/d3d_2.c
@@ -1,5 +1,13 @@
-
-/* gcc -g -O2 -Wall -Wextra -o d3d_2 d3d_2.c win.c -ld3d11 -ld3dcompiler -ldxgi -luuid -D_WIN32_WINNT=0x0A00 */
+/*
+ * Tutorial part 2
+ *
+ * Display  pink triangle
+ * Add HLSL code and compile it at runtime (sufficient for now)
+ *
+ * Compilation:
+ *
+ * gcc -g -O2 -Wall -Wextra -o d3d_2 d3d_2.c win.c -ld3d11 -ld3dcompiler -ldxgi -luuid -D_WIN32_WINNT=0x0A00
+ */
 
 #include <stdlib.h> /* calloc() free() malloc() */
 #include <stdio.h>  /* printf() fflush() */
@@ -309,7 +317,7 @@ D3d *d3d_init(Window *win, int vsync)
 
     if (FAILED(res))
     {
-        printf(" * vs error : %s\n", (char *)ID3D10Blob_GetBufferPointer(err_blob));
+        printf(" * CreateVertexShader() failed\n");
         ID3D10Blob_Release(vs_blob);
         goto release_d3D_rasterizer;
     }
diff --git a/src/d3d_3.c b/src/d3d_3.c
index 77d5852..8910819 100644
--- a/src/d3d_3.c
+++ b/src/d3d_3.c
@@ -1,5 +1,12 @@
-
-/* gcc -g -O2 -Wall -Wextra -o d3d_3 d3d_3.c win.c -ld3d11 -ld3dcompiler -ldxgi -luuid -D_WIN32_WINNT=0x0A00 */
+/*
+ * Tutorial part 3
+ *
+ * Specify color of the triangle
+ *
+ * Compilation:
+ *
+ * gcc -g -O2 -Wall -Wextra -o d3d_3 d3d_3.c win.c -ld3d11 -ld3dcompiler -ldxgi -luuid -D_WIN32_WINNT=0x0A00
+ */
 
 #include <stdlib.h> /* calloc() free() malloc() */
 #include <stdio.h>  /* printf() fflush() */
@@ -314,7 +321,7 @@ D3d *d3d_init(Window *win, int vsync)
 
     if (FAILED(res))
     {
-        printf(" * vs error : %s\n", (char *)ID3D10Blob_GetBufferPointer(err_blob));
+        printf(" * CreateVertexShader() failed\n");
         ID3D10Blob_Release(vs_blob);
         goto release_d3D_rasterizer;
     }
diff --git a/src/d3d_4.c b/src/d3d_4.c
index cde4285..be17237 100644
--- a/src/d3d_4.c
+++ b/src/d3d_4.c
@@ -1,5 +1,12 @@
-
-/* gcc -g -O2 -Wall -Wextra -o d3d_4 d3d_4.c win.c -ld3d11 -ld3dcompiler -ldxgi -luuid -D_WIN32_WINNT=0x0A00 */
+/*
+ * Tutorial part 4
+ *
+ * Add rectangle
+ *
+ * Compilation:
+ *
+ * gcc -g -O2 -Wall -Wextra -o d3d_4 d3d_4.c win.c -ld3d11 -ld3dcompiler -ldxgi -luuid -D_WIN32_WINNT=0x0A00
+ */
 
 #include <stdlib.h> /* calloc() free() malloc() */
 #include <stdio.h>  /* printf() fflush() */
@@ -314,7 +321,7 @@ D3d *d3d_init(Window *win, int vsync)
 
     if (FAILED(res))
     {
-        printf(" * vs error : %s\n", (char *)ID3D10Blob_GetBufferPointer(err_blob));
+        printf(" * CreateVertexShader() failed\n");
         ID3D10Blob_Release(vs_blob);
         goto release_d3D_rasterizer;
     }

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to