Skip to content

Commit 92fb841

Browse files
authored
Fix comment typos in the triangle's main.cpp example (#6976)
* Fix comment typos in the triangle's main.cpp example * 2nd fix
1 parent 7d70278 commit 92fb841

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

examples/triangle/main.cpp

+9-9
Original file line numberDiff line numberDiff line change
@@ -83,14 +83,14 @@ struct HelloWorld : public WindowedAppBase
8383
}
8484

8585
// The main task an application cares about is compiling shader code
86-
// from souce (if needed) and loading it through the chosen graphics API.
86+
// from source (if needed) and loading it through the chosen graphics API.
8787
//
8888
// In addition, an application may want to receive reflection information
8989
// about the program, which is what a `slang::ProgramLayout` provides.
9090
//
9191
gfx::Result loadShaderProgram(gfx::IDevice* device, gfx::IShaderProgram** outProgram)
9292
{
93-
// We need to obatin a compilation session (`slang::ISession`) that will provide
93+
// We need to obtain a compilation session (`slang::ISession`) that will provide
9494
// a scope to all the compilation and loading of code we do.
9595
//
9696
// Our example application uses the `gfx` graphics API abstraction layer, which already
@@ -125,7 +125,7 @@ struct HelloWorld : public WindowedAppBase
125125
// Note: If you are using this `loadModule` approach to load your shader code it is
126126
// important to tag your entry point functions with the `[shader("...")]` attribute
127127
// (e.g., `[shader("vertex")] void vertexMain(...)`). Without that information there
128-
// is no umambiguous way for the compiler to know which functions represent entry
128+
// is no unambiguous way for the compiler to know which functions represent entry
129129
// points when it parses your code via `loadModule()`.
130130
//
131131
ComPtr<slang::IEntryPoint> vertexEntryPoint;
@@ -205,7 +205,7 @@ struct HelloWorld : public WindowedAppBase
205205
// we have just defined.
206206
//
207207

208-
// We will define global variables for the various platform and
208+
// We will define global variables for the various platforms and
209209
// graphics API objects that our application needs:
210210
//
211211
// As a reminder, *none* of these are Slang API objects. All
@@ -225,7 +225,7 @@ struct HelloWorld : public WindowedAppBase
225225
//
226226
SLANG_RETURN_ON_FAIL(initializeBase("hello-world", 1024, 768));
227227

228-
// We will create objects needed to configur the "input assembler"
228+
// We will create objects needed to configure the "input assembler"
229229
// (IA) stage of the D3D pipeline.
230230
//
231231
// First, we create an input layout:
@@ -330,9 +330,9 @@ struct HelloWorld : public WindowedAppBase
330330

331331
// We know that `rootObject` is a root shader object created
332332
// from our program, and that it is set up to hold values for
333-
// all the parameter of that program. In order to actually
333+
// all the parameters of that program. In order to actually
334334
// set values, we need to be able to look up the location
335-
// of speciic parameter that we want to set.
335+
// of the specific parameters that we want to set.
336336
//
337337
// Our example graphics API layer supports this operation
338338
// with the idea of a *shader cursor* which can be thought
@@ -343,7 +343,7 @@ struct HelloWorld : public WindowedAppBase
343343
//
344344
// We construct an initial shader cursor that points at the
345345
// entire shader program. You can think of this as akin to
346-
// a diretory path of `/` for the root directory in a file
346+
// a directory path of `/` for the root directory in a file
347347
// system.
348348
//
349349
ShaderCursor rootCursor(rootObject);
@@ -365,7 +365,7 @@ struct HelloWorld : public WindowedAppBase
365365
deviceInfo.identityProjectionMatrix,
366366
sizeof(float) * 16);
367367
//
368-
// Some readers might be concerned about the performance o
368+
// Some readers might be concerned about the performance of
369369
// the above operations because of the use of strings. For
370370
// those readers, here are two things to note:
371371
//

0 commit comments

Comments
 (0)