1
00:00:00,080 --> 00:00:01,750

hello everyone and welcome back to the

2
00:00:01,750 --> 00:00:01,760
hello everyone and welcome back to the
 

3
00:00:01,760 --> 00:00:03,909
hello everyone and welcome back to the
kohi game engine series today we are

4
00:00:03,909 --> 00:00:03,919
kohi game engine series today we are
 

5
00:00:03,919 --> 00:00:05,430
kohi game engine series today we are
actually going to be creating our

6
00:00:05,430 --> 00:00:05,440
actually going to be creating our
 

7
00:00:05,440 --> 00:00:12,950
actually going to be creating our
graphics pipeline

8
00:00:12,950 --> 00:00:12,960

 

9
00:00:12,960 --> 00:00:15,270

but before we do i would like to take a

10
00:00:15,270 --> 00:00:15,280
but before we do i would like to take a
 

11
00:00:15,280 --> 00:00:17,430
but before we do i would like to take a
quick second and thank the supporters of

12
00:00:17,430 --> 00:00:17,440
quick second and thank the supporters of
 

13
00:00:17,440 --> 00:00:19,349
quick second and thank the supporters of
the channel beginning with our partners

14
00:00:19,349 --> 00:00:19,359
the channel beginning with our partners
 

15
00:00:19,359 --> 00:00:23,189
the channel beginning with our partners
ar slia wen shang kaden and patrick

16
00:00:23,189 --> 00:00:23,199
ar slia wen shang kaden and patrick
 

17
00:00:23,199 --> 00:00:25,269
ar slia wen shang kaden and patrick
they are the partners of the channel

18
00:00:25,269 --> 00:00:25,279
they are the partners of the channel
 

19
00:00:25,279 --> 00:00:27,910
they are the partners of the channel
which is the highest tier of support for

20
00:00:27,910 --> 00:00:27,920
which is the highest tier of support for
 

21
00:00:27,920 --> 00:00:29,429
which is the highest tier of support for
the channel so thank you very much for

22
00:00:29,429 --> 00:00:29,439
the channel so thank you very much for
 

23
00:00:29,439 --> 00:00:31,349
the channel so thank you very much for
that and i would also like to thank all

24
00:00:31,349 --> 00:00:31,359
that and i would also like to thank all
 

25
00:00:31,359 --> 00:00:33,190
that and i would also like to thank all
the other supporters listed here on the

26
00:00:33,190 --> 00:00:33,200
the other supporters listed here on the
 

27
00:00:33,200 --> 00:00:34,870
the other supporters listed here on the
screen your support is very much

28
00:00:34,870 --> 00:00:34,880
screen your support is very much
 

29
00:00:34,880 --> 00:00:36,709
screen your support is very much
appreciated so thank you for that if

30
00:00:36,709 --> 00:00:36,719
appreciated so thank you for that if
 

31
00:00:36,719 --> 00:00:37,830
appreciated so thank you for that if
you're interested in supporting the

32
00:00:37,830 --> 00:00:37,840
you're interested in supporting the
 

33
00:00:37,840 --> 00:00:39,430
you're interested in supporting the
channel you can find links in the

34
00:00:39,430 --> 00:00:39,440
channel you can find links in the
 

35
00:00:39,440 --> 00:00:40,869
channel you can find links in the
description to

36
00:00:40,869 --> 00:00:40,879
description to
 

37
00:00:40,879 --> 00:00:42,790
description to
youtube memberships as well as my

38
00:00:42,790 --> 00:00:42,800
youtube memberships as well as my
 

39
00:00:42,800 --> 00:00:44,590
youtube memberships as well as my
patreon page which is

40
00:00:44,590 --> 00:00:44,600
patreon page which is
 

41
00:00:44,600 --> 00:00:47,670
patreon page which is
patreon.com forward slash travis roman

42
00:00:47,670 --> 00:00:47,680
patreon.com forward slash travis roman
 

43
00:00:47,680 --> 00:00:49,590
patreon.com forward slash travis roman
before we jump into that though there is

44
00:00:49,590 --> 00:00:49,600
before we jump into that though there is
 

45
00:00:49,600 --> 00:00:50,470
before we jump into that though there is
one

46
00:00:50,470 --> 00:00:50,480
one
 

47
00:00:50,480 --> 00:00:52,790
one
minor thing that i would like to enhance

48
00:00:52,790 --> 00:00:52,800
minor thing that i would like to enhance
 

49
00:00:52,800 --> 00:00:55,270
minor thing that i would like to enhance
with our logger so

50
00:00:55,270 --> 00:00:55,280
with our logger so
 

51
00:00:55,280 --> 00:00:57,670
with our logger so
in the last video we actually added our

52
00:00:57,670 --> 00:00:57,680
in the last video we actually added our
 

53
00:00:57,680 --> 00:01:00,470
in the last video we actually added our
file system which was a

54
00:01:00,470 --> 00:01:00,480
file system which was a
 

55
00:01:00,480 --> 00:01:01,750
file system which was a
component that we were missing to be

56
00:01:01,750 --> 00:01:01,760
component that we were missing to be
 

57
00:01:01,760 --> 00:01:03,590
component that we were missing to be
able to actually write out our logging

58
00:01:03,590 --> 00:01:03,600
able to actually write out our logging
 

59
00:01:03,600 --> 00:01:06,630
able to actually write out our logging
files so writing out your logs to a file

60
00:01:06,630 --> 00:01:06,640
files so writing out your logs to a file
 

61
00:01:06,640 --> 00:01:08,710
files so writing out your logs to a file
is a great way to be able to debug

62
00:01:08,710 --> 00:01:08,720
is a great way to be able to debug
 

63
00:01:08,720 --> 00:01:10,550
is a great way to be able to debug
crashes so if you're running the

64
00:01:10,550 --> 00:01:10,560
crashes so if you're running the
 

65
00:01:10,560 --> 00:01:12,070
crashes so if you're running the
application and for some reason it just

66
00:01:12,070 --> 00:01:12,080
application and for some reason it just
 

67
00:01:12,080 --> 00:01:13,910
application and for some reason it just
crashes on you

68
00:01:13,910 --> 00:01:13,920
crashes on you
 

69
00:01:13,920 --> 00:01:15,749
crashes on you
it's one way to be able to

70
00:01:15,749 --> 00:01:15,759
it's one way to be able to
 

71
00:01:15,759 --> 00:01:18,310
it's one way to be able to
debug the application so

72
00:01:18,310 --> 00:01:18,320
debug the application so
 

73
00:01:18,320 --> 00:01:20,550
debug the application so
particularly if you're not running in

74
00:01:20,550 --> 00:01:20,560
particularly if you're not running in
 

75
00:01:20,560 --> 00:01:23,030
particularly if you're not running in
debug mode you might want to actually be

76
00:01:23,030 --> 00:01:23,040
debug mode you might want to actually be
 

77
00:01:23,040 --> 00:01:25,429
debug mode you might want to actually be
able to examine your log file so

78
00:01:25,429 --> 00:01:25,439
able to examine your log file so
 

79
00:01:25,439 --> 00:01:26,789
able to examine your log file so
we're going to go ahead and put that in

80
00:01:26,789 --> 00:01:26,799
we're going to go ahead and put that in
 

81
00:01:26,799 --> 00:01:28,230
we're going to go ahead and put that in
real quick it's actually pretty

82
00:01:28,230 --> 00:01:28,240
real quick it's actually pretty
 

83
00:01:28,240 --> 00:01:29,590
real quick it's actually pretty
straightforward so let's go ahead and

84
00:01:29,590 --> 00:01:29,600
straightforward so let's go ahead and
 

85
00:01:29,600 --> 00:01:31,270
straightforward so let's go ahead and
knock it out real quick

86
00:01:31,270 --> 00:01:31,280
knock it out real quick
 

87
00:01:31,280 --> 00:01:32,630
knock it out real quick
first thing we're going to do is we're

88
00:01:32,630 --> 00:01:32,640
first thing we're going to do is we're
 

89
00:01:32,640 --> 00:01:37,270
first thing we're going to do is we're
going to include platform filesystem.h

90
00:01:37,270 --> 00:01:37,280

 

91
00:01:37,280 --> 00:01:39,670

and next in the log system state we're

92
00:01:39,670 --> 00:01:39,680
and next in the log system state we're
 

93
00:01:39,680 --> 00:01:41,830
and next in the log system state we're
going to get rid of this rubbish

94
00:01:41,830 --> 00:01:41,840
going to get rid of this rubbish
 

95
00:01:41,840 --> 00:01:43,590
going to get rid of this rubbish
initialized property because we don't

96
00:01:43,590 --> 00:01:43,600
initialized property because we don't
 

97
00:01:43,600 --> 00:01:45,670
initialized property because we don't
actually need it or use it

98
00:01:45,670 --> 00:01:45,680
actually need it or use it
 

99
00:01:45,680 --> 00:01:46,389
actually need it or use it
so

100
00:01:46,389 --> 00:01:46,399
so
 

101
00:01:46,399 --> 00:01:49,109
so
that is going to go bye-bye

102
00:01:49,109 --> 00:01:49,119
that is going to go bye-bye
 

103
00:01:49,119 --> 00:01:51,830
that is going to go bye-bye
and we are going to instead

104
00:01:51,830 --> 00:01:51,840
and we are going to instead
 

105
00:01:51,840 --> 00:01:53,030
and we are going to instead
create a

106
00:01:53,030 --> 00:01:53,040
create a
 

107
00:01:53,040 --> 00:01:55,510
create a
new file or wipe an existing file if it

108
00:01:55,510 --> 00:01:55,520
new file or wipe an existing file if it
 

109
00:01:55,520 --> 00:01:57,030
new file or wipe an existing file if it
exists

110
00:01:57,030 --> 00:01:57,040
exists
 

111
00:01:57,040 --> 00:01:59,030
exists
our

112
00:01:59,030 --> 00:01:59,040
our
 

113
00:01:59,040 --> 00:02:00,870
our
log file okay so we're just going to say

114
00:02:00,870 --> 00:02:00,880
log file okay so we're just going to say
 

115
00:02:00,880 --> 00:02:02,310
log file okay so we're just going to say
file system open

116
00:02:02,310 --> 00:02:02,320
file system open
 

117
00:02:02,320 --> 00:02:04,389
file system open
and we're going to call this console.log

118
00:02:04,389 --> 00:02:04,399
and we're going to call this console.log
 

119
00:02:04,399 --> 00:02:06,069
and we're going to call this console.log
we're going to use the dot log extension

120
00:02:06,069 --> 00:02:06,079
we're going to use the dot log extension
 

121
00:02:06,079 --> 00:02:07,990
we're going to use the dot log extension
so that vs code can actually pick up on

122
00:02:07,990 --> 00:02:08,000
so that vs code can actually pick up on
 

123
00:02:08,000 --> 00:02:09,990
so that vs code can actually pick up on
some highlighting for that

124
00:02:09,990 --> 00:02:10,000
some highlighting for that
 

125
00:02:10,000 --> 00:02:11,750
some highlighting for that
it is not going to be in binary mode it

126
00:02:11,750 --> 00:02:11,760
it is not going to be in binary mode it
 

127
00:02:11,760 --> 00:02:14,550
it is not going to be in binary mode it
is only going to be in write mode

128
00:02:14,550 --> 00:02:14,560
is only going to be in write mode
 

129
00:02:14,560 --> 00:02:16,470
is only going to be in write mode
and we are just going to store this in

130
00:02:16,470 --> 00:02:16,480
and we are just going to store this in
 

131
00:02:16,480 --> 00:02:18,869
and we are just going to store this in
the log file handle

132
00:02:18,869 --> 00:02:18,879
the log file handle
 

133
00:02:18,879 --> 00:02:22,390
the log file handle
and if for some reason we cannot do this

134
00:02:22,390 --> 00:02:22,400
and if for some reason we cannot do this
 

135
00:02:22,400 --> 00:02:24,150
and if for some reason we cannot do this
that indicates some problem that we

136
00:02:24,150 --> 00:02:24,160
that indicates some problem that we
 

137
00:02:24,160 --> 00:02:25,750
that indicates some problem that we
actually need to investigate and fix at

138
00:02:25,750 --> 00:02:25,760
actually need to investigate and fix at
 

139
00:02:25,760 --> 00:02:27,270
actually need to investigate and fix at
the engine level

140
00:02:27,270 --> 00:02:27,280
the engine level
 

141
00:02:27,280 --> 00:02:29,110
the engine level
or the file system level and so we are

142
00:02:29,110 --> 00:02:29,120
or the file system level and so we are
 

143
00:02:29,120 --> 00:02:31,589
or the file system level and so we are
actually going to abort uh

144
00:02:31,589 --> 00:02:31,599
actually going to abort uh
 

145
00:02:31,599 --> 00:02:32,869
actually going to abort uh
the logging

146
00:02:32,869 --> 00:02:32,879
the logging
 

147
00:02:32,879 --> 00:02:34,710
the logging
initialization if we cannot write that

148
00:02:34,710 --> 00:02:34,720
initialization if we cannot write that
 

149
00:02:34,720 --> 00:02:37,350
initialization if we cannot write that
file okay

150
00:02:37,350 --> 00:02:37,360
file okay
 

151
00:02:37,360 --> 00:02:38,390
file okay
all right

152
00:02:38,390 --> 00:02:38,400
all right
 

153
00:02:38,400 --> 00:02:39,430
all right
so

154
00:02:39,430 --> 00:02:39,440
so
 

155
00:02:39,440 --> 00:02:40,949
so
one other thing that we are going to

156
00:02:40,949 --> 00:02:40,959
one other thing that we are going to
 

157
00:02:40,959 --> 00:02:43,110
one other thing that we are going to
need the ability to do

158
00:02:43,110 --> 00:02:43,120
need the ability to do
 

159
00:02:43,120 --> 00:02:43,910
need the ability to do
is

160
00:02:43,910 --> 00:02:43,920
is
 

161
00:02:43,920 --> 00:02:45,830
is
we are going to need the ability to

162
00:02:45,830 --> 00:02:45,840
we are going to need the ability to
 

163
00:02:45,840 --> 00:02:48,070
we are going to need the ability to
append to a log file so i'm just going

164
00:02:48,070 --> 00:02:48,080
append to a log file so i'm just going
 

165
00:02:48,080 --> 00:02:49,030
append to a log file so i'm just going
to put a

166
00:02:49,030 --> 00:02:49,040
to put a
 

167
00:02:49,040 --> 00:02:50,869
to put a
private method in here

168
00:02:50,869 --> 00:02:50,879
private method in here
 

169
00:02:50,879 --> 00:02:53,190
private method in here
where we have a message that is passed

170
00:02:53,190 --> 00:02:53,200
where we have a message that is passed
 

171
00:02:53,200 --> 00:02:53,990
where we have a message that is passed
in

172
00:02:53,990 --> 00:02:54,000
in
 

173
00:02:54,000 --> 00:02:56,150
in
and so if we have a state pointer and

174
00:02:56,150 --> 00:02:56,160
and so if we have a state pointer and
 

175
00:02:56,160 --> 00:02:59,030
and so if we have a state pointer and
the handle to the log file is valid

176
00:02:59,030 --> 00:02:59,040
the handle to the log file is valid
 

177
00:02:59,040 --> 00:03:01,589
the handle to the log file is valid
then we are going to basically take the

178
00:03:01,589 --> 00:03:01,599
then we are going to basically take the
 

179
00:03:01,599 --> 00:03:04,070
then we are going to basically take the
length of the string and we are going to

180
00:03:04,070 --> 00:03:04,080
length of the string and we are going to
 

181
00:03:04,080 --> 00:03:06,149
length of the string and we are going to
write to that log file

182
00:03:06,149 --> 00:03:06,159
write to that log file
 

183
00:03:06,159 --> 00:03:09,270
write to that log file
and uh we are going to um

184
00:03:09,270 --> 00:03:09,280
and uh we are going to um
 

185
00:03:09,280 --> 00:03:11,910
and uh we are going to um
report if for some reason we can't write

186
00:03:11,910 --> 00:03:11,920
report if for some reason we can't write
 

187
00:03:11,920 --> 00:03:13,270
report if for some reason we can't write
to the file we're going to report to the

188
00:03:13,270 --> 00:03:13,280
to the file we're going to report to the
 

189
00:03:13,280 --> 00:03:15,830
to the file we're going to report to the
console that there's been error writing

190
00:03:15,830 --> 00:03:15,840
console that there's been error writing
 

191
00:03:15,840 --> 00:03:17,910
console that there's been error writing
to that but basically this is just a a

192
00:03:17,910 --> 00:03:17,920
to that but basically this is just a a
 

193
00:03:17,920 --> 00:03:19,430
to that but basically this is just a a
way for us to be able to quickly and

194
00:03:19,430 --> 00:03:19,440
way for us to be able to quickly and
 

195
00:03:19,440 --> 00:03:21,990
way for us to be able to quickly and
easily write to the log file so now that

196
00:03:21,990 --> 00:03:22,000
easily write to the log file so now that
 

197
00:03:22,000 --> 00:03:23,430
easily write to the log file so now that
we have that in place

198
00:03:23,430 --> 00:03:23,440
we have that in place
 

199
00:03:23,440 --> 00:03:25,400
we have that in place
we just need to hook up this method

200
00:03:25,400 --> 00:03:25,410
we just need to hook up this method
 

201
00:03:25,410 --> 00:03:27,670
we just need to hook up this method
[Music]

202
00:03:27,670 --> 00:03:27,680
[Music]
 

203
00:03:27,680 --> 00:03:30,309
[Music]
and all that entails is just going to

204
00:03:30,309 --> 00:03:30,319
and all that entails is just going to
 

205
00:03:30,319 --> 00:03:32,470
and all that entails is just going to
the end of log

206
00:03:32,470 --> 00:03:32,480
the end of log
 

207
00:03:32,480 --> 00:03:33,509
the end of log
output

208
00:03:33,509 --> 00:03:33,519
output
 

209
00:03:33,519 --> 00:03:35,990
output
and tacking that at the bottom

210
00:03:35,990 --> 00:03:36,000
and tacking that at the bottom
 

211
00:03:36,000 --> 00:03:37,910
and tacking that at the bottom
so all we do is just append to the log

212
00:03:37,910 --> 00:03:37,920
so all we do is just append to the log
 

213
00:03:37,920 --> 00:03:39,910
so all we do is just append to the log
file the out message that we've already

214
00:03:39,910 --> 00:03:39,920
file the out message that we've already
 

215
00:03:39,920 --> 00:03:41,750
file the out message that we've already
built here

216
00:03:41,750 --> 00:03:41,760
built here
 

217
00:03:41,760 --> 00:03:44,390
built here
and that should be it

218
00:03:44,390 --> 00:03:44,400
and that should be it
 

219
00:03:44,400 --> 00:03:46,869
and that should be it
one other thing that i would like to

220
00:03:46,869 --> 00:03:46,879
one other thing that i would like to
 

221
00:03:46,879 --> 00:03:50,949
one other thing that i would like to
take a moment and simplify also is

222
00:03:50,949 --> 00:03:50,959
take a moment and simplify also is
 

223
00:03:50,959 --> 00:03:53,589
take a moment and simplify also is
this logic in here because we actually

224
00:03:53,589 --> 00:03:53,599
this logic in here because we actually
 

225
00:03:53,599 --> 00:03:54,550
this logic in here because we actually
have

226
00:03:54,550 --> 00:03:54,560
have
 

227
00:03:54,560 --> 00:03:56,470
have
added some things to our string library

228
00:03:56,470 --> 00:03:56,480
added some things to our string library
 

229
00:03:56,480 --> 00:03:58,390
added some things to our string library
that should actually allow us to

230
00:03:58,390 --> 00:03:58,400
that should actually allow us to
 

231
00:03:58,400 --> 00:04:01,110
that should actually allow us to
simplify this so i'm going to go ahead

232
00:04:01,110 --> 00:04:01,120
simplify this so i'm going to go ahead
 

233
00:04:01,120 --> 00:04:02,470
simplify this so i'm going to go ahead
and

234
00:04:02,470 --> 00:04:02,480
and
 

235
00:04:02,480 --> 00:04:04,710
and
include

236
00:04:04,710 --> 00:04:04,720
include
 

237
00:04:04,720 --> 00:04:06,470
include
k string

238
00:04:06,470 --> 00:04:06,480
k string
 

239
00:04:06,480 --> 00:04:07,990
k string
and i'm actually going to get rid of

240
00:04:07,990 --> 00:04:08,000
and i'm actually going to get rid of
 

241
00:04:08,000 --> 00:04:11,140
and i'm actually going to get rid of
string.h and stdio

242
00:04:11,140 --> 00:04:11,150
string.h and stdio
 

243
00:04:11,150 --> 00:04:18,870
string.h and stdio
[Music]

244
00:04:18,870 --> 00:04:18,880
[Music]
 

245
00:04:18,880 --> 00:04:20,870
[Music]
and i'm basically going to replace this

246
00:04:20,870 --> 00:04:20,880
and i'm basically going to replace this
 

247
00:04:20,880 --> 00:04:22,629
and i'm basically going to replace this
chunk of code with something a little

248
00:04:22,629 --> 00:04:22,639
chunk of code with something a little
 

249
00:04:22,639 --> 00:04:24,629
chunk of code with something a little
bit simpler and

250
00:04:24,629 --> 00:04:24,639
bit simpler and
 

251
00:04:24,639 --> 00:04:26,710
bit simpler and
honestly better commented

252
00:04:26,710 --> 00:04:26,720
honestly better commented
 

253
00:04:26,720 --> 00:04:28,870
honestly better commented
so one note i'm putting in here is a to

254
00:04:28,870 --> 00:04:28,880
so one note i'm putting in here is a to
 

255
00:04:28,880 --> 00:04:32,150
so one note i'm putting in here is a to
do so uh string operations are generally

256
00:04:32,150 --> 00:04:32,160
do so uh string operations are generally
 

257
00:04:32,160 --> 00:04:33,430
do so uh string operations are generally
pretty slow

258
00:04:33,430 --> 00:04:33,440
pretty slow
 

259
00:04:33,440 --> 00:04:34,710
pretty slow
so one thing that we need to do

260
00:04:34,710 --> 00:04:34,720
so one thing that we need to do
 

261
00:04:34,720 --> 00:04:36,150
so one thing that we need to do
eventually is split this out to a

262
00:04:36,150 --> 00:04:36,160
eventually is split this out to a
 

263
00:04:36,160 --> 00:04:37,670
eventually is split this out to a
different thread once we have threading

264
00:04:37,670 --> 00:04:37,680
different thread once we have threading
 

265
00:04:37,680 --> 00:04:38,790
different thread once we have threading
available

266
00:04:38,790 --> 00:04:38,800
available
 

267
00:04:38,800 --> 00:04:40,550
available
but i want to take

268
00:04:40,550 --> 00:04:40,560
but i want to take
 

269
00:04:40,560 --> 00:04:43,350
but i want to take
advantage of our string format

270
00:04:43,350 --> 00:04:43,360
advantage of our string format
 

271
00:04:43,360 --> 00:04:45,909
advantage of our string format
capabilities and go ahead and utilize

272
00:04:45,909 --> 00:04:45,919
capabilities and go ahead and utilize
 

273
00:04:45,919 --> 00:04:47,990
capabilities and go ahead and utilize
those instead so

274
00:04:47,990 --> 00:04:48,000
those instead so
 

275
00:04:48,000 --> 00:04:51,670
those instead so
this is just a little bit cleaner

276
00:04:51,670 --> 00:04:51,680
this is just a little bit cleaner
 

277
00:04:51,680 --> 00:04:52,950
this is just a little bit cleaner
in terms of

278
00:04:52,950 --> 00:04:52,960
in terms of
 

279
00:04:52,960 --> 00:04:57,590
in terms of
our actual ability to log okay great so

280
00:04:57,590 --> 00:04:57,600
our actual ability to log okay great so
 

281
00:04:57,600 --> 00:04:59,990
our actual ability to log okay great so
now that that is done we can go ahead

282
00:04:59,990 --> 00:05:00,000
now that that is done we can go ahead
 

283
00:05:00,000 --> 00:05:02,629
now that that is done we can go ahead
and move on so let's just uh

284
00:05:02,629 --> 00:05:02,639
and move on so let's just uh
 

285
00:05:02,639 --> 00:05:05,670
and move on so let's just uh
really quickly build

286
00:05:05,670 --> 00:05:05,680
really quickly build
 

287
00:05:05,680 --> 00:05:09,029
really quickly build
and it looks like we have

288
00:05:09,029 --> 00:05:09,039
and it looks like we have
 

289
00:05:09,039 --> 00:05:10,629
and it looks like we have
ah

290
00:05:10,629 --> 00:05:10,639
ah
 

291
00:05:10,639 --> 00:05:12,150
ah
so it looks like i did not include

292
00:05:12,150 --> 00:05:12,160
so it looks like i did not include
 

293
00:05:12,160 --> 00:05:14,390
so it looks like i did not include
memory i need to include k memory as

294
00:05:14,390 --> 00:05:14,400
memory i need to include k memory as
 

295
00:05:14,400 --> 00:05:15,040
memory i need to include k memory as
well

296
00:05:15,040 --> 00:05:15,050
well
 

297
00:05:15,050 --> 00:05:16,469
well
[Music]

298
00:05:16,469 --> 00:05:16,479
[Music]
 

299
00:05:16,479 --> 00:05:18,070
[Music]
so we'll go ahead and get that in there

300
00:05:18,070 --> 00:05:18,080
so we'll go ahead and get that in there
 

301
00:05:18,080 --> 00:05:20,150
so we'll go ahead and get that in there
let's build again

302
00:05:20,150 --> 00:05:20,160
let's build again
 

303
00:05:20,160 --> 00:05:21,990
let's build again
and now we're good okay we'll go ahead

304
00:05:21,990 --> 00:05:22,000
and now we're good okay we'll go ahead
 

305
00:05:22,000 --> 00:05:23,590
and now we're good okay we'll go ahead
and run

306
00:05:23,590 --> 00:05:23,600
and run
 

307
00:05:23,600 --> 00:05:25,670
and run
just as a sanity check

308
00:05:25,670 --> 00:05:25,680
just as a sanity check
 

309
00:05:25,680 --> 00:05:27,029
just as a sanity check
perfect so

310
00:05:27,029 --> 00:05:27,039
perfect so
 

311
00:05:27,039 --> 00:05:29,270
perfect so
we're good as far as that goes

312
00:05:29,270 --> 00:05:29,280
we're good as far as that goes
 

313
00:05:29,280 --> 00:05:32,310
we're good as far as that goes
okay so obviously you'll see that we got

314
00:05:32,310 --> 00:05:32,320
okay so obviously you'll see that we got
 

315
00:05:32,320 --> 00:05:33,670
okay so obviously you'll see that we got
some

316
00:05:33,670 --> 00:05:33,680
some
 

317
00:05:33,680 --> 00:05:35,430
some
some validation errors here and that's

318
00:05:35,430 --> 00:05:35,440
some validation errors here and that's
 

319
00:05:35,440 --> 00:05:37,110
some validation errors here and that's
because we did not

320
00:05:37,110 --> 00:05:37,120
because we did not
 

321
00:05:37,120 --> 00:05:38,629
because we did not
actually destroy the shader module

322
00:05:38,629 --> 00:05:38,639
actually destroy the shader module
 

323
00:05:38,639 --> 00:05:41,350
actually destroy the shader module
before we killed everything else so

324
00:05:41,350 --> 00:05:41,360
before we killed everything else so
 

325
00:05:41,360 --> 00:05:43,510
before we killed everything else so
first and foremost we should probably go

326
00:05:43,510 --> 00:05:43,520
first and foremost we should probably go
 

327
00:05:43,520 --> 00:05:45,510
first and foremost we should probably go
back into our

328
00:05:45,510 --> 00:05:45,520
back into our
 

329
00:05:45,520 --> 00:05:46,430
back into our
object shader

330
00:05:46,430 --> 00:05:46,440
object shader
 

331
00:05:46,440 --> 00:05:48,629
object shader
[Music]

332
00:05:48,629 --> 00:05:48,639
[Music]
 

333
00:05:48,639 --> 00:05:50,629
[Music]
and we'll actually need to fix this in

334
00:05:50,629 --> 00:05:50,639
and we'll actually need to fix this in
 

335
00:05:50,639 --> 00:05:52,950
and we'll actually need to fix this in
two places so our object shader should

336
00:05:52,950 --> 00:05:52,960
two places so our object shader should
 

337
00:05:52,960 --> 00:05:55,430
two places so our object shader should
actually properly destroy that

338
00:05:55,430 --> 00:05:55,440
actually properly destroy that
 

339
00:05:55,440 --> 00:05:58,469
actually properly destroy that
so in our object shader destroy we'll go

340
00:05:58,469 --> 00:05:58,479
so in our object shader destroy we'll go
 

341
00:05:58,479 --> 00:05:59,990
so in our object shader destroy we'll go
ahead and put

342
00:05:59,990 --> 00:06:00,000
ahead and put
 

343
00:06:00,000 --> 00:06:01,990
ahead and put
destroy shader modules

344
00:06:01,990 --> 00:06:02,000
destroy shader modules
 

345
00:06:02,000 --> 00:06:04,070
destroy shader modules
and this should actually be using the

346
00:06:04,070 --> 00:06:04,080
and this should actually be using the
 

347
00:06:04,080 --> 00:06:05,830
and this should actually be using the
context

348
00:06:05,830 --> 00:06:05,840
context
 

349
00:06:05,840 --> 00:06:07,930
context
device

350
00:06:07,930 --> 00:06:07,940
device
 

351
00:06:07,940 --> 00:06:09,510
device
[Music]

352
00:06:09,510 --> 00:06:09,520
[Music]
 

353
00:06:09,520 --> 00:06:11,390
[Music]
logical device

354
00:06:11,390 --> 00:06:11,400
logical device
 

355
00:06:11,400 --> 00:06:13,110
logical device
[Music]

356
00:06:13,110 --> 00:06:13,120
[Music]
 

357
00:06:13,120 --> 00:06:15,990
[Music]
and that will allow us to

358
00:06:15,990 --> 00:06:16,000
and that will allow us to
 

359
00:06:16,000 --> 00:06:17,749
and that will allow us to
not get these validation errors anymore

360
00:06:17,749 --> 00:06:17,759
not get these validation errors anymore
 

361
00:06:17,759 --> 00:06:19,830
not get these validation errors anymore
of course that means that this vulcan

362
00:06:19,830 --> 00:06:19,840
of course that means that this vulcan
 

363
00:06:19,840 --> 00:06:21,830
of course that means that this vulcan
object shader destroy needs to also be

364
00:06:21,830 --> 00:06:21,840
object shader destroy needs to also be
 

365
00:06:21,840 --> 00:06:24,710
object shader destroy needs to also be
called so we'll go into vulcan back end

366
00:06:24,710 --> 00:06:24,720
called so we'll go into vulcan back end
 

367
00:06:24,720 --> 00:06:26,230
called so we'll go into vulcan back end
and in the shutdown

368
00:06:26,230 --> 00:06:26,240
and in the shutdown
 

369
00:06:26,240 --> 00:06:28,790
and in the shutdown
we will put this

370
00:06:28,790 --> 00:06:28,800
we will put this
 

371
00:06:28,800 --> 00:06:30,790
we will put this
since we're doing this last we will put

372
00:06:30,790 --> 00:06:30,800
since we're doing this last we will put
 

373
00:06:30,800 --> 00:06:34,070
since we're doing this last we will put
it first here

374
00:06:34,070 --> 00:06:34,080
it first here
 

375
00:06:34,080 --> 00:06:36,150
it first here
so here we will actually destroy our

376
00:06:36,150 --> 00:06:36,160
so here we will actually destroy our
 

377
00:06:36,160 --> 00:06:38,629
so here we will actually destroy our
object shader and render a back end

378
00:06:38,629 --> 00:06:38,639
object shader and render a back end
 

379
00:06:38,639 --> 00:06:39,990
object shader and render a back end
shutdown

380
00:06:39,990 --> 00:06:40,000
shutdown
 

381
00:06:40,000 --> 00:06:42,150
shutdown
passing of course the context and

382
00:06:42,150 --> 00:06:42,160
passing of course the context and
 

383
00:06:42,160 --> 00:06:44,790
passing of course the context and
a the address of the shader itself so

384
00:06:44,790 --> 00:06:44,800
a the address of the shader itself so
 

385
00:06:44,800 --> 00:06:47,350
a the address of the shader itself so
let's go ahead and build this

386
00:06:47,350 --> 00:06:47,360
let's go ahead and build this
 

387
00:06:47,360 --> 00:06:50,070
let's go ahead and build this
run it

388
00:06:50,070 --> 00:06:50,080

 

389
00:06:50,080 --> 00:06:51,670

and shut it down

390
00:06:51,670 --> 00:06:51,680
and shut it down
 

391
00:06:51,680 --> 00:06:53,589
and shut it down
and now that validation error is gone

392
00:06:53,589 --> 00:06:53,599
and now that validation error is gone
 

393
00:06:53,599 --> 00:06:55,189
and now that validation error is gone
okay

394
00:06:55,189 --> 00:06:55,199
okay
 

395
00:06:55,199 --> 00:06:57,589
okay
all right so the next thing that we need

396
00:06:57,589 --> 00:06:57,599
all right so the next thing that we need
 

397
00:06:57,599 --> 00:07:00,629
all right so the next thing that we need
to do is we're actually going to

398
00:07:00,629 --> 00:07:00,639
to do is we're actually going to
 

399
00:07:00,639 --> 00:07:02,070
to do is we're actually going to
skip the descriptors for now and we're

400
00:07:02,070 --> 00:07:02,080
skip the descriptors for now and we're
 

401
00:07:02,080 --> 00:07:04,469
skip the descriptors for now and we're
actually going to set up the

402
00:07:04,469 --> 00:07:04,479
actually going to set up the
 

403
00:07:04,479 --> 00:07:05,830
actually going to set up the
pipeline

404
00:07:05,830 --> 00:07:05,840
pipeline
 

405
00:07:05,840 --> 00:07:07,670
pipeline
and we will come back to descriptors and

406
00:07:07,670 --> 00:07:07,680
and we will come back to descriptors and
 

407
00:07:07,680 --> 00:07:09,670
and we will come back to descriptors and
go over what those are but for right now

408
00:07:09,670 --> 00:07:09,680
go over what those are but for right now
 

409
00:07:09,680 --> 00:07:11,990
go over what those are but for right now
um i think it makes more sense to sort

410
00:07:11,990 --> 00:07:12,000
um i think it makes more sense to sort
 

411
00:07:12,000 --> 00:07:13,909
um i think it makes more sense to sort
of create the pipeline

412
00:07:13,909 --> 00:07:13,919
of create the pipeline
 

413
00:07:13,919 --> 00:07:15,430
of create the pipeline
first

414
00:07:15,430 --> 00:07:15,440
first
 

415
00:07:15,440 --> 00:07:18,710
first
so the pipeline as i mentioned before is

416
00:07:18,710 --> 00:07:18,720
so the pipeline as i mentioned before is
 

417
00:07:18,720 --> 00:07:21,670
so the pipeline as i mentioned before is
basically a structure in vulcan that

418
00:07:21,670 --> 00:07:21,680
basically a structure in vulcan that
 

419
00:07:21,680 --> 00:07:24,390
basically a structure in vulcan that
connects a lot of the various pieces of

420
00:07:24,390 --> 00:07:24,400
connects a lot of the various pieces of
 

421
00:07:24,400 --> 00:07:25,350
connects a lot of the various pieces of
a

422
00:07:25,350 --> 00:07:25,360
a
 

423
00:07:25,360 --> 00:07:27,029
a
render pipeline together

424
00:07:27,029 --> 00:07:27,039
render pipeline together
 

425
00:07:27,039 --> 00:07:30,390
render pipeline together
pieces such as descriptions of vertex

426
00:07:30,390 --> 00:07:30,400
pieces such as descriptions of vertex
 

427
00:07:30,400 --> 00:07:31,909
pieces such as descriptions of vertex
information

428
00:07:31,909 --> 00:07:31,919
information
 

429
00:07:31,919 --> 00:07:35,830
information
and lay up the layout of that as well as

430
00:07:35,830 --> 00:07:35,840
and lay up the layout of that as well as
 

431
00:07:35,840 --> 00:07:37,510
and lay up the layout of that as well as
our shader modules that we've created

432
00:07:37,510 --> 00:07:37,520
our shader modules that we've created
 

433
00:07:37,520 --> 00:07:38,390
our shader modules that we've created
here

434
00:07:38,390 --> 00:07:38,400
here
 

435
00:07:38,400 --> 00:07:40,710
here
our render pass that we created in

436
00:07:40,710 --> 00:07:40,720
our render pass that we created in
 

437
00:07:40,720 --> 00:07:42,150
our render pass that we created in
previous videos

438
00:07:42,150 --> 00:07:42,160
previous videos
 

439
00:07:42,160 --> 00:07:43,830
previous videos
things like that so basically this is

440
00:07:43,830 --> 00:07:43,840
things like that so basically this is
 

441
00:07:43,840 --> 00:07:45,670
things like that so basically this is
the glue that holds all that together

442
00:07:45,670 --> 00:07:45,680
the glue that holds all that together
 

443
00:07:45,680 --> 00:07:48,629
the glue that holds all that together
right and then um we can then use those

444
00:07:48,629 --> 00:07:48,639
right and then um we can then use those
 

445
00:07:48,639 --> 00:07:50,710
right and then um we can then use those
pipelines so to speak

446
00:07:50,710 --> 00:07:50,720
pipelines so to speak
 

447
00:07:50,720 --> 00:07:53,830
pipelines so to speak
uh as our actual shader so

448
00:07:53,830 --> 00:07:53,840
uh as our actual shader so
 

449
00:07:53,840 --> 00:07:56,150
uh as our actual shader so
these are generally speaking going to be

450
00:07:56,150 --> 00:07:56,160
these are generally speaking going to be
 

451
00:07:56,160 --> 00:07:58,710
these are generally speaking going to be
unique per shader

452
00:07:58,710 --> 00:07:58,720
unique per shader
 

453
00:07:58,720 --> 00:08:01,589
unique per shader
at least for now until we get into more

454
00:08:01,589 --> 00:08:01,599
at least for now until we get into more
 

455
00:08:01,599 --> 00:08:02,869
at least for now until we get into more
configurable

456
00:08:02,869 --> 00:08:02,879
configurable
 

457
00:08:02,879 --> 00:08:04,469
configurable
pipelines and things of that nature so

458
00:08:04,469 --> 00:08:04,479
pipelines and things of that nature so
 

459
00:08:04,479 --> 00:08:07,749
pipelines and things of that nature so
for now i'm going to create the pipeline

460
00:08:07,749 --> 00:08:07,759
for now i'm going to create the pipeline
 

461
00:08:07,759 --> 00:08:10,070
for now i'm going to create the pipeline
inside of the vulcan

462
00:08:10,070 --> 00:08:10,080
inside of the vulcan
 

463
00:08:10,080 --> 00:08:11,430
inside of the vulcan
object shader

464
00:08:11,430 --> 00:08:11,440
object shader
 

465
00:08:11,440 --> 00:08:12,950
object shader
creation

466
00:08:12,950 --> 00:08:12,960
creation
 

467
00:08:12,960 --> 00:08:14,950
creation
however i am going to do the creation of

468
00:08:14,950 --> 00:08:14,960
however i am going to do the creation of
 

469
00:08:14,960 --> 00:08:16,629
however i am going to do the creation of
this in a separate file it's just going

470
00:08:16,629 --> 00:08:16,639
this in a separate file it's just going
 

471
00:08:16,639 --> 00:08:18,629
this in a separate file it's just going
to be sort of um

472
00:08:18,629 --> 00:08:18,639
to be sort of um
 

473
00:08:18,639 --> 00:08:19,990
to be sort of um
there's going to be one created

474
00:08:19,990 --> 00:08:20,000
there's going to be one created
 

475
00:08:20,000 --> 00:08:22,230
there's going to be one created
specifically for this right and it'll be

476
00:08:22,230 --> 00:08:22,240
specifically for this right and it'll be
 

477
00:08:22,240 --> 00:08:24,630
specifically for this right and it'll be
stored as part of the shader

478
00:08:24,630 --> 00:08:24,640
stored as part of the shader
 

479
00:08:24,640 --> 00:08:25,749
stored as part of the shader
[Music]

480
00:08:25,749 --> 00:08:25,759
[Music]
 

481
00:08:25,759 --> 00:08:27,909
[Music]
i hope that makes sense uh under vulcan

482
00:08:27,909 --> 00:08:27,919
i hope that makes sense uh under vulcan
 

483
00:08:27,919 --> 00:08:29,909
i hope that makes sense uh under vulcan
i'm going to create a new file

484
00:08:29,909 --> 00:08:29,919
i'm going to create a new file
 

485
00:08:29,919 --> 00:08:32,310
i'm going to create a new file
i'm going to call it vulcanpipeline.h

486
00:08:32,310 --> 00:08:32,320
i'm going to call it vulcanpipeline.h
 

487
00:08:32,320 --> 00:08:34,790
i'm going to call it vulcanpipeline.h
obviously we will want uh pragma once

488
00:08:34,790 --> 00:08:34,800
obviously we will want uh pragma once
 

489
00:08:34,800 --> 00:08:36,510
obviously we will want uh pragma once
and vulcan types inl

490
00:08:36,510 --> 00:08:36,520
and vulcan types inl
 

491
00:08:36,520 --> 00:08:37,750
and vulcan types inl
[Music]

492
00:08:37,750 --> 00:08:37,760
[Music]
 

493
00:08:37,760 --> 00:08:40,870
[Music]
and we are going to have a

494
00:08:40,870 --> 00:08:40,880
and we are going to have a
 

495
00:08:40,880 --> 00:08:44,310
and we are going to have a
create for our graphics pipeline

496
00:08:44,310 --> 00:08:44,320
create for our graphics pipeline
 

497
00:08:44,320 --> 00:08:45,590
create for our graphics pipeline
and this is going to take a whole bunch

498
00:08:45,590 --> 00:08:45,600
and this is going to take a whole bunch
 

499
00:08:45,600 --> 00:08:46,870
and this is going to take a whole bunch
of parameters which i'm not going to

500
00:08:46,870 --> 00:08:46,880
of parameters which i'm not going to
 

501
00:08:46,880 --> 00:08:48,389
of parameters which i'm not going to
explain what all of these are right now

502
00:08:48,389 --> 00:08:48,399
explain what all of these are right now
 

503
00:08:48,399 --> 00:08:49,829
explain what all of these are right now
but some of them should at least look

504
00:08:49,829 --> 00:08:49,839
but some of them should at least look
 

505
00:08:49,839 --> 00:08:51,670
but some of them should at least look
familiar to you so obviously we have the

506
00:08:51,670 --> 00:08:51,680
familiar to you so obviously we have the
 

507
00:08:51,680 --> 00:08:52,790
familiar to you so obviously we have the
context

508
00:08:52,790 --> 00:08:52,800
context
 

509
00:08:52,800 --> 00:08:54,310
context
the render pass that's going to be used

510
00:08:54,310 --> 00:08:54,320
the render pass that's going to be used
 

511
00:08:54,320 --> 00:08:56,310
the render pass that's going to be used
with the pipeline

512
00:08:56,310 --> 00:08:56,320
with the pipeline
 

513
00:08:56,320 --> 00:08:58,310
with the pipeline
and i should mention that this render

514
00:08:58,310 --> 00:08:58,320
and i should mention that this render
 

515
00:08:58,320 --> 00:09:00,389
and i should mention that this render
pass is compatible so it doesn't

516
00:09:00,389 --> 00:09:00,399
pass is compatible so it doesn't
 

517
00:09:00,399 --> 00:09:02,630
pass is compatible so it doesn't
necessarily have to use this render pass

518
00:09:02,630 --> 00:09:02,640
necessarily have to use this render pass
 

519
00:09:02,640 --> 00:09:04,310
necessarily have to use this render pass
it just has to use a render pass that

520
00:09:04,310 --> 00:09:04,320
it just has to use a render pass that
 

521
00:09:04,320 --> 00:09:06,790
it just has to use a render pass that
has the same setup as this render pass

522
00:09:06,790 --> 00:09:06,800
has the same setup as this render pass
 

523
00:09:06,800 --> 00:09:09,750
has the same setup as this render pass
so i just want to point that out

524
00:09:09,750 --> 00:09:09,760
so i just want to point that out
 

525
00:09:09,760 --> 00:09:11,990
so i just want to point that out
uh our attribute count as well as our

526
00:09:11,990 --> 00:09:12,000
uh our attribute count as well as our
 

527
00:09:12,000 --> 00:09:13,670
uh our attribute count as well as our
attributes i'll get into what attributes

528
00:09:13,670 --> 00:09:13,680
attributes i'll get into what attributes
 

529
00:09:13,680 --> 00:09:15,670
attributes i'll get into what attributes
are in a bit our descriptor set layout

530
00:09:15,670 --> 00:09:15,680
are in a bit our descriptor set layout
 

531
00:09:15,680 --> 00:09:17,350
are in a bit our descriptor set layout
count as well as our descriptor set

532
00:09:17,350 --> 00:09:17,360
count as well as our descriptor set
 

533
00:09:17,360 --> 00:09:19,030
count as well as our descriptor set
layouts again i'll get into that in a

534
00:09:19,030 --> 00:09:19,040
layouts again i'll get into that in a
 

535
00:09:19,040 --> 00:09:20,310
layouts again i'll get into that in a
minute

536
00:09:20,310 --> 00:09:20,320
minute
 

537
00:09:20,320 --> 00:09:22,949
minute
the number of stages we have the stage

538
00:09:22,949 --> 00:09:22,959
the number of stages we have the stage
 

539
00:09:22,959 --> 00:09:24,710
the number of stages we have the stage
create infos that are associated with

540
00:09:24,710 --> 00:09:24,720
create infos that are associated with
 

541
00:09:24,720 --> 00:09:26,310
create infos that are associated with
that

542
00:09:26,310 --> 00:09:26,320
that
 

543
00:09:26,320 --> 00:09:28,710
that
the viewport the scissor which we have

544
00:09:28,710 --> 00:09:28,720
the viewport the scissor which we have
 

545
00:09:28,720 --> 00:09:30,310
the viewport the scissor which we have
created before

546
00:09:30,310 --> 00:09:30,320
created before
 

547
00:09:30,320 --> 00:09:32,070
created before
whether or not this is actually going to

548
00:09:32,070 --> 00:09:32,080
whether or not this is actually going to
 

549
00:09:32,080 --> 00:09:34,550
whether or not this is actually going to
be a wireframe pipeline because that is

550
00:09:34,550 --> 00:09:34,560
be a wireframe pipeline because that is
 

551
00:09:34,560 --> 00:09:37,430
be a wireframe pipeline because that is
the kind of thing configuration that we

552
00:09:37,430 --> 00:09:37,440
the kind of thing configuration that we
 

553
00:09:37,440 --> 00:09:39,590
the kind of thing configuration that we
need to actually declare here

554
00:09:39,590 --> 00:09:39,600
need to actually declare here
 

555
00:09:39,600 --> 00:09:42,550
need to actually declare here
as well as a pointer to the vulcan

556
00:09:42,550 --> 00:09:42,560
as well as a pointer to the vulcan
 

557
00:09:42,560 --> 00:09:45,030
as well as a pointer to the vulcan
pipeline structure that will actually

558
00:09:45,030 --> 00:09:45,040
pipeline structure that will actually
 

559
00:09:45,040 --> 00:09:47,030
pipeline structure that will actually
contain the created pipeline when we're

560
00:09:47,030 --> 00:09:47,040
contain the created pipeline when we're
 

561
00:09:47,040 --> 00:09:48,070
contain the created pipeline when we're
done

562
00:09:48,070 --> 00:09:48,080
done
 

563
00:09:48,080 --> 00:09:49,030
done
so

564
00:09:49,030 --> 00:09:49,040
so
 

565
00:09:49,040 --> 00:09:51,670
so
this may wind up actually changing into

566
00:09:51,670 --> 00:09:51,680
this may wind up actually changing into
 

567
00:09:51,680 --> 00:09:53,430
this may wind up actually changing into
a structure instead of passing so many

568
00:09:53,430 --> 00:09:53,440
a structure instead of passing so many
 

569
00:09:53,440 --> 00:09:55,269
a structure instead of passing so many
parameters i may wind up creating a

570
00:09:55,269 --> 00:09:55,279
parameters i may wind up creating a
 

571
00:09:55,279 --> 00:09:56,389
parameters i may wind up creating a
structure

572
00:09:56,389 --> 00:09:56,399
structure
 

573
00:09:56,399 --> 00:09:58,150
structure
for this um

574
00:09:58,150 --> 00:09:58,160
for this um
 

575
00:09:58,160 --> 00:10:00,150
for this um
to simplify this interface a little bit

576
00:10:00,150 --> 00:10:00,160
to simplify this interface a little bit
 

577
00:10:00,160 --> 00:10:02,470
to simplify this interface a little bit
but for right now um

578
00:10:02,470 --> 00:10:02,480
but for right now um
 

579
00:10:02,480 --> 00:10:04,470
but for right now um
it's a little bit simpler in code

580
00:10:04,470 --> 00:10:04,480
it's a little bit simpler in code
 

581
00:10:04,480 --> 00:10:05,590
it's a little bit simpler in code
to just have

582
00:10:05,590 --> 00:10:05,600
to just have
 

583
00:10:05,600 --> 00:10:07,590
to just have
this many

584
00:10:07,590 --> 00:10:07,600
this many
 

585
00:10:07,600 --> 00:10:09,350
this many
parameters just because it's probably

586
00:10:09,350 --> 00:10:09,360
parameters just because it's probably
 

587
00:10:09,360 --> 00:10:10,770
parameters just because it's probably
going to be changing

588
00:10:10,770 --> 00:10:10,780
going to be changing
 

589
00:10:10,780 --> 00:10:12,230
going to be changing
[Music]

590
00:10:12,230 --> 00:10:12,240
[Music]
 

591
00:10:12,240 --> 00:10:14,230
[Music]
pipeline destroy is much simpler just

592
00:10:14,230 --> 00:10:14,240
pipeline destroy is much simpler just
 

593
00:10:14,240 --> 00:10:15,829
pipeline destroy is much simpler just
takes the context and the pipeline in

594
00:10:15,829 --> 00:10:15,839
takes the context and the pipeline in
 

595
00:10:15,839 --> 00:10:17,990
takes the context and the pipeline in
fact i'm going to keep that on one line

596
00:10:17,990 --> 00:10:18,000
fact i'm going to keep that on one line
 

597
00:10:18,000 --> 00:10:18,949
fact i'm going to keep that on one line
and then

598
00:10:18,949 --> 00:10:18,959
and then
 

599
00:10:18,959 --> 00:10:21,110
and then
the only other thing that we have is

600
00:10:21,110 --> 00:10:21,120
the only other thing that we have is
 

601
00:10:21,120 --> 00:10:22,150
the only other thing that we have is
just a

602
00:10:22,150 --> 00:10:22,160
just a
 

603
00:10:22,160 --> 00:10:23,590
just a
simple call to

604
00:10:23,590 --> 00:10:23,600
simple call to
 

605
00:10:23,600 --> 00:10:25,590
simple call to
pipeline bind because we actually need

606
00:10:25,590 --> 00:10:25,600
pipeline bind because we actually need
 

607
00:10:25,600 --> 00:10:27,590
pipeline bind because we actually need
to bind a pipeline in order to be able

608
00:10:27,590 --> 00:10:27,600
to bind a pipeline in order to be able
 

609
00:10:27,600 --> 00:10:28,710
to bind a pipeline in order to be able
to use it

610
00:10:28,710 --> 00:10:28,720
to use it
 

611
00:10:28,720 --> 00:10:30,870
to use it
it's

612
00:10:30,870 --> 00:10:30,880
it's
 

613
00:10:30,880 --> 00:10:33,430
it's
those terms can basically be uh

614
00:10:33,430 --> 00:10:33,440
those terms can basically be uh
 

615
00:10:33,440 --> 00:10:34,949
those terms can basically be uh
interchanged

616
00:10:34,949 --> 00:10:34,959
interchanged
 

617
00:10:34,959 --> 00:10:36,949
interchanged
at this point uh basically whenever you

618
00:10:36,949 --> 00:10:36,959
at this point uh basically whenever you
 

619
00:10:36,959 --> 00:10:39,110
at this point uh basically whenever you
bind a pipeline you're saying any any

620
00:10:39,110 --> 00:10:39,120
bind a pipeline you're saying any any
 

621
00:10:39,120 --> 00:10:40,630
bind a pipeline you're saying any any
commands that occur in the command

622
00:10:40,630 --> 00:10:40,640
commands that occur in the command
 

623
00:10:40,640 --> 00:10:41,750
commands that occur in the command
buffer

624
00:10:41,750 --> 00:10:41,760
buffer
 

625
00:10:41,760 --> 00:10:43,750
buffer
while this pipeline is bound will be

626
00:10:43,750 --> 00:10:43,760
while this pipeline is bound will be
 

627
00:10:43,760 --> 00:10:46,470
while this pipeline is bound will be
executed against that pipeline okay so

628
00:10:46,470 --> 00:10:46,480
executed against that pipeline okay so
 

629
00:10:46,480 --> 00:10:48,470
executed against that pipeline okay so
obviously that's going to take a command

630
00:10:48,470 --> 00:10:48,480
obviously that's going to take a command
 

631
00:10:48,480 --> 00:10:49,430
obviously that's going to take a command
buffer

632
00:10:49,430 --> 00:10:49,440
buffer
 

633
00:10:49,440 --> 00:10:50,949
buffer
uh the pipeline bind point which i'll

634
00:10:50,949 --> 00:10:50,959
uh the pipeline bind point which i'll
 

635
00:10:50,959 --> 00:10:52,150
uh the pipeline bind point which i'll
get to in a bit

636
00:10:52,150 --> 00:10:52,160
get to in a bit
 

637
00:10:52,160 --> 00:10:54,790
get to in a bit
and then uh obviously a pointer to the

638
00:10:54,790 --> 00:10:54,800
and then uh obviously a pointer to the
 

639
00:10:54,800 --> 00:10:57,350
and then uh obviously a pointer to the
pipeline itself okay

640
00:10:57,350 --> 00:10:57,360
pipeline itself okay
 

641
00:10:57,360 --> 00:10:59,350
pipeline itself okay
and that is our interface it's actually

642
00:10:59,350 --> 00:10:59,360
and that is our interface it's actually
 

643
00:10:59,360 --> 00:11:01,590
and that is our interface it's actually
pretty pretty straightforward and it's

644
00:11:01,590 --> 00:11:01,600
pretty pretty straightforward and it's
 

645
00:11:01,600 --> 00:11:03,910
pretty pretty straightforward and it's
not too big okay so now i'm going to

646
00:11:03,910 --> 00:11:03,920
not too big okay so now i'm going to
 

647
00:11:03,920 --> 00:11:05,509
not too big okay so now i'm going to
copy

648
00:11:05,509 --> 00:11:05,519
copy
 

649
00:11:05,519 --> 00:11:07,829
copy
these signatures and i'm going to go to

650
00:11:07,829 --> 00:11:07,839
these signatures and i'm going to go to
 

651
00:11:07,839 --> 00:11:09,829
these signatures and i'm going to go to
here and create a new file

652
00:11:09,829 --> 00:11:09,839
here and create a new file
 

653
00:11:09,839 --> 00:11:13,350
here and create a new file
called vulcanpipeline.c

654
00:11:13,350 --> 00:11:13,360

 

655
00:11:13,360 --> 00:11:16,150

and i'm going to paste these guys in

656
00:11:16,150 --> 00:11:16,160
and i'm going to paste these guys in
 

657
00:11:16,160 --> 00:11:18,540
and i'm going to paste these guys in
convert them to a function definition

658
00:11:18,540 --> 00:11:18,550
convert them to a function definition
 

659
00:11:18,550 --> 00:11:21,030
convert them to a function definition
[Music]

660
00:11:21,030 --> 00:11:21,040
[Music]
 

661
00:11:21,040 --> 00:11:26,230
[Music]
and then

662
00:11:26,230 --> 00:11:26,240

 

663
00:11:26,240 --> 00:11:27,829

i'll go ahead and include vulcan

664
00:11:27,829 --> 00:11:27,839
i'll go ahead and include vulcan
 

665
00:11:27,839 --> 00:11:29,350
i'll go ahead and include vulcan
pipeline dot h

666
00:11:29,350 --> 00:11:29,360
pipeline dot h
 

667
00:11:29,360 --> 00:11:32,069
pipeline dot h
okay

668
00:11:32,069 --> 00:11:32,079

 

669
00:11:32,079 --> 00:11:34,150

we're also going to need

670
00:11:34,150 --> 00:11:34,160
we're also going to need
 

671
00:11:34,160 --> 00:11:36,949
we're also going to need
vulcanutils.h

672
00:11:36,949 --> 00:11:36,959
vulcanutils.h
 

673
00:11:36,959 --> 00:11:39,829
vulcanutils.h
okay and we're going to need the core

674
00:11:39,829 --> 00:11:39,839
okay and we're going to need the core
 

675
00:11:39,839 --> 00:11:42,790
okay and we're going to need the core
k memory and the logger for this

676
00:11:42,790 --> 00:11:42,800
k memory and the logger for this
 

677
00:11:42,800 --> 00:11:44,470
k memory and the logger for this
okay

678
00:11:44,470 --> 00:11:44,480
okay
 

679
00:11:44,480 --> 00:11:46,230
okay
so our

680
00:11:46,230 --> 00:11:46,240
so our
 

681
00:11:46,240 --> 00:11:48,550
so our
vulcan graphics pipeline creates is

682
00:11:48,550 --> 00:11:48,560
vulcan graphics pipeline creates is
 

683
00:11:48,560 --> 00:11:50,310
vulcan graphics pipeline creates is
basically going to return true if

684
00:11:50,310 --> 00:11:50,320
basically going to return true if
 

685
00:11:50,320 --> 00:11:52,470
basically going to return true if
successful otherwise false

686
00:11:52,470 --> 00:11:52,480
successful otherwise false
 

687
00:11:52,480 --> 00:11:54,389
successful otherwise false
and thankfully there's not a whole heck

688
00:11:54,389 --> 00:11:54,399
and thankfully there's not a whole heck
 

689
00:11:54,399 --> 00:11:57,269
and thankfully there's not a whole heck
of a lot to it so

690
00:11:57,269 --> 00:11:57,279
of a lot to it so
 

691
00:11:57,279 --> 00:11:58,790
of a lot to it so
the first thing that we have to create

692
00:11:58,790 --> 00:11:58,800
the first thing that we have to create
 

693
00:11:58,800 --> 00:12:01,590
the first thing that we have to create
is something called the viewport state

694
00:12:01,590 --> 00:12:01,600
is something called the viewport state
 

695
00:12:01,600 --> 00:12:05,350
is something called the viewport state
and this is basically going to take our

696
00:12:05,350 --> 00:12:05,360
and this is basically going to take our
 

697
00:12:05,360 --> 00:12:07,350
and this is basically going to take our
past in viewport and scissor again we're

698
00:12:07,350 --> 00:12:07,360
past in viewport and scissor again we're
 

699
00:12:07,360 --> 00:12:08,710
past in viewport and scissor again we're
making the assumption here that there's

700
00:12:08,710 --> 00:12:08,720
making the assumption here that there's
 

701
00:12:08,720 --> 00:12:10,710
making the assumption here that there's
only one of each this may be something

702
00:12:10,710 --> 00:12:10,720
only one of each this may be something
 

703
00:12:10,720 --> 00:12:13,430
only one of each this may be something
that we have to change in the future

704
00:12:13,430 --> 00:12:13,440
that we have to change in the future
 

705
00:12:13,440 --> 00:12:14,790
that we have to change in the future
but for right now this is basically

706
00:12:14,790 --> 00:12:14,800
but for right now this is basically
 

707
00:12:14,800 --> 00:12:16,389
but for right now this is basically
saying this is the initial viewport and

708
00:12:16,389 --> 00:12:16,399
saying this is the initial viewport and
 

709
00:12:16,399 --> 00:12:17,829
saying this is the initial viewport and
scissor that we want to use with this

710
00:12:17,829 --> 00:12:17,839
scissor that we want to use with this
 

711
00:12:17,839 --> 00:12:19,190
scissor that we want to use with this
pipeline

712
00:12:19,190 --> 00:12:19,200
pipeline
 

713
00:12:19,200 --> 00:12:20,550
pipeline
and that could be changed by something

714
00:12:20,550 --> 00:12:20,560
and that could be changed by something
 

715
00:12:20,560 --> 00:12:22,550
and that could be changed by something
called dynamic state which i'll get to

716
00:12:22,550 --> 00:12:22,560
called dynamic state which i'll get to
 

717
00:12:22,560 --> 00:12:25,350
called dynamic state which i'll get to
in a moment

718
00:12:25,350 --> 00:12:25,360
in a moment
 

719
00:12:25,360 --> 00:12:29,030
in a moment
next we have the

720
00:12:29,030 --> 00:12:29,040
next we have the
 

721
00:12:29,040 --> 00:12:31,829
next we have the
something called the rasterization state

722
00:12:31,829 --> 00:12:31,839
something called the rasterization state
 

723
00:12:31,839 --> 00:12:34,949
something called the rasterization state
that we need a create info for

724
00:12:34,949 --> 00:12:34,959
that we need a create info for
 

725
00:12:34,959 --> 00:12:36,949
that we need a create info for
so here we have a vk pipeline

726
00:12:36,949 --> 00:12:36,959
so here we have a vk pipeline
 

727
00:12:36,959 --> 00:12:39,750
so here we have a vk pipeline
rasterization state crate info

728
00:12:39,750 --> 00:12:39,760
rasterization state crate info
 

729
00:12:39,760 --> 00:12:41,430
rasterization state crate info
that's a mouthful

730
00:12:41,430 --> 00:12:41,440
that's a mouthful
 

731
00:12:41,440 --> 00:12:43,509
that's a mouthful
and basically we have a whole bunch of

732
00:12:43,509 --> 00:12:43,519
and basically we have a whole bunch of
 

733
00:12:43,519 --> 00:12:45,190
and basically we have a whole bunch of
properties in here

734
00:12:45,190 --> 00:12:45,200
properties in here
 

735
00:12:45,200 --> 00:12:46,470
properties in here
and i'm only going to take time to

736
00:12:46,470 --> 00:12:46,480
and i'm only going to take time to
 

737
00:12:46,480 --> 00:12:47,990
and i'm only going to take time to
actually point out the most common ones

738
00:12:47,990 --> 00:12:48,000
actually point out the most common ones
 

739
00:12:48,000 --> 00:12:49,829
actually point out the most common ones
because or the most important ones for

740
00:12:49,829 --> 00:12:49,839
because or the most important ones for
 

741
00:12:49,839 --> 00:12:51,670
because or the most important ones for
right now because

742
00:12:51,670 --> 00:12:51,680
right now because
 

743
00:12:51,680 --> 00:12:54,710
right now because
most of these won't matter right away

744
00:12:54,710 --> 00:12:54,720
most of these won't matter right away
 

745
00:12:54,720 --> 00:12:55,430
most of these won't matter right away
so

746
00:12:55,430 --> 00:12:55,440
so
 

747
00:12:55,440 --> 00:12:58,389
so
first off this polygon mode right here

748
00:12:58,389 --> 00:12:58,399
first off this polygon mode right here
 

749
00:12:58,399 --> 00:12:59,990
first off this polygon mode right here
is either going to be

750
00:12:59,990 --> 00:13:00,000
is either going to be
 

751
00:13:00,000 --> 00:13:00,870
is either going to be
line

752
00:13:00,870 --> 00:13:00,880
line
 

753
00:13:00,880 --> 00:13:03,110
line
or fill depending on whether or not we

754
00:13:03,110 --> 00:13:03,120
or fill depending on whether or not we
 

755
00:13:03,120 --> 00:13:04,470
or fill depending on whether or not we
say wireframe

756
00:13:04,470 --> 00:13:04,480
say wireframe
 

757
00:13:04,480 --> 00:13:07,269
say wireframe
so that is the reason that we

758
00:13:07,269 --> 00:13:07,279
so that is the reason that we
 

759
00:13:07,279 --> 00:13:09,350
so that is the reason that we
take this boolean right here to say if

760
00:13:09,350 --> 00:13:09,360
take this boolean right here to say if
 

761
00:13:09,360 --> 00:13:11,829
take this boolean right here to say if
we should create this as a wireframe

762
00:13:11,829 --> 00:13:11,839
we should create this as a wireframe
 

763
00:13:11,839 --> 00:13:13,910
we should create this as a wireframe
pipeline uh then we're going to use

764
00:13:13,910 --> 00:13:13,920
pipeline uh then we're going to use
 

765
00:13:13,920 --> 00:13:15,990
pipeline uh then we're going to use
we're going to render the polygons as

766
00:13:15,990 --> 00:13:16,000
we're going to render the polygons as
 

767
00:13:16,000 --> 00:13:17,670
we're going to render the polygons as
lines otherwise we're going to fill them

768
00:13:17,670 --> 00:13:17,680
lines otherwise we're going to fill them
 

769
00:13:17,680 --> 00:13:18,790
lines otherwise we're going to fill them
in

770
00:13:18,790 --> 00:13:18,800
in
 

771
00:13:18,800 --> 00:13:20,230
in
and the reason that you might want to do

772
00:13:20,230 --> 00:13:20,240
and the reason that you might want to do
 

773
00:13:20,240 --> 00:13:22,150
and the reason that you might want to do
this is because

774
00:13:22,150 --> 00:13:22,160
this is because
 

775
00:13:22,160 --> 00:13:23,910
this is because
you are going to have situations where

776
00:13:23,910 --> 00:13:23,920
you are going to have situations where
 

777
00:13:23,920 --> 00:13:25,990
you are going to have situations where
you're going to want a wireframe view of

778
00:13:25,990 --> 00:13:26,000
you're going to want a wireframe view of
 

779
00:13:26,000 --> 00:13:27,990
you're going to want a wireframe view of
your geometry and this is how you would

780
00:13:27,990 --> 00:13:28,000
your geometry and this is how you would
 

781
00:13:28,000 --> 00:13:29,829
your geometry and this is how you would
do that and

782
00:13:29,829 --> 00:13:29,839
do that and
 

783
00:13:29,839 --> 00:13:31,430
do that and
i should note that

784
00:13:31,430 --> 00:13:31,440
i should note that
 

785
00:13:31,440 --> 00:13:32,949
i should note that
since

786
00:13:32,949 --> 00:13:32,959
since
 

787
00:13:32,959 --> 00:13:34,949
since
pipelines are immutable once they're

788
00:13:34,949 --> 00:13:34,959
pipelines are immutable once they're
 

789
00:13:34,959 --> 00:13:35,910
pipelines are immutable once they're
created

790
00:13:35,910 --> 00:13:35,920
created
 

791
00:13:35,920 --> 00:13:37,750
created
it's not like opengl where you can just

792
00:13:37,750 --> 00:13:37,760
it's not like opengl where you can just
 

793
00:13:37,760 --> 00:13:39,670
it's not like opengl where you can just
flip back and forth in terms of what

794
00:13:39,670 --> 00:13:39,680
flip back and forth in terms of what
 

795
00:13:39,680 --> 00:13:41,990
flip back and forth in terms of what
this polygon mode would be once it's set

796
00:13:41,990 --> 00:13:42,000
this polygon mode would be once it's set
 

797
00:13:42,000 --> 00:13:44,550
this polygon mode would be once it's set
it's set so if you want a wireframe

798
00:13:44,550 --> 00:13:44,560
it's set so if you want a wireframe
 

799
00:13:44,560 --> 00:13:46,069
it's set so if you want a wireframe
pipeline you actually have to create a

800
00:13:46,069 --> 00:13:46,079
pipeline you actually have to create a
 

801
00:13:46,079 --> 00:13:48,230
pipeline you actually have to create a
separate pipeline for that and use it

802
00:13:48,230 --> 00:13:48,240
separate pipeline for that and use it
 

803
00:13:48,240 --> 00:13:49,189
separate pipeline for that and use it
instead

804
00:13:49,189 --> 00:13:49,199
instead
 

805
00:13:49,199 --> 00:13:52,310
instead
so that is the reason for this

806
00:13:52,310 --> 00:13:52,320
so that is the reason for this
 

807
00:13:52,320 --> 00:13:55,590
so that is the reason for this
the line width i'm just setting to 1.0

808
00:13:55,590 --> 00:13:55,600
the line width i'm just setting to 1.0
 

809
00:13:55,600 --> 00:13:58,150
the line width i'm just setting to 1.0
the co mode is just saying we want to

810
00:13:58,150 --> 00:13:58,160
the co mode is just saying we want to
 

811
00:13:58,160 --> 00:14:00,150
the co mode is just saying we want to
call back faces

812
00:14:00,150 --> 00:14:00,160
call back faces
 

813
00:14:00,160 --> 00:14:02,470
call back faces
the front face is basically

814
00:14:02,470 --> 00:14:02,480
the front face is basically
 

815
00:14:02,480 --> 00:14:04,310
the front face is basically
indicating our winding order of our

816
00:14:04,310 --> 00:14:04,320
indicating our winding order of our
 

817
00:14:04,320 --> 00:14:06,069
indicating our winding order of our
geometry

818
00:14:06,069 --> 00:14:06,079
geometry
 

819
00:14:06,079 --> 00:14:07,269
geometry
so

820
00:14:07,269 --> 00:14:07,279
so
 

821
00:14:07,279 --> 00:14:09,829
so
front faces versus back faces are

822
00:14:09,829 --> 00:14:09,839
front faces versus back faces are
 

823
00:14:09,839 --> 00:14:12,069
front faces versus back faces are
determined by the order of the vertices

824
00:14:12,069 --> 00:14:12,079
determined by the order of the vertices
 

825
00:14:12,079 --> 00:14:14,150
determined by the order of the vertices
themselves and whether they go any

826
00:14:14,150 --> 00:14:14,160
themselves and whether they go any
 

827
00:14:14,160 --> 00:14:16,710
themselves and whether they go any
clockwise or counterclockwise

828
00:14:16,710 --> 00:14:16,720
clockwise or counterclockwise
 

829
00:14:16,720 --> 00:14:18,470
clockwise or counterclockwise
direction

830
00:14:18,470 --> 00:14:18,480
direction
 

831
00:14:18,480 --> 00:14:19,350
direction
most

832
00:14:19,350 --> 00:14:19,360
most
 

833
00:14:19,360 --> 00:14:20,629
most
applications tend to use

834
00:14:20,629 --> 00:14:20,639
applications tend to use
 

835
00:14:20,639 --> 00:14:23,350
applications tend to use
counterclockwise to to

836
00:14:23,350 --> 00:14:23,360
counterclockwise to to
 

837
00:14:23,360 --> 00:14:24,870
counterclockwise to to
indicate the front face which is what

838
00:14:24,870 --> 00:14:24,880
indicate the front face which is what
 

839
00:14:24,880 --> 00:14:26,550
indicate the front face which is what
we're going to be doing here

840
00:14:26,550 --> 00:14:26,560
we're going to be doing here
 

841
00:14:26,560 --> 00:14:28,550
we're going to be doing here
so if i were to flip this to

842
00:14:28,550 --> 00:14:28,560
so if i were to flip this to
 

843
00:14:28,560 --> 00:14:30,629
so if i were to flip this to
clockwise then it would actually cull

844
00:14:30,629 --> 00:14:30,639
clockwise then it would actually cull
 

845
00:14:30,639 --> 00:14:32,790
clockwise then it would actually cull
the front faces or what appears to be

846
00:14:32,790 --> 00:14:32,800
the front faces or what appears to be
 

847
00:14:32,800 --> 00:14:35,110
the front faces or what appears to be
the front faces because

848
00:14:35,110 --> 00:14:35,120
the front faces because
 

849
00:14:35,120 --> 00:14:37,829
the front faces because
the winding order is reversed so

850
00:14:37,829 --> 00:14:37,839
the winding order is reversed so
 

851
00:14:37,839 --> 00:14:40,470
the winding order is reversed so
if you guys ever run into issues with

852
00:14:40,470 --> 00:14:40,480
if you guys ever run into issues with
 

853
00:14:40,480 --> 00:14:42,550
if you guys ever run into issues with
your geometry sort of rendering inside

854
00:14:42,550 --> 00:14:42,560
your geometry sort of rendering inside
 

855
00:14:42,560 --> 00:14:45,430
your geometry sort of rendering inside
out or backwards it may have to do with

856
00:14:45,430 --> 00:14:45,440
out or backwards it may have to do with
 

857
00:14:45,440 --> 00:14:46,790
out or backwards it may have to do with
this right

858
00:14:46,790 --> 00:14:46,800
this right
 

859
00:14:46,800 --> 00:14:47,670
this right
also

860
00:14:47,670 --> 00:14:47,680
also
 

861
00:14:47,680 --> 00:14:50,069
also
we could if we wanted to disable

862
00:14:50,069 --> 00:14:50,079
we could if we wanted to disable
 

863
00:14:50,079 --> 00:14:52,629
we could if we wanted to disable
backface culling we could set this to

864
00:14:52,629 --> 00:14:52,639
backface culling we could set this to
 

865
00:14:52,639 --> 00:14:54,629
backface culling we could set this to
disable that but for right now we

866
00:14:54,629 --> 00:14:54,639
disable that but for right now we
 

867
00:14:54,639 --> 00:14:55,829
disable that but for right now we
actually want to

868
00:14:55,829 --> 00:14:55,839
actually want to
 

869
00:14:55,839 --> 00:14:57,910
actually want to
disable back faces which means we don't

870
00:14:57,910 --> 00:14:57,920
disable back faces which means we don't
 

871
00:14:57,920 --> 00:15:00,230
disable back faces which means we don't
want to see the back side of of geometry

872
00:15:00,230 --> 00:15:00,240
want to see the back side of of geometry
 

873
00:15:00,240 --> 00:15:02,150
want to see the back side of of geometry
we don't want to render that as far as

874
00:15:02,150 --> 00:15:02,160
we don't want to render that as far as
 

875
00:15:02,160 --> 00:15:03,590
we don't want to render that as far as
the rest of this stuff it's not really

876
00:15:03,590 --> 00:15:03,600
the rest of this stuff it's not really
 

877
00:15:03,600 --> 00:15:05,189
the rest of this stuff it's not really
important for the time being i just set

878
00:15:05,189 --> 00:15:05,199
important for the time being i just set
 

879
00:15:05,199 --> 00:15:06,870
important for the time being i just set
it explicitly here

880
00:15:06,870 --> 00:15:06,880
it explicitly here
 

881
00:15:06,880 --> 00:15:08,310
it explicitly here
just so that we can come in and change

882
00:15:08,310 --> 00:15:08,320
just so that we can come in and change
 

883
00:15:08,320 --> 00:15:10,470
just so that we can come in and change
it later on so

884
00:15:10,470 --> 00:15:10,480
it later on so
 

885
00:15:10,480 --> 00:15:12,470
it later on so
i am going to move on the next thing

886
00:15:12,470 --> 00:15:12,480
i am going to move on the next thing
 

887
00:15:12,480 --> 00:15:14,230
i am going to move on the next thing
that we need to configure is

888
00:15:14,230 --> 00:15:14,240
that we need to configure is
 

889
00:15:14,240 --> 00:15:16,230
that we need to configure is
multi-sampling multi-sampling is not

890
00:15:16,230 --> 00:15:16,240
multi-sampling multi-sampling is not
 

891
00:15:16,240 --> 00:15:17,189
multi-sampling multi-sampling is not
something that we're going to be using

892
00:15:17,189 --> 00:15:17,199
something that we're going to be using
 

893
00:15:17,199 --> 00:15:18,790
something that we're going to be using
right off the bat so i've set some

894
00:15:18,790 --> 00:15:18,800
right off the bat so i've set some
 

895
00:15:18,800 --> 00:15:20,710
right off the bat so i've set some
defaults here to say we're just going to

896
00:15:20,710 --> 00:15:20,720
defaults here to say we're just going to
 

897
00:15:20,720 --> 00:15:22,870
defaults here to say we're just going to
use a single sample

898
00:15:22,870 --> 00:15:22,880
use a single sample
 

899
00:15:22,880 --> 00:15:25,350
use a single sample
and that is basically it

900
00:15:25,350 --> 00:15:25,360
and that is basically it
 

901
00:15:25,360 --> 00:15:26,790
and that is basically it
multi-sampling is something we'll

902
00:15:26,790 --> 00:15:26,800
multi-sampling is something we'll
 

903
00:15:26,800 --> 00:15:29,509
multi-sampling is something we'll
probably come back to but for now it's

904
00:15:29,509 --> 00:15:29,519
probably come back to but for now it's
 

905
00:15:29,519 --> 00:15:32,470
probably come back to but for now it's
not something i'm going to implement

906
00:15:32,470 --> 00:15:32,480
not something i'm going to implement
 

907
00:15:32,480 --> 00:15:34,069
not something i'm going to implement
depth and stencil testing is another

908
00:15:34,069 --> 00:15:34,079
depth and stencil testing is another
 

909
00:15:34,079 --> 00:15:36,470
depth and stencil testing is another
thing so we are actually going to

910
00:15:36,470 --> 00:15:36,480
thing so we are actually going to
 

911
00:15:36,480 --> 00:15:38,470
thing so we are actually going to
enable depth testing

912
00:15:38,470 --> 00:15:38,480
enable depth testing
 

913
00:15:38,480 --> 00:15:40,550
enable depth testing
and enable we're also going to enable

914
00:15:40,550 --> 00:15:40,560
and enable we're also going to enable
 

915
00:15:40,560 --> 00:15:42,629
and enable we're also going to enable
writing to the depth buffer

916
00:15:42,629 --> 00:15:42,639
writing to the depth buffer
 

917
00:15:42,639 --> 00:15:45,749
writing to the depth buffer
and then uh this is our depth compare up

918
00:15:45,749 --> 00:15:45,759
and then uh this is our depth compare up
 

919
00:15:45,759 --> 00:15:47,590
and then uh this is our depth compare up
so basically this is saying

920
00:15:47,590 --> 00:15:47,600
so basically this is saying
 

921
00:15:47,600 --> 00:15:50,550
so basically this is saying
when we compare two different depths um

922
00:15:50,550 --> 00:15:50,560
when we compare two different depths um
 

923
00:15:50,560 --> 00:15:51,990
when we compare two different depths um
what is the comparison that we want to

924
00:15:51,990 --> 00:15:52,000
what is the comparison that we want to
 

925
00:15:52,000 --> 00:15:54,389
what is the comparison that we want to
use do we want to use

926
00:15:54,389 --> 00:15:54,399
use do we want to use
 

927
00:15:54,399 --> 00:15:55,829
use do we want to use
less than

928
00:15:55,829 --> 00:15:55,839
less than
 

929
00:15:55,839 --> 00:15:58,310
less than
or greater than or equal there's a bunch

930
00:15:58,310 --> 00:15:58,320
or greater than or equal there's a bunch
 

931
00:15:58,320 --> 00:16:00,230
or greater than or equal there's a bunch
of different operations on this it's

932
00:16:00,230 --> 00:16:00,240
of different operations on this it's
 

933
00:16:00,240 --> 00:16:03,350
of different operations on this it's
basically determining what gets clipped

934
00:16:03,350 --> 00:16:03,360
basically determining what gets clipped
 

935
00:16:03,360 --> 00:16:06,310
basically determining what gets clipped
when you're doing depth testing

936
00:16:06,310 --> 00:16:06,320
when you're doing depth testing
 

937
00:16:06,320 --> 00:16:09,670
when you're doing depth testing
okay and uh we are not using uh stencil

938
00:16:09,670 --> 00:16:09,680
okay and uh we are not using uh stencil
 

939
00:16:09,680 --> 00:16:11,189
okay and uh we are not using uh stencil
testing right now so i've gone ahead and

940
00:16:11,189 --> 00:16:11,199
testing right now so i've gone ahead and
 

941
00:16:11,199 --> 00:16:13,350
testing right now so i've gone ahead and
set that to false

942
00:16:13,350 --> 00:16:13,360
set that to false
 

943
00:16:13,360 --> 00:16:15,829
set that to false
so the next thing is something called

944
00:16:15,829 --> 00:16:15,839
so the next thing is something called
 

945
00:16:15,839 --> 00:16:18,230
so the next thing is something called
color blend attachment state and this

946
00:16:18,230 --> 00:16:18,240
color blend attachment state and this
 

947
00:16:18,240 --> 00:16:19,910
color blend attachment state and this
has to do with

948
00:16:19,910 --> 00:16:19,920
has to do with
 

949
00:16:19,920 --> 00:16:22,550
has to do with
the way that colors are actually written

950
00:16:22,550 --> 00:16:22,560
the way that colors are actually written
 

951
00:16:22,560 --> 00:16:24,949
the way that colors are actually written
to

952
00:16:24,949 --> 00:16:24,959

 

953
00:16:24,959 --> 00:16:27,110

written to the image right

954
00:16:27,110 --> 00:16:27,120
written to the image right
 

955
00:16:27,120 --> 00:16:28,629
written to the image right
and so

956
00:16:28,629 --> 00:16:28,639
and so
 

957
00:16:28,639 --> 00:16:30,949
and so
these are the various

958
00:16:30,949 --> 00:16:30,959
these are the various
 

959
00:16:30,959 --> 00:16:32,310
these are the various
blending modes

960
00:16:32,310 --> 00:16:32,320
blending modes
 

961
00:16:32,320 --> 00:16:34,629
blending modes
to handle alpha and we'll come back to

962
00:16:34,629 --> 00:16:34,639
to handle alpha and we'll come back to
 

963
00:16:34,639 --> 00:16:35,990
to handle alpha and we'll come back to
these when we actually start handling

964
00:16:35,990 --> 00:16:36,000
these when we actually start handling
 

965
00:16:36,000 --> 00:16:37,990
these when we actually start handling
alpha transparency

966
00:16:37,990 --> 00:16:38,000
alpha transparency
 

967
00:16:38,000 --> 00:16:40,069
alpha transparency
but these this setup will actually allow

968
00:16:40,069 --> 00:16:40,079
but these this setup will actually allow
 

969
00:16:40,079 --> 00:16:41,829
but these this setup will actually allow
us to use alpha transparency when we get

970
00:16:41,829 --> 00:16:41,839
us to use alpha transparency when we get
 

971
00:16:41,839 --> 00:16:43,430
us to use alpha transparency when we get
to that stage so

972
00:16:43,430 --> 00:16:43,440
to that stage so
 

973
00:16:43,440 --> 00:16:45,189
to that stage so
i'll double back at that point and

974
00:16:45,189 --> 00:16:45,199
i'll double back at that point and
 

975
00:16:45,199 --> 00:16:47,910
i'll double back at that point and
describe what all these things are

976
00:16:47,910 --> 00:16:47,920
describe what all these things are
 

977
00:16:47,920 --> 00:16:50,710
describe what all these things are
and also our color right mask indicates

978
00:16:50,710 --> 00:16:50,720
and also our color right mask indicates
 

979
00:16:50,720 --> 00:16:53,350
and also our color right mask indicates
what channels we actually want to write

980
00:16:53,350 --> 00:16:53,360
what channels we actually want to write
 

981
00:16:53,360 --> 00:16:56,470
what channels we actually want to write
and so in this case we want r g b and a

982
00:16:56,470 --> 00:16:56,480
and so in this case we want r g b and a
 

983
00:16:56,480 --> 00:16:58,389
and so in this case we want r g b and a
okay

984
00:16:58,389 --> 00:16:58,399
okay
 

985
00:16:58,399 --> 00:17:00,949
okay
so the next thing is our color blend

986
00:17:00,949 --> 00:17:00,959
so the next thing is our color blend
 

987
00:17:00,959 --> 00:17:03,670
so the next thing is our color blend
state create info so this basically just

988
00:17:03,670 --> 00:17:03,680
state create info so this basically just
 

989
00:17:03,680 --> 00:17:05,510
state create info so this basically just
takes the attachments that we define

990
00:17:05,510 --> 00:17:05,520
takes the attachments that we define
 

991
00:17:05,520 --> 00:17:06,470
takes the attachments that we define
here

992
00:17:06,470 --> 00:17:06,480
here
 

993
00:17:06,480 --> 00:17:08,390
here
again we only have one attachment we're

994
00:17:08,390 --> 00:17:08,400
again we only have one attachment we're
 

995
00:17:08,400 --> 00:17:10,309
again we only have one attachment we're
making that assumption right now

996
00:17:10,309 --> 00:17:10,319
making that assumption right now
 

997
00:17:10,319 --> 00:17:11,189
making that assumption right now
um

998
00:17:11,189 --> 00:17:11,199
um
 

999
00:17:11,199 --> 00:17:12,789
um
we may need to come back and revisit

1000
00:17:12,789 --> 00:17:12,799
we may need to come back and revisit
 

1001
00:17:12,799 --> 00:17:14,710
we may need to come back and revisit
this later but for right now it's okay

1002
00:17:14,710 --> 00:17:14,720
this later but for right now it's okay
 

1003
00:17:14,720 --> 00:17:17,350
this later but for right now it's okay
to make that assumption

1004
00:17:17,350 --> 00:17:17,360
to make that assumption
 

1005
00:17:17,360 --> 00:17:19,829
to make that assumption
uh all right so

1006
00:17:19,829 --> 00:17:19,839
uh all right so
 

1007
00:17:19,839 --> 00:17:21,110
uh all right so
the next thing i want to talk about

1008
00:17:21,110 --> 00:17:21,120
the next thing i want to talk about
 

1009
00:17:21,120 --> 00:17:24,069
the next thing i want to talk about
really quickly is dynamic state so as i

1010
00:17:24,069 --> 00:17:24,079
really quickly is dynamic state so as i
 

1011
00:17:24,079 --> 00:17:25,750
really quickly is dynamic state so as i
mentioned before

1012
00:17:25,750 --> 00:17:25,760
mentioned before
 

1013
00:17:25,760 --> 00:17:27,669
mentioned before
pipelines are immutable

1014
00:17:27,669 --> 00:17:27,679
pipelines are immutable
 

1015
00:17:27,679 --> 00:17:30,470
pipelines are immutable
however there are a few things

1016
00:17:30,470 --> 00:17:30,480
however there are a few things
 

1017
00:17:30,480 --> 00:17:32,150
however there are a few things
within something called dynamic state

1018
00:17:32,150 --> 00:17:32,160
within something called dynamic state
 

1019
00:17:32,160 --> 00:17:34,470
within something called dynamic state
that we can change on the fly

1020
00:17:34,470 --> 00:17:34,480
that we can change on the fly
 

1021
00:17:34,480 --> 00:17:36,870
that we can change on the fly
and viewport and scissor

1022
00:17:36,870 --> 00:17:36,880
and viewport and scissor
 

1023
00:17:36,880 --> 00:17:39,029
and viewport and scissor
as well as actually line width are a few

1024
00:17:39,029 --> 00:17:39,039
as well as actually line width are a few
 

1025
00:17:39,039 --> 00:17:40,390
as well as actually line width are a few
of those things so we can actually

1026
00:17:40,390 --> 00:17:40,400
of those things so we can actually
 

1027
00:17:40,400 --> 00:17:42,310
of those things so we can actually
change these properties

1028
00:17:42,310 --> 00:17:42,320
change these properties
 

1029
00:17:42,320 --> 00:17:44,950
change these properties
by calling various vulcan commands

1030
00:17:44,950 --> 00:17:44,960
by calling various vulcan commands
 

1031
00:17:44,960 --> 00:17:47,669
by calling various vulcan commands
to set those things without having to

1032
00:17:47,669 --> 00:17:47,679
to set those things without having to
 

1033
00:17:47,679 --> 00:17:51,190
to set those things without having to
recreate the pipeline if we wanted to

1034
00:17:51,190 --> 00:17:51,200
recreate the pipeline if we wanted to
 

1035
00:17:51,200 --> 00:17:52,710
recreate the pipeline if we wanted to
change something that is not part of the

1036
00:17:52,710 --> 00:17:52,720
change something that is not part of the
 

1037
00:17:52,720 --> 00:17:54,549
change something that is not part of the
dynamic state we would actually have to

1038
00:17:54,549 --> 00:17:54,559
dynamic state we would actually have to
 

1039
00:17:54,559 --> 00:17:56,470
dynamic state we would actually have to
recreate that pipeline in order to

1040
00:17:56,470 --> 00:17:56,480
recreate that pipeline in order to
 

1041
00:17:56,480 --> 00:17:58,630
recreate that pipeline in order to
actually do that but since

1042
00:17:58,630 --> 00:17:58,640
actually do that but since
 

1043
00:17:58,640 --> 00:18:00,470
actually do that but since
we have this dynamic state

1044
00:18:00,470 --> 00:18:00,480
we have this dynamic state
 

1045
00:18:00,480 --> 00:18:02,470
we have this dynamic state
this is how we're able to actually

1046
00:18:02,470 --> 00:18:02,480
this is how we're able to actually
 

1047
00:18:02,480 --> 00:18:04,150
this is how we're able to actually
resize the window

1048
00:18:04,150 --> 00:18:04,160
resize the window
 

1049
00:18:04,160 --> 00:18:06,870
resize the window
and not have to recreate this whole

1050
00:18:06,870 --> 00:18:06,880
and not have to recreate this whole
 

1051
00:18:06,880 --> 00:18:09,270
and not have to recreate this whole
pipeline every time we do that so

1052
00:18:09,270 --> 00:18:09,280
pipeline every time we do that so
 

1053
00:18:09,280 --> 00:18:10,630
pipeline every time we do that so
dynamic state is actually a pretty

1054
00:18:10,630 --> 00:18:10,640
dynamic state is actually a pretty
 

1055
00:18:10,640 --> 00:18:12,310
dynamic state is actually a pretty
useful thing there are certain things

1056
00:18:12,310 --> 00:18:12,320
useful thing there are certain things
 

1057
00:18:12,320 --> 00:18:14,549
useful thing there are certain things
that you can actually use for that

1058
00:18:14,549 --> 00:18:14,559
that you can actually use for that
 

1059
00:18:14,559 --> 00:18:16,630
that you can actually use for that
and viewport scissor and line with are

1060
00:18:16,630 --> 00:18:16,640
and viewport scissor and line with are
 

1061
00:18:16,640 --> 00:18:17,750
and viewport scissor and line with are
going to be

1062
00:18:17,750 --> 00:18:17,760
going to be
 

1063
00:18:17,760 --> 00:18:19,029
going to be
the three things that we're going to use

1064
00:18:19,029 --> 00:18:19,039
the three things that we're going to use
 

1065
00:18:19,039 --> 00:18:20,230
the three things that we're going to use
right off the bat for that there are

1066
00:18:20,230 --> 00:18:20,240
right off the bat for that there are
 

1067
00:18:20,240 --> 00:18:21,750
right off the bat for that there are
more but those are the main ones we're

1068
00:18:21,750 --> 00:18:21,760
more but those are the main ones we're
 

1069
00:18:21,760 --> 00:18:24,470
more but those are the main ones we're
going to use for right now

1070
00:18:24,470 --> 00:18:24,480
going to use for right now
 

1071
00:18:24,480 --> 00:18:26,630
going to use for right now
dynamic state create info does pretty

1072
00:18:26,630 --> 00:18:26,640
dynamic state create info does pretty
 

1073
00:18:26,640 --> 00:18:28,630
dynamic state create info does pretty
much what you think it might where it

1074
00:18:28,630 --> 00:18:28,640
much what you think it might where it
 

1075
00:18:28,640 --> 00:18:30,630
much what you think it might where it
takes basically this information here

1076
00:18:30,630 --> 00:18:30,640
takes basically this information here
 

1077
00:18:30,640 --> 00:18:34,150
takes basically this information here
and jams it into a structure

1078
00:18:34,150 --> 00:18:34,160
and jams it into a structure
 

1079
00:18:34,160 --> 00:18:36,470
and jams it into a structure
that tells the pipeline how that stuff

1080
00:18:36,470 --> 00:18:36,480
that tells the pipeline how that stuff
 

1081
00:18:36,480 --> 00:18:38,230
that tells the pipeline how that stuff
is going to be used

1082
00:18:38,230 --> 00:18:38,240
is going to be used
 

1083
00:18:38,240 --> 00:18:40,070
is going to be used
now

1084
00:18:40,070 --> 00:18:40,080
now
 

1085
00:18:40,080 --> 00:18:41,110
now
the

1086
00:18:41,110 --> 00:18:41,120
the
 

1087
00:18:41,120 --> 00:18:43,430
the
next thing that we're going to create is

1088
00:18:43,430 --> 00:18:43,440
next thing that we're going to create is
 

1089
00:18:43,440 --> 00:18:45,510
next thing that we're going to create is
something called our vertex input and we

1090
00:18:45,510 --> 00:18:45,520
something called our vertex input and we
 

1091
00:18:45,520 --> 00:18:47,190
something called our vertex input and we
haven't really touched on vertexes too

1092
00:18:47,190 --> 00:18:47,200
haven't really touched on vertexes too
 

1093
00:18:47,200 --> 00:18:48,230
haven't really touched on vertexes too
much

1094
00:18:48,230 --> 00:18:48,240
much
 

1095
00:18:48,240 --> 00:18:50,070
much
and as we can see we have a type here we

1096
00:18:50,070 --> 00:18:50,080
and as we can see we have a type here we
 

1097
00:18:50,080 --> 00:18:52,150
and as we can see we have a type here we
have not defined

1098
00:18:52,150 --> 00:18:52,160
have not defined
 

1099
00:18:52,160 --> 00:18:53,029
have not defined
so

1100
00:18:53,029 --> 00:18:53,039
so
 

1101
00:18:53,039 --> 00:18:55,590
so
let me stop for a second and describe

1102
00:18:55,590 --> 00:18:55,600
let me stop for a second and describe
 

1103
00:18:55,600 --> 00:18:56,789
let me stop for a second and describe
what we're talking about when we say

1104
00:18:56,789 --> 00:18:56,799
what we're talking about when we say
 

1105
00:18:56,799 --> 00:18:58,950
what we're talking about when we say
vertex so a vertex

1106
00:18:58,950 --> 00:18:58,960
vertex so a vertex
 

1107
00:18:58,960 --> 00:19:02,710
vertex so a vertex
is a individual point of geometry

1108
00:19:02,710 --> 00:19:02,720
is a individual point of geometry
 

1109
00:19:02,720 --> 00:19:05,510
is a individual point of geometry
that holds various information and that

1110
00:19:05,510 --> 00:19:05,520
that holds various information and that
 

1111
00:19:05,520 --> 00:19:07,830
that holds various information and that
information tends to include not only

1112
00:19:07,830 --> 00:19:07,840
information tends to include not only
 

1113
00:19:07,840 --> 00:19:10,070
information tends to include not only
positional information so xyz to tell

1114
00:19:10,070 --> 00:19:10,080
positional information so xyz to tell
 

1115
00:19:10,080 --> 00:19:12,950
positional information so xyz to tell
you where that that point in space is

1116
00:19:12,950 --> 00:19:12,960
you where that that point in space is
 

1117
00:19:12,960 --> 00:19:15,830
you where that that point in space is
but it also holds things like your

1118
00:19:15,830 --> 00:19:15,840
but it also holds things like your
 

1119
00:19:15,840 --> 00:19:18,070
but it also holds things like your
texture mapping coordinates

1120
00:19:18,070 --> 00:19:18,080
texture mapping coordinates
 

1121
00:19:18,080 --> 00:19:21,430
texture mapping coordinates
it can hold things such as color it can

1122
00:19:21,430 --> 00:19:21,440
it can hold things such as color it can
 

1123
00:19:21,440 --> 00:19:22,950
it can hold things such as color it can
hold

1124
00:19:22,950 --> 00:19:22,960
hold
 

1125
00:19:22,960 --> 00:19:25,190
hold
lots of different information and you

1126
00:19:25,190 --> 00:19:25,200
lots of different information and you
 

1127
00:19:25,200 --> 00:19:27,350
lots of different information and you
can generally put whatever you want in

1128
00:19:27,350 --> 00:19:27,360
can generally put whatever you want in
 

1129
00:19:27,360 --> 00:19:28,390
can generally put whatever you want in
there but

1130
00:19:28,390 --> 00:19:28,400
there but
 

1131
00:19:28,400 --> 00:19:29,909
there but
keep in mind that the larger you make

1132
00:19:29,909 --> 00:19:29,919
keep in mind that the larger you make
 

1133
00:19:29,919 --> 00:19:31,909
keep in mind that the larger you make
your vertex

1134
00:19:31,909 --> 00:19:31,919
your vertex
 

1135
00:19:31,919 --> 00:19:33,270
your vertex
the larger

1136
00:19:33,270 --> 00:19:33,280
the larger
 

1137
00:19:33,280 --> 00:19:35,590
the larger
or the more information has to be pushed

1138
00:19:35,590 --> 00:19:35,600
or the more information has to be pushed
 

1139
00:19:35,600 --> 00:19:37,830
or the more information has to be pushed
to the gpu every single time you upload

1140
00:19:37,830 --> 00:19:37,840
to the gpu every single time you upload
 

1141
00:19:37,840 --> 00:19:40,549
to the gpu every single time you upload
geometry so when you upload geometry

1142
00:19:40,549 --> 00:19:40,559
geometry so when you upload geometry
 

1143
00:19:40,559 --> 00:19:43,590
geometry so when you upload geometry
it's in the form of this vertex

1144
00:19:43,590 --> 00:19:43,600
it's in the form of this vertex
 

1145
00:19:43,600 --> 00:19:45,590
it's in the form of this vertex
structure that you create

1146
00:19:45,590 --> 00:19:45,600
structure that you create
 

1147
00:19:45,600 --> 00:19:47,430
structure that you create
and in this case we're going to create

1148
00:19:47,430 --> 00:19:47,440
and in this case we're going to create
 

1149
00:19:47,440 --> 00:19:49,830
and in this case we're going to create
something called vertex 3d

1150
00:19:49,830 --> 00:19:49,840
something called vertex 3d
 

1151
00:19:49,840 --> 00:19:51,669
something called vertex 3d
and so what this is is this is basically

1152
00:19:51,669 --> 00:19:51,679
and so what this is is this is basically
 

1153
00:19:51,679 --> 00:19:53,990
and so what this is is this is basically
saying this is what that vertex kind of

1154
00:19:53,990 --> 00:19:54,000
saying this is what that vertex kind of
 

1155
00:19:54,000 --> 00:19:56,070
saying this is what that vertex kind of
looks like and how to use it

1156
00:19:56,070 --> 00:19:56,080
looks like and how to use it
 

1157
00:19:56,080 --> 00:19:58,870
looks like and how to use it
and so uh this stride right here is

1158
00:19:58,870 --> 00:19:58,880
and so uh this stride right here is
 

1159
00:19:58,880 --> 00:20:01,350
and so uh this stride right here is
basically telling us how many bytes

1160
00:20:01,350 --> 00:20:01,360
basically telling us how many bytes
 

1161
00:20:01,360 --> 00:20:03,830
basically telling us how many bytes
the vertex each vertex is and then the

1162
00:20:03,830 --> 00:20:03,840
the vertex each vertex is and then the
 

1163
00:20:03,840 --> 00:20:06,470
the vertex each vertex is and then the
input rate is basically saying the

1164
00:20:06,470 --> 00:20:06,480
input rate is basically saying the
 

1165
00:20:06,480 --> 00:20:08,950
input rate is basically saying the
input rate is one per vertex right

1166
00:20:08,950 --> 00:20:08,960
input rate is one per vertex right
 

1167
00:20:08,960 --> 00:20:11,909
input rate is one per vertex right
so uh we move to the next entry for each

1168
00:20:11,909 --> 00:20:11,919
so uh we move to the next entry for each
 

1169
00:20:11,919 --> 00:20:14,070
so uh we move to the next entry for each
individual vertex

1170
00:20:14,070 --> 00:20:14,080
individual vertex
 

1171
00:20:14,080 --> 00:20:15,669
individual vertex
so before we move on

1172
00:20:15,669 --> 00:20:15,679
so before we move on
 

1173
00:20:15,679 --> 00:20:17,590
so before we move on
we should probably go ahead and define

1174
00:20:17,590 --> 00:20:17,600
we should probably go ahead and define
 

1175
00:20:17,600 --> 00:20:19,590
we should probably go ahead and define
vertex 3d right

1176
00:20:19,590 --> 00:20:19,600
vertex 3d right
 

1177
00:20:19,600 --> 00:20:21,110
vertex 3d right
because it's definitely something that

1178
00:20:21,110 --> 00:20:21,120
because it's definitely something that
 

1179
00:20:21,120 --> 00:20:23,909
because it's definitely something that
we're going to need to know

1180
00:20:23,909 --> 00:20:23,919
we're going to need to know
 

1181
00:20:23,919 --> 00:20:25,510
we're going to need to know
so to define this we actually are going

1182
00:20:25,510 --> 00:20:25,520
so to define this we actually are going
 

1183
00:20:25,520 --> 00:20:27,590
so to define this we actually are going
to go into math types

1184
00:20:27,590 --> 00:20:27,600
to go into math types
 

1185
00:20:27,600 --> 00:20:29,830
to go into math types
so that is going to be under math

1186
00:20:29,830 --> 00:20:29,840
so that is going to be under math
 

1187
00:20:29,840 --> 00:20:31,590
so that is going to be under math
math types

1188
00:20:31,590 --> 00:20:31,600
math types
 

1189
00:20:31,600 --> 00:20:35,190
math types
and we're going to go here to the bottom

1190
00:20:35,190 --> 00:20:35,200
and we're going to go here to the bottom
 

1191
00:20:35,200 --> 00:20:38,149
and we're going to go here to the bottom
and we'll go ahead and put

1192
00:20:38,149 --> 00:20:38,159
and we'll go ahead and put
 

1193
00:20:38,159 --> 00:20:40,070
and we'll go ahead and put
our definition right there so we're

1194
00:20:40,070 --> 00:20:40,080
our definition right there so we're
 

1195
00:20:40,080 --> 00:20:41,590
our definition right there so we're
going to type def structure called

1196
00:20:41,590 --> 00:20:41,600
going to type def structure called
 

1197
00:20:41,600 --> 00:20:43,990
going to type def structure called
vertex 3d

1198
00:20:43,990 --> 00:20:44,000
vertex 3d
 

1199
00:20:44,000 --> 00:20:45,830
vertex 3d
to be called vertex 3d so we don't have

1200
00:20:45,830 --> 00:20:45,840
to be called vertex 3d so we don't have
 

1201
00:20:45,840 --> 00:20:47,430
to be called vertex 3d so we don't have
to type this

1202
00:20:47,430 --> 00:20:47,440
to type this
 

1203
00:20:47,440 --> 00:20:49,190
to type this
and then for right now all we're

1204
00:20:49,190 --> 00:20:49,200
and then for right now all we're
 

1205
00:20:49,200 --> 00:20:50,789
and then for right now all we're
actually going to store in here is

1206
00:20:50,789 --> 00:20:50,799
actually going to store in here is
 

1207
00:20:50,799 --> 00:20:53,110
actually going to store in here is
position right and like i said there are

1208
00:20:53,110 --> 00:20:53,120
position right and like i said there are
 

1209
00:20:53,120 --> 00:20:54,070
position right and like i said there are
going to be other things that we're

1210
00:20:54,070 --> 00:20:54,080
going to be other things that we're
 

1211
00:20:54,080 --> 00:20:55,830
going to be other things that we're
going to be adding to this

1212
00:20:55,830 --> 00:20:55,840
going to be adding to this
 

1213
00:20:55,840 --> 00:20:57,190
going to be adding to this
but for right now i want to keep things

1214
00:20:57,190 --> 00:20:57,200
but for right now i want to keep things
 

1215
00:20:57,200 --> 00:20:58,630
but for right now i want to keep things
simple until we actually get stuff up

1216
00:20:58,630 --> 00:20:58,640
simple until we actually get stuff up
 

1217
00:20:58,640 --> 00:20:59,909
simple until we actually get stuff up
and running and then i'll come back and

1218
00:20:59,909 --> 00:20:59,919
and running and then i'll come back and
 

1219
00:20:59,919 --> 00:21:02,630
and running and then i'll come back and
add properties to this as we go so for

1220
00:21:02,630 --> 00:21:02,640
add properties to this as we go so for
 

1221
00:21:02,640 --> 00:21:04,870
add properties to this as we go so for
right now we're just storing position

1222
00:21:04,870 --> 00:21:04,880
right now we're just storing position
 

1223
00:21:04,880 --> 00:21:05,909
right now we're just storing position
okay

1224
00:21:05,909 --> 00:21:05,919
okay
 

1225
00:21:05,919 --> 00:21:07,830
okay
so now that we have our vertex 3d we can

1226
00:21:07,830 --> 00:21:07,840
so now that we have our vertex 3d we can
 

1227
00:21:07,840 --> 00:21:09,350
so now that we have our vertex 3d we can
go back

1228
00:21:09,350 --> 00:21:09,360
go back
 

1229
00:21:09,360 --> 00:21:10,950
go back
and we need to

1230
00:21:10,950 --> 00:21:10,960
and we need to
 

1231
00:21:10,960 --> 00:21:12,230
and we need to
include

1232
00:21:12,230 --> 00:21:12,240
include
 

1233
00:21:12,240 --> 00:21:12,950
include
the

1234
00:21:12,950 --> 00:21:12,960
the
 

1235
00:21:12,960 --> 00:21:14,710
the
math types

1236
00:21:14,710 --> 00:21:14,720
math types
 

1237
00:21:14,720 --> 00:21:16,440
math types
in this file

1238
00:21:16,440 --> 00:21:16,450
in this file
 

1239
00:21:16,450 --> 00:21:17,590
in this file
[Music]

1240
00:21:17,590 --> 00:21:17,600
[Music]
 

1241
00:21:17,600 --> 00:21:18,630
[Music]
so

1242
00:21:18,630 --> 00:21:18,640
so
 

1243
00:21:18,640 --> 00:21:22,149
so
here i'll say include

1244
00:21:22,149 --> 00:21:22,159

 

1245
00:21:22,159 --> 00:21:23,350

math

1246
00:21:23,350 --> 00:21:23,360
math
 

1247
00:21:23,360 --> 00:21:27,510
math
mathtypes.h

1248
00:21:27,510 --> 00:21:27,520

 

1249
00:21:27,520 --> 00:21:29,110

and now if we go ahead and save that we

1250
00:21:29,110 --> 00:21:29,120
and now if we go ahead and save that we
 

1251
00:21:29,120 --> 00:21:31,510
and now if we go ahead and save that we
see that vertex 3d is defined

1252
00:21:31,510 --> 00:21:31,520
see that vertex 3d is defined
 

1253
00:21:31,520 --> 00:21:32,870
see that vertex 3d is defined
so the reason we take

1254
00:21:32,870 --> 00:21:32,880
so the reason we take
 

1255
00:21:32,880 --> 00:21:34,470
so the reason we take
the size of this is because this is

1256
00:21:34,470 --> 00:21:34,480
the size of this is because this is
 

1257
00:21:34,480 --> 00:21:35,590
the size of this is because this is
going to be changing we don't have to

1258
00:21:35,590 --> 00:21:35,600
going to be changing we don't have to
 

1259
00:21:35,600 --> 00:21:37,029
going to be changing we don't have to
have to come back in here every single

1260
00:21:37,029 --> 00:21:37,039
have to come back in here every single
 

1261
00:21:37,039 --> 00:21:38,470
have to come back in here every single
time and change this

1262
00:21:38,470 --> 00:21:38,480
time and change this
 

1263
00:21:38,480 --> 00:21:39,909
time and change this
although there will be parts that we

1264
00:21:39,909 --> 00:21:39,919
although there will be parts that we
 

1265
00:21:39,919 --> 00:21:41,830
although there will be parts that we
will have to come back here and change i

1266
00:21:41,830 --> 00:21:41,840
will have to come back here and change i
 

1267
00:21:41,840 --> 00:21:44,149
will have to come back here and change i
don't want this to be one of them so

1268
00:21:44,149 --> 00:21:44,159
don't want this to be one of them so
 

1269
00:21:44,159 --> 00:21:46,230
don't want this to be one of them so
we'll take the size of that in bytes and

1270
00:21:46,230 --> 00:21:46,240
we'll take the size of that in bytes and
 

1271
00:21:46,240 --> 00:21:49,990
we'll take the size of that in bytes and
use that instead

1272
00:21:49,990 --> 00:21:50,000

 

1273
00:21:50,000 --> 00:21:52,070

okay

1274
00:21:52,070 --> 00:21:52,080
okay
 

1275
00:21:52,080 --> 00:21:54,710
okay
next we have something called attributes

1276
00:21:54,710 --> 00:21:54,720
next we have something called attributes
 

1277
00:21:54,720 --> 00:21:56,630
next we have something called attributes
and this is basically how

1278
00:21:56,630 --> 00:21:56,640
and this is basically how
 

1279
00:21:56,640 --> 00:21:59,510
and this is basically how
each individual vertex is split up

1280
00:21:59,510 --> 00:21:59,520
each individual vertex is split up
 

1281
00:21:59,520 --> 00:22:04,789
each individual vertex is split up
so if we recall in our

1282
00:22:04,789 --> 00:22:04,799

 

1283
00:22:04,799 --> 00:22:06,950

our vertex shader here actually let me

1284
00:22:06,950 --> 00:22:06,960
our vertex shader here actually let me
 

1285
00:22:06,960 --> 00:22:08,870
our vertex shader here actually let me
open the one

1286
00:22:08,870 --> 00:22:08,880
open the one
 

1287
00:22:08,880 --> 00:22:11,430
open the one
here

1288
00:22:11,430 --> 00:22:11,440

 

1289
00:22:11,440 --> 00:22:14,390

we have this layout location zero in

1290
00:22:14,390 --> 00:22:14,400
we have this layout location zero in
 

1291
00:22:14,400 --> 00:22:16,630
we have this layout location zero in
vec3 imposition

1292
00:22:16,630 --> 00:22:16,640
vec3 imposition
 

1293
00:22:16,640 --> 00:22:19,510
vec3 imposition
this is actually an attribute so what we

1294
00:22:19,510 --> 00:22:19,520
this is actually an attribute so what we
 

1295
00:22:19,520 --> 00:22:21,750
this is actually an attribute so what we
are saying here is uh the location zero

1296
00:22:21,750 --> 00:22:21,760
are saying here is uh the location zero
 

1297
00:22:21,760 --> 00:22:23,029
are saying here is uh the location zero
equals zero

1298
00:22:23,029 --> 00:22:23,039
equals zero
 

1299
00:22:23,039 --> 00:22:24,470
equals zero
is basically saying this is the first

1300
00:22:24,470 --> 00:22:24,480
is basically saying this is the first
 

1301
00:22:24,480 --> 00:22:27,350
is basically saying this is the first
attribute and it is of type vector3 so

1302
00:22:27,350 --> 00:22:27,360
attribute and it is of type vector3 so
 

1303
00:22:27,360 --> 00:22:29,029
attribute and it is of type vector3 so
the shader actually knows how to

1304
00:22:29,029 --> 00:22:29,039
the shader actually knows how to
 

1305
00:22:29,039 --> 00:22:31,350
the shader actually knows how to
interpret that so every time we add an

1306
00:22:31,350 --> 00:22:31,360
interpret that so every time we add an
 

1307
00:22:31,360 --> 00:22:32,710
interpret that so every time we add an
attribute

1308
00:22:32,710 --> 00:22:32,720
attribute
 

1309
00:22:32,720 --> 00:22:34,470
attribute
we are going to be adding one of these

1310
00:22:34,470 --> 00:22:34,480
we are going to be adding one of these
 

1311
00:22:34,480 --> 00:22:36,870
we are going to be adding one of these
things and an attribute is loaded as

1312
00:22:36,870 --> 00:22:36,880
things and an attribute is loaded as
 

1313
00:22:36,880 --> 00:22:39,190
things and an attribute is loaded as
part of a vertex so

1314
00:22:39,190 --> 00:22:39,200
part of a vertex so
 

1315
00:22:39,200 --> 00:22:41,029
part of a vertex so
this is just a way for us to be able to

1316
00:22:41,029 --> 00:22:41,039
this is just a way for us to be able to
 

1317
00:22:41,039 --> 00:22:43,270
this is just a way for us to be able to
split these things up programmatically

1318
00:22:43,270 --> 00:22:43,280
split these things up programmatically
 

1319
00:22:43,280 --> 00:22:44,710
split these things up programmatically
so that the shader actually knows what

1320
00:22:44,710 --> 00:22:44,720
so that the shader actually knows what
 

1321
00:22:44,720 --> 00:22:46,549
so that the shader actually knows what
it's dealing with right and so we're

1322
00:22:46,549 --> 00:22:46,559
it's dealing with right and so we're
 

1323
00:22:46,559 --> 00:22:48,230
it's dealing with right and so we're
actually going to be including an

1324
00:22:48,230 --> 00:22:48,240
actually going to be including an
 

1325
00:22:48,240 --> 00:22:50,870
actually going to be including an
attribute count as well as attributes

1326
00:22:50,870 --> 00:22:50,880
attribute count as well as attributes
 

1327
00:22:50,880 --> 00:22:53,110
attribute count as well as attributes
listing to say how this guy is actually

1328
00:22:53,110 --> 00:22:53,120
listing to say how this guy is actually
 

1329
00:22:53,120 --> 00:22:54,789
listing to say how this guy is actually
split up okay we should probably make

1330
00:22:54,789 --> 00:22:54,799
split up okay we should probably make
 

1331
00:22:54,799 --> 00:22:56,470
split up okay we should probably make
this guy configurable too but for right

1332
00:22:56,470 --> 00:22:56,480
this guy configurable too but for right
 

1333
00:22:56,480 --> 00:22:58,390
this guy configurable too but for right
now i'm not going to worry about it

1334
00:22:58,390 --> 00:22:58,400
now i'm not going to worry about it
 

1335
00:22:58,400 --> 00:23:01,510
now i'm not going to worry about it
okay so that is what attributes are on a

1336
00:23:01,510 --> 00:23:01,520
okay so that is what attributes are on a
 

1337
00:23:01,520 --> 00:23:03,110
okay so that is what attributes are on a
high level

1338
00:23:03,110 --> 00:23:03,120
high level
 

1339
00:23:03,120 --> 00:23:05,909
high level
and how they're used

1340
00:23:05,909 --> 00:23:05,919
and how they're used
 

1341
00:23:05,919 --> 00:23:06,950
and how they're used
okay

1342
00:23:06,950 --> 00:23:06,960
okay
 

1343
00:23:06,960 --> 00:23:09,270
okay
so the next thing is we have to define

1344
00:23:09,270 --> 00:23:09,280
so the next thing is we have to define
 

1345
00:23:09,280 --> 00:23:11,430
so the next thing is we have to define
input assembly and that is basically

1346
00:23:11,430 --> 00:23:11,440
input assembly and that is basically
 

1347
00:23:11,440 --> 00:23:13,990
input assembly and that is basically
what takes this information and

1348
00:23:13,990 --> 00:23:14,000
what takes this information and
 

1349
00:23:14,000 --> 00:23:15,909
what takes this information and
assembles it into a form that the vertex

1350
00:23:15,909 --> 00:23:15,919
assembles it into a form that the vertex
 

1351
00:23:15,919 --> 00:23:17,909
assembles it into a form that the vertex
shader can then use

1352
00:23:17,909 --> 00:23:17,919
shader can then use
 

1353
00:23:17,919 --> 00:23:19,990
shader can then use
so in this case what we're going to do

1354
00:23:19,990 --> 00:23:20,000
so in this case what we're going to do
 

1355
00:23:20,000 --> 00:23:21,909
so in this case what we're going to do
is we're just going to say that the

1356
00:23:21,909 --> 00:23:21,919
is we're just going to say that the
 

1357
00:23:21,919 --> 00:23:24,470
is we're just going to say that the
topology type that we want to use is

1358
00:23:24,470 --> 00:23:24,480
topology type that we want to use is
 

1359
00:23:24,480 --> 00:23:27,110
topology type that we want to use is
primitive topology triangle list which

1360
00:23:27,110 --> 00:23:27,120
primitive topology triangle list which
 

1361
00:23:27,120 --> 00:23:29,350
primitive topology triangle list which
is basically saying all of our geometry

1362
00:23:29,350 --> 00:23:29,360
is basically saying all of our geometry
 

1363
00:23:29,360 --> 00:23:31,270
is basically saying all of our geometry
is expected to be triangles now we could

1364
00:23:31,270 --> 00:23:31,280
is expected to be triangles now we could
 

1365
00:23:31,280 --> 00:23:33,029
is expected to be triangles now we could
use quads if we wanted to we might do

1366
00:23:33,029 --> 00:23:33,039
use quads if we wanted to we might do
 

1367
00:23:33,039 --> 00:23:35,110
use quads if we wanted to we might do
that

1368
00:23:35,110 --> 00:23:35,120
that
 

1369
00:23:35,120 --> 00:23:37,029
that
in the future but at least for now

1370
00:23:37,029 --> 00:23:37,039
in the future but at least for now
 

1371
00:23:37,039 --> 00:23:38,470
in the future but at least for now
everything we're going to do is with

1372
00:23:38,470 --> 00:23:38,480
everything we're going to do is with
 

1373
00:23:38,480 --> 00:23:40,230
everything we're going to do is with
triangles

1374
00:23:40,230 --> 00:23:40,240
triangles
 

1375
00:23:40,240 --> 00:23:43,190
triangles
okay and then

1376
00:23:43,190 --> 00:23:43,200
okay and then
 

1377
00:23:43,200 --> 00:23:46,070
okay and then
our pipeline layout

1378
00:23:46,070 --> 00:23:46,080
our pipeline layout
 

1379
00:23:46,080 --> 00:23:48,789
our pipeline layout
is basically going to start off by

1380
00:23:48,789 --> 00:23:48,799
is basically going to start off by
 

1381
00:23:48,799 --> 00:23:50,710
is basically going to start off by
just setting the vk structure type and

1382
00:23:50,710 --> 00:23:50,720
just setting the vk structure type and
 

1383
00:23:50,720 --> 00:23:52,710
just setting the vk structure type and
zeroing out the rest

1384
00:23:52,710 --> 00:23:52,720
zeroing out the rest
 

1385
00:23:52,720 --> 00:23:54,710
zeroing out the rest
the next thing that we're going to do is

1386
00:23:54,710 --> 00:23:54,720
the next thing that we're going to do is
 

1387
00:23:54,720 --> 00:23:56,950
the next thing that we're going to do is
we are going to utilize something called

1388
00:23:56,950 --> 00:23:56,960
we are going to utilize something called
 

1389
00:23:56,960 --> 00:23:58,870
we are going to utilize something called
descriptor sets or at least the layouts

1390
00:23:58,870 --> 00:23:58,880
descriptor sets or at least the layouts
 

1391
00:23:58,880 --> 00:24:00,390
descriptor sets or at least the layouts
of that

1392
00:24:00,390 --> 00:24:00,400
of that
 

1393
00:24:00,400 --> 00:24:02,310
of that
and i'll come back to this but this

1394
00:24:02,310 --> 00:24:02,320
and i'll come back to this but this
 

1395
00:24:02,320 --> 00:24:03,590
and i'll come back to this but this
basically has to do with something

1396
00:24:03,590 --> 00:24:03,600
basically has to do with something
 

1397
00:24:03,600 --> 00:24:05,110
basically has to do with something
called uniforms

1398
00:24:05,110 --> 00:24:05,120
called uniforms
 

1399
00:24:05,120 --> 00:24:06,710
called uniforms
which are various parameters that we can

1400
00:24:06,710 --> 00:24:06,720
which are various parameters that we can
 

1401
00:24:06,720 --> 00:24:09,269
which are various parameters that we can
pass to our

1402
00:24:09,269 --> 00:24:09,279
pass to our
 

1403
00:24:09,279 --> 00:24:10,470
pass to our
program

1404
00:24:10,470 --> 00:24:10,480
program
 

1405
00:24:10,480 --> 00:24:13,029
program
that are not necessarily vertex specific

1406
00:24:13,029 --> 00:24:13,039
that are not necessarily vertex specific
 

1407
00:24:13,039 --> 00:24:15,830
that are not necessarily vertex specific
but that can be

1408
00:24:15,830 --> 00:24:15,840

 

1409
00:24:15,840 --> 00:24:17,269

that can be passed in to give us

1410
00:24:17,269 --> 00:24:17,279
that can be passed in to give us
 

1411
00:24:17,279 --> 00:24:19,510
that can be passed in to give us
additional information that we need

1412
00:24:19,510 --> 00:24:19,520
additional information that we need
 

1413
00:24:19,520 --> 00:24:21,190
additional information that we need
for the render

1414
00:24:21,190 --> 00:24:21,200
for the render
 

1415
00:24:21,200 --> 00:24:23,430
for the render
okay and so

1416
00:24:23,430 --> 00:24:23,440
okay and so
 

1417
00:24:23,440 --> 00:24:26,549
okay and so
what we wind up with is all of this

1418
00:24:26,549 --> 00:24:26,559
what we wind up with is all of this
 

1419
00:24:26,559 --> 00:24:28,789
what we wind up with is all of this
information that we take here

1420
00:24:28,789 --> 00:24:28,799
information that we take here
 

1421
00:24:28,799 --> 00:24:30,830
information that we take here
winds up being part of

1422
00:24:30,830 --> 00:24:30,840
winds up being part of
 

1423
00:24:30,840 --> 00:24:34,230
winds up being part of
a pipeline layout so this here

1424
00:24:34,230 --> 00:24:34,240
a pipeline layout so this here
 

1425
00:24:34,240 --> 00:24:36,710
a pipeline layout so this here
determines what the format

1426
00:24:36,710 --> 00:24:36,720
determines what the format
 

1427
00:24:36,720 --> 00:24:38,870
determines what the format
of our pipeline will be

1428
00:24:38,870 --> 00:24:38,880
of our pipeline will be
 

1429
00:24:38,880 --> 00:24:42,549
of our pipeline will be
so the next logical step is to call

1430
00:24:42,549 --> 00:24:42,559
so the next logical step is to call
 

1431
00:24:42,559 --> 00:24:44,789
so the next logical step is to call
vk create pipeline layout

1432
00:24:44,789 --> 00:24:44,799
vk create pipeline layout
 

1433
00:24:44,799 --> 00:24:46,549
vk create pipeline layout
and we basically just pass

1434
00:24:46,549 --> 00:24:46,559
and we basically just pass
 

1435
00:24:46,559 --> 00:24:49,430
and we basically just pass
all of the stuff that we just wound up

1436
00:24:49,430 --> 00:24:49,440
all of the stuff that we just wound up
 

1437
00:24:49,440 --> 00:24:51,029
all of the stuff that we just wound up
actually creating

1438
00:24:51,029 --> 00:24:51,039
actually creating
 

1439
00:24:51,039 --> 00:24:52,310
actually creating
so

1440
00:24:52,310 --> 00:24:52,320
so
 

1441
00:24:52,320 --> 00:24:55,110
so
our pipeline layout create info here um

1442
00:24:55,110 --> 00:24:55,120
our pipeline layout create info here um
 

1443
00:24:55,120 --> 00:24:56,630
our pipeline layout create info here um
is basically the glue that holds all

1444
00:24:56,630 --> 00:24:56,640
is basically the glue that holds all
 

1445
00:24:56,640 --> 00:24:58,870
is basically the glue that holds all
that stuff together okay

1446
00:24:58,870 --> 00:24:58,880
that stuff together okay
 

1447
00:24:58,880 --> 00:25:01,110
that stuff together okay
and so we create that

1448
00:25:01,110 --> 00:25:01,120
and so we create that
 

1449
00:25:01,120 --> 00:25:03,830
and so we create that
and then we actually create our pipeline

1450
00:25:03,830 --> 00:25:03,840
and then we actually create our pipeline
 

1451
00:25:03,840 --> 00:25:04,789
and then we actually create our pipeline
itself

1452
00:25:04,789 --> 00:25:04,799
itself
 

1453
00:25:04,799 --> 00:25:06,390
itself
below here

1454
00:25:06,390 --> 00:25:06,400
below here
 

1455
00:25:06,400 --> 00:25:08,789
below here
starting off with a create info just as

1456
00:25:08,789 --> 00:25:08,799
starting off with a create info just as
 

1457
00:25:08,799 --> 00:25:10,310
starting off with a create info just as
you do for a lot of other things in

1458
00:25:10,310 --> 00:25:10,320
you do for a lot of other things in
 

1459
00:25:10,320 --> 00:25:11,510
you do for a lot of other things in
vulcan

1460
00:25:11,510 --> 00:25:11,520
vulcan
 

1461
00:25:11,520 --> 00:25:13,269
vulcan
and so here is where we pass things like

1462
00:25:13,269 --> 00:25:13,279
and so here is where we pass things like
 

1463
00:25:13,279 --> 00:25:15,029
and so here is where we pass things like
what the stage count is what those

1464
00:25:15,029 --> 00:25:15,039
what the stage count is what those
 

1465
00:25:15,039 --> 00:25:17,110
what the stage count is what those
individual stages are

1466
00:25:17,110 --> 00:25:17,120
individual stages are
 

1467
00:25:17,120 --> 00:25:19,430
individual stages are
the vertex input the

1468
00:25:19,430 --> 00:25:19,440
the vertex input the
 

1469
00:25:19,440 --> 00:25:21,350
the vertex input the
input assembly state

1470
00:25:21,350 --> 00:25:21,360
input assembly state
 

1471
00:25:21,360 --> 00:25:22,630
input assembly state
so all these other things that we

1472
00:25:22,630 --> 00:25:22,640
so all these other things that we
 

1473
00:25:22,640 --> 00:25:25,430
so all these other things that we
created above right

1474
00:25:25,430 --> 00:25:25,440
created above right
 

1475
00:25:25,440 --> 00:25:27,669
created above right
we are going to

1476
00:25:27,669 --> 00:25:27,679
we are going to
 

1477
00:25:27,679 --> 00:25:29,350
we are going to
pass a bunch of other properties such as

1478
00:25:29,350 --> 00:25:29,360
pass a bunch of other properties such as
 

1479
00:25:29,360 --> 00:25:31,190
pass a bunch of other properties such as
our viewport state our rasterization

1480
00:25:31,190 --> 00:25:31,200
our viewport state our rasterization
 

1481
00:25:31,200 --> 00:25:33,510
our viewport state our rasterization
multi-sample so this is where all those

1482
00:25:33,510 --> 00:25:33,520
multi-sample so this is where all those
 

1483
00:25:33,520 --> 00:25:36,149
multi-sample so this is where all those
pieces above are actually used

1484
00:25:36,149 --> 00:25:36,159
pieces above are actually used
 

1485
00:25:36,159 --> 00:25:37,350
pieces above are actually used
and then tessellation state we're

1486
00:25:37,350 --> 00:25:37,360
and then tessellation state we're
 

1487
00:25:37,360 --> 00:25:38,549
and then tessellation state we're
actually not using so i'm just hard

1488
00:25:38,549 --> 00:25:38,559
actually not using so i'm just hard
 

1489
00:25:38,559 --> 00:25:40,310
actually not using so i'm just hard
coding that to zero just to be explicit

1490
00:25:40,310 --> 00:25:40,320
coding that to zero just to be explicit
 

1491
00:25:40,320 --> 00:25:42,390
coding that to zero just to be explicit
about it

1492
00:25:42,390 --> 00:25:42,400
about it
 

1493
00:25:42,400 --> 00:25:44,310
about it
and then

1494
00:25:44,310 --> 00:25:44,320
and then
 

1495
00:25:44,320 --> 00:25:46,549
and then
the pipeline layout we're going to use

1496
00:25:46,549 --> 00:25:46,559
the pipeline layout we're going to use
 

1497
00:25:46,559 --> 00:25:49,510
the pipeline layout we're going to use
is the layout that we just defined here

1498
00:25:49,510 --> 00:25:49,520
is the layout that we just defined here
 

1499
00:25:49,520 --> 00:25:51,110
is the layout that we just defined here
right so we create this

1500
00:25:51,110 --> 00:25:51,120
right so we create this
 

1501
00:25:51,120 --> 00:25:54,149
right so we create this
there use it here

1502
00:25:54,149 --> 00:25:54,159
there use it here
 

1503
00:25:54,159 --> 00:25:56,149
there use it here
and then we are going to add a couple

1504
00:25:56,149 --> 00:25:56,159
and then we are going to add a couple
 

1505
00:25:56,159 --> 00:25:58,149
and then we are going to add a couple
more things to this so we have the

1506
00:25:58,149 --> 00:25:58,159
more things to this so we have the
 

1507
00:25:58,159 --> 00:26:01,269
more things to this so we have the
render pass which is passed in um

1508
00:26:01,269 --> 00:26:01,279
render pass which is passed in um
 

1509
00:26:01,279 --> 00:26:03,190
render pass which is passed in um
just passed in to us

1510
00:26:03,190 --> 00:26:03,200
just passed in to us
 

1511
00:26:03,200 --> 00:26:04,950
just passed in to us
any subpasses that we use we're not

1512
00:26:04,950 --> 00:26:04,960
any subpasses that we use we're not
 

1513
00:26:04,960 --> 00:26:06,340
any subpasses that we use we're not
using subpasses just yet

1514
00:26:06,340 --> 00:26:06,350
using subpasses just yet
 

1515
00:26:06,350 --> 00:26:07,510
using subpasses just yet
[Music]

1516
00:26:07,510 --> 00:26:07,520
[Music]
 

1517
00:26:07,520 --> 00:26:09,909
[Music]
and then we don't have base pipelines or

1518
00:26:09,909 --> 00:26:09,919
and then we don't have base pipelines or
 

1519
00:26:09,919 --> 00:26:11,269
and then we don't have base pipelines or
base pipeline

1520
00:26:11,269 --> 00:26:11,279
base pipeline
 

1521
00:26:11,279 --> 00:26:13,430
base pipeline
indices so we're just sort of nulling

1522
00:26:13,430 --> 00:26:13,440
indices so we're just sort of nulling
 

1523
00:26:13,440 --> 00:26:15,669
indices so we're just sort of nulling
that out okay

1524
00:26:15,669 --> 00:26:15,679
that out okay
 

1525
00:26:15,679 --> 00:26:18,310
that out okay
and so at this point we're finally ready

1526
00:26:18,310 --> 00:26:18,320
and so at this point we're finally ready
 

1527
00:26:18,320 --> 00:26:20,789
and so at this point we're finally ready
to create our pipeline

1528
00:26:20,789 --> 00:26:20,799
to create our pipeline
 

1529
00:26:20,799 --> 00:26:24,710
to create our pipeline
and uh this just is a call to vk create

1530
00:26:24,710 --> 00:26:24,720
and uh this just is a call to vk create
 

1531
00:26:24,720 --> 00:26:26,230
and uh this just is a call to vk create
graphics pipelines you'll note that this

1532
00:26:26,230 --> 00:26:26,240
graphics pipelines you'll note that this
 

1533
00:26:26,240 --> 00:26:27,590
graphics pipelines you'll note that this
is plural because you can create more

1534
00:26:27,590 --> 00:26:27,600
is plural because you can create more
 

1535
00:26:27,600 --> 00:26:28,710
is plural because you can create more
than one

1536
00:26:28,710 --> 00:26:28,720
than one
 

1537
00:26:28,720 --> 00:26:30,870
than one
so if you were to create uh

1538
00:26:30,870 --> 00:26:30,880
so if you were to create uh
 

1539
00:26:30,880 --> 00:26:32,630
so if you were to create uh
if you wanted to you could create two

1540
00:26:32,630 --> 00:26:32,640
if you wanted to you could create two
 

1541
00:26:32,640 --> 00:26:34,310
if you wanted to you could create two
here and just have one

1542
00:26:34,310 --> 00:26:34,320
here and just have one
 

1543
00:26:34,320 --> 00:26:35,269
here and just have one
be

1544
00:26:35,269 --> 00:26:35,279
be
 

1545
00:26:35,279 --> 00:26:37,110
be
wireframe and the other not be wireframe

1546
00:26:37,110 --> 00:26:37,120
wireframe and the other not be wireframe
 

1547
00:26:37,120 --> 00:26:38,470
wireframe and the other not be wireframe
for example

1548
00:26:38,470 --> 00:26:38,480
for example
 

1549
00:26:38,480 --> 00:26:39,750
for example
and you could certainly use this to do

1550
00:26:39,750 --> 00:26:39,760
and you could certainly use this to do
 

1551
00:26:39,760 --> 00:26:42,470
and you could certainly use this to do
that we're just going to be creating one

1552
00:26:42,470 --> 00:26:42,480
that we're just going to be creating one
 

1553
00:26:42,480 --> 00:26:45,990
that we're just going to be creating one
passing the info and then

1554
00:26:45,990 --> 00:26:46,000
passing the info and then
 

1555
00:26:46,000 --> 00:26:47,750
passing the info and then
obviously just setting

1556
00:26:47,750 --> 00:26:47,760
obviously just setting
 

1557
00:26:47,760 --> 00:26:49,830
obviously just setting
our pipeline handle

1558
00:26:49,830 --> 00:26:49,840
our pipeline handle
 

1559
00:26:49,840 --> 00:26:51,190
our pipeline handle
to that

1560
00:26:51,190 --> 00:26:51,200
to that
 

1561
00:26:51,200 --> 00:26:53,350
to that
so we're going to take the result of

1562
00:26:53,350 --> 00:26:53,360
so we're going to take the result of
 

1563
00:26:53,360 --> 00:26:54,310
so we're going to take the result of
that

1564
00:26:54,310 --> 00:26:54,320
that
 

1565
00:26:54,320 --> 00:26:58,230
that
and we are going to double check it

1566
00:26:58,230 --> 00:26:58,240
and we are going to double check it
 

1567
00:26:58,240 --> 00:26:59,830
and we are going to double check it
against success

1568
00:26:59,830 --> 00:26:59,840
against success
 

1569
00:26:59,840 --> 00:27:01,909
against success
and if it is a success then we're going

1570
00:27:01,909 --> 00:27:01,919
and if it is a success then we're going
 

1571
00:27:01,919 --> 00:27:03,750
and if it is a success then we're going
to go ahead

1572
00:27:03,750 --> 00:27:03,760
to go ahead
 

1573
00:27:03,760 --> 00:27:05,750
to go ahead
and return true

1574
00:27:05,750 --> 00:27:05,760
and return true
 

1575
00:27:05,760 --> 00:27:07,750
and return true
if for some reason we have an error we

1576
00:27:07,750 --> 00:27:07,760
if for some reason we have an error we
 

1577
00:27:07,760 --> 00:27:09,430
if for some reason we have an error we
are actually going to

1578
00:27:09,430 --> 00:27:09,440
are actually going to
 

1579
00:27:09,440 --> 00:27:11,269
are actually going to
bleat about that here

1580
00:27:11,269 --> 00:27:11,279
bleat about that here
 

1581
00:27:11,279 --> 00:27:13,430
bleat about that here
saying um we failed and then with what

1582
00:27:13,430 --> 00:27:13,440
saying um we failed and then with what
 

1583
00:27:13,440 --> 00:27:15,190
saying um we failed and then with what
error and get the vulcan error string

1584
00:27:15,190 --> 00:27:15,200
error and get the vulcan error string
 

1585
00:27:15,200 --> 00:27:17,430
error and get the vulcan error string
here okay

1586
00:27:17,430 --> 00:27:17,440
here okay
 

1587
00:27:17,440 --> 00:27:19,430
here okay
and that is all there is in terms of

1588
00:27:19,430 --> 00:27:19,440
and that is all there is in terms of
 

1589
00:27:19,440 --> 00:27:21,750
and that is all there is in terms of
actual pipeline creation it's it's more

1590
00:27:21,750 --> 00:27:21,760
actual pipeline creation it's it's more
 

1591
00:27:21,760 --> 00:27:23,350
actual pipeline creation it's it's more
just filling out structs than anything

1592
00:27:23,350 --> 00:27:23,360
just filling out structs than anything
 

1593
00:27:23,360 --> 00:27:24,789
just filling out structs than anything
else there's not really

1594
00:27:24,789 --> 00:27:24,799
else there's not really
 

1595
00:27:24,799 --> 00:27:25,669
else there's not really
much

1596
00:27:25,669 --> 00:27:25,679
much
 

1597
00:27:25,679 --> 00:27:28,710
much
if any logic in here

1598
00:27:28,710 --> 00:27:28,720
if any logic in here
 

1599
00:27:28,720 --> 00:27:30,149
if any logic in here
so uh

1600
00:27:30,149 --> 00:27:30,159
so uh
 

1601
00:27:30,159 --> 00:27:31,909
so uh
the only other thing that we really need

1602
00:27:31,909 --> 00:27:31,919
the only other thing that we really need
 

1603
00:27:31,919 --> 00:27:33,909
the only other thing that we really need
to fill out is the destroy which i'm

1604
00:27:33,909 --> 00:27:33,919
to fill out is the destroy which i'm
 

1605
00:27:33,919 --> 00:27:35,190
to fill out is the destroy which i'm
actually just going to kind of plop in

1606
00:27:35,190 --> 00:27:35,200
actually just going to kind of plop in
 

1607
00:27:35,200 --> 00:27:37,110
actually just going to kind of plop in
here all at once because it's pretty

1608
00:27:37,110 --> 00:27:37,120
here all at once because it's pretty
 

1609
00:27:37,120 --> 00:27:39,510
here all at once because it's pretty
straightforward stuff

1610
00:27:39,510 --> 00:27:39,520
straightforward stuff
 

1611
00:27:39,520 --> 00:27:41,110
straightforward stuff
so basically we just check to make sure

1612
00:27:41,110 --> 00:27:41,120
so basically we just check to make sure
 

1613
00:27:41,120 --> 00:27:42,630
so basically we just check to make sure
the pipeline exists if there's a handle

1614
00:27:42,630 --> 00:27:42,640
the pipeline exists if there's a handle
 

1615
00:27:42,640 --> 00:27:45,669
the pipeline exists if there's a handle
to it destroy it and then set it to zero

1616
00:27:45,669 --> 00:27:45,679
to it destroy it and then set it to zero
 

1617
00:27:45,679 --> 00:27:47,590
to it destroy it and then set it to zero
and then also make sure to destroy the

1618
00:27:47,590 --> 00:27:47,600
and then also make sure to destroy the
 

1619
00:27:47,600 --> 00:27:49,269
and then also make sure to destroy the
pipeline layout that we

1620
00:27:49,269 --> 00:27:49,279
pipeline layout that we
 

1621
00:27:49,279 --> 00:27:51,269
pipeline layout that we
stored as well and that's that's really

1622
00:27:51,269 --> 00:27:51,279
stored as well and that's that's really
 

1623
00:27:51,279 --> 00:27:52,520
stored as well and that's that's really
it right

1624
00:27:52,520 --> 00:27:52,530
it right
 

1625
00:27:52,530 --> 00:27:53,590
it right
[Music]

1626
00:27:53,590 --> 00:27:53,600
[Music]
 

1627
00:27:53,600 --> 00:27:55,510
[Music]
that's all there is to the destruction

1628
00:27:55,510 --> 00:27:55,520
that's all there is to the destruction
 

1629
00:27:55,520 --> 00:27:57,909
that's all there is to the destruction
of a pipeline

1630
00:27:57,909 --> 00:27:57,919
of a pipeline
 

1631
00:27:57,919 --> 00:28:00,549
of a pipeline
and then last but not least we have the

1632
00:28:00,549 --> 00:28:00,559
and then last but not least we have the
 

1633
00:28:00,559 --> 00:28:03,750
and then last but not least we have the
pipeline bind which is just a simple one

1634
00:28:03,750 --> 00:28:03,760
pipeline bind which is just a simple one
 

1635
00:28:03,760 --> 00:28:06,470
pipeline bind which is just a simple one
liner to vk command by bind pipeline

1636
00:28:06,470 --> 00:28:06,480
liner to vk command by bind pipeline
 

1637
00:28:06,480 --> 00:28:08,310
liner to vk command by bind pipeline
right so this is called from within the

1638
00:28:08,310 --> 00:28:08,320
right so this is called from within the
 

1639
00:28:08,320 --> 00:28:10,630
right so this is called from within the
context of a command buffer the bind

1640
00:28:10,630 --> 00:28:10,640
context of a command buffer the bind
 

1641
00:28:10,640 --> 00:28:12,789
context of a command buffer the bind
point uh which we will get to when we

1642
00:28:12,789 --> 00:28:12,799
point uh which we will get to when we
 

1643
00:28:12,799 --> 00:28:14,870
point uh which we will get to when we
actually set this up is passed through

1644
00:28:14,870 --> 00:28:14,880
actually set this up is passed through
 

1645
00:28:14,880 --> 00:28:17,190
actually set this up is passed through
and then obviously the pipeline handle

1646
00:28:17,190 --> 00:28:17,200
and then obviously the pipeline handle
 

1647
00:28:17,200 --> 00:28:18,389
and then obviously the pipeline handle
okay

1648
00:28:18,389 --> 00:28:18,399
okay
 

1649
00:28:18,399 --> 00:28:20,389
okay
and so uh there's a lot of information

1650
00:28:20,389 --> 00:28:20,399
and so uh there's a lot of information
 

1651
00:28:20,399 --> 00:28:23,430
and so uh there's a lot of information
here uh and unfortunately if i were to

1652
00:28:23,430 --> 00:28:23,440
here uh and unfortunately if i were to
 

1653
00:28:23,440 --> 00:28:25,430
here uh and unfortunately if i were to
cover all of it

1654
00:28:25,430 --> 00:28:25,440
cover all of it
 

1655
00:28:25,440 --> 00:28:27,110
cover all of it
we would be here for

1656
00:28:27,110 --> 00:28:27,120
we would be here for
 

1657
00:28:27,120 --> 00:28:28,630
we would be here for
probably another hour

1658
00:28:28,630 --> 00:28:28,640
probably another hour
 

1659
00:28:28,640 --> 00:28:29,590
probably another hour
so

1660
00:28:29,590 --> 00:28:29,600
so
 

1661
00:28:29,600 --> 00:28:31,350
so
i would say this is a good opportunity

1662
00:28:31,350 --> 00:28:31,360
i would say this is a good opportunity
 

1663
00:28:31,360 --> 00:28:33,510
i would say this is a good opportunity
to have a read through the spec on the

1664
00:28:33,510 --> 00:28:33,520
to have a read through the spec on the
 

1665
00:28:33,520 --> 00:28:35,669
to have a read through the spec on the
vulcan pipeline and see what some of

1666
00:28:35,669 --> 00:28:35,679
vulcan pipeline and see what some of
 

1667
00:28:35,679 --> 00:28:37,750
vulcan pipeline and see what some of
these properties in here

1668
00:28:37,750 --> 00:28:37,760
these properties in here
 

1669
00:28:37,760 --> 00:28:39,510
these properties in here
do and become familiar with them because

1670
00:28:39,510 --> 00:28:39,520
do and become familiar with them because
 

1671
00:28:39,520 --> 00:28:40,710
do and become familiar with them because
we're actually going to be coming back

1672
00:28:40,710 --> 00:28:40,720
we're actually going to be coming back
 

1673
00:28:40,720 --> 00:28:43,269
we're actually going to be coming back
in here and changing some of this stuff

1674
00:28:43,269 --> 00:28:43,279
in here and changing some of this stuff
 

1675
00:28:43,279 --> 00:28:45,590
in here and changing some of this stuff
and so be good a good idea for you guys

1676
00:28:45,590 --> 00:28:45,600
and so be good a good idea for you guys
 

1677
00:28:45,600 --> 00:28:47,830
and so be good a good idea for you guys
to sort of you know get used to reading

1678
00:28:47,830 --> 00:28:47,840
to sort of you know get used to reading
 

1679
00:28:47,840 --> 00:28:49,990
to sort of you know get used to reading
the documentation and and fully

1680
00:28:49,990 --> 00:28:50,000
the documentation and and fully
 

1681
00:28:50,000 --> 00:28:51,590
the documentation and and fully
understanding

1682
00:28:51,590 --> 00:28:51,600
understanding
 

1683
00:28:51,600 --> 00:28:53,669
understanding
everything that is is being said here

1684
00:28:53,669 --> 00:28:53,679
everything that is is being said here
 

1685
00:28:53,679 --> 00:28:55,669
everything that is is being said here
okay

1686
00:28:55,669 --> 00:28:55,679
okay
 

1687
00:28:55,679 --> 00:29:00,470
okay
all right so that is the pipeline

1688
00:29:00,470 --> 00:29:00,480
all right so that is the pipeline
 

1689
00:29:00,480 --> 00:29:01,909
all right so that is the pipeline
so now that we

1690
00:29:01,909 --> 00:29:01,919
so now that we
 

1691
00:29:01,919 --> 00:29:02,710
so now that we
have

1692
00:29:02,710 --> 00:29:02,720
have
 

1693
00:29:02,720 --> 00:29:04,549
have
a interface here to actually create the

1694
00:29:04,549 --> 00:29:04,559
a interface here to actually create the
 

1695
00:29:04,559 --> 00:29:05,830
a interface here to actually create the
pipeline

1696
00:29:05,830 --> 00:29:05,840
pipeline
 

1697
00:29:05,840 --> 00:29:07,669
pipeline
let's go back to our shader

1698
00:29:07,669 --> 00:29:07,679
let's go back to our shader
 

1699
00:29:07,679 --> 00:29:09,110
let's go back to our shader
and we'll actually start setting this

1700
00:29:09,110 --> 00:29:09,120
and we'll actually start setting this
 

1701
00:29:09,120 --> 00:29:10,230
and we'll actually start setting this
stuff up

1702
00:29:10,230 --> 00:29:10,240
stuff up
 

1703
00:29:10,240 --> 00:29:12,389
stuff up
okay so the first thing i'm going to do

1704
00:29:12,389 --> 00:29:12,399
okay so the first thing i'm going to do
 

1705
00:29:12,399 --> 00:29:14,230
okay so the first thing i'm going to do
is put a to-do here for descriptors

1706
00:29:14,230 --> 00:29:14,240
is put a to-do here for descriptors
 

1707
00:29:14,240 --> 00:29:16,630
is put a to-do here for descriptors
because we're not actually immediately

1708
00:29:16,630 --> 00:29:16,640
because we're not actually immediately
 

1709
00:29:16,640 --> 00:29:17,909
because we're not actually immediately
going to use those although we are going

1710
00:29:17,909 --> 00:29:17,919
going to use those although we are going
 

1711
00:29:17,919 --> 00:29:19,909
going to use those although we are going
to be using them very shortly uh we

1712
00:29:19,909 --> 00:29:19,919
to be using them very shortly uh we
 

1713
00:29:19,919 --> 00:29:21,909
to be using them very shortly uh we
should not actually have to use those to

1714
00:29:21,909 --> 00:29:21,919
should not actually have to use those to
 

1715
00:29:21,919 --> 00:29:23,350
should not actually have to use those to
get things up and running so i'm going

1716
00:29:23,350 --> 00:29:23,360
get things up and running so i'm going
 

1717
00:29:23,360 --> 00:29:25,590
get things up and running so i'm going
to put it to do there

1718
00:29:25,590 --> 00:29:25,600
to put it to do there
 

1719
00:29:25,600 --> 00:29:26,710
to put it to do there
and

1720
00:29:26,710 --> 00:29:26,720
and
 

1721
00:29:26,720 --> 00:29:28,630
and
and skip those okay

1722
00:29:28,630 --> 00:29:28,640
and skip those okay
 

1723
00:29:28,640 --> 00:29:30,789
and skip those okay
so now we're going to go ahead and

1724
00:29:30,789 --> 00:29:30,799
so now we're going to go ahead and
 

1725
00:29:30,799 --> 00:29:35,669
so now we're going to go ahead and
proceed with pipeline generation so

1726
00:29:35,669 --> 00:29:35,679

 

1727
00:29:35,679 --> 00:29:36,710

the first thing we're going to want to

1728
00:29:36,710 --> 00:29:36,720
the first thing we're going to want to
 

1729
00:29:36,720 --> 00:29:40,070
the first thing we're going to want to
define is the viewport so the viewport

1730
00:29:40,070 --> 00:29:40,080
define is the viewport so the viewport
 

1731
00:29:40,080 --> 00:29:43,830
define is the viewport so the viewport
is basically going to be

1732
00:29:43,830 --> 00:29:43,840

 

1733
00:29:43,840 --> 00:29:44,630

x

1734
00:29:44,630 --> 00:29:44,640
x
 

1735
00:29:44,640 --> 00:29:45,750
x
and y

1736
00:29:45,750 --> 00:29:45,760
and y
 

1737
00:29:45,760 --> 00:29:46,870
and y
[Music]

1738
00:29:46,870 --> 00:29:46,880
[Music]
 

1739
00:29:46,880 --> 00:29:49,190
[Music]
so x is going to be zero based y is

1740
00:29:49,190 --> 00:29:49,200
so x is going to be zero based y is
 

1741
00:29:49,200 --> 00:29:50,549
so x is going to be zero based y is
going to be the height of the frame

1742
00:29:50,549 --> 00:29:50,559
going to be the height of the frame
 

1743
00:29:50,559 --> 00:29:51,909
going to be the height of the frame
buffer

1744
00:29:51,909 --> 00:29:51,919
buffer
 

1745
00:29:51,919 --> 00:29:53,750
buffer
the width is going to be as you would

1746
00:29:53,750 --> 00:29:53,760
the width is going to be as you would
 

1747
00:29:53,760 --> 00:29:55,190
the width is going to be as you would
expect and then the height is actually

1748
00:29:55,190 --> 00:29:55,200
expect and then the height is actually
 

1749
00:29:55,200 --> 00:29:56,630
expect and then the height is actually
going to be negative again because we're

1750
00:29:56,630 --> 00:29:56,640
going to be negative again because we're
 

1751
00:29:56,640 --> 00:29:58,549
going to be negative again because we're
using

1752
00:29:58,549 --> 00:29:58,559
using
 

1753
00:29:58,559 --> 00:30:02,470
using
the opengl equivalent way of doing this

1754
00:30:02,470 --> 00:30:02,480
the opengl equivalent way of doing this
 

1755
00:30:02,480 --> 00:30:03,830
the opengl equivalent way of doing this
that's why we're starting at the bottom

1756
00:30:03,830 --> 00:30:03,840
that's why we're starting at the bottom
 

1757
00:30:03,840 --> 00:30:05,750
that's why we're starting at the bottom
and going towards the top

1758
00:30:05,750 --> 00:30:05,760
and going towards the top
 

1759
00:30:05,760 --> 00:30:08,710
and going towards the top
and then our depth we're clamping to min

1760
00:30:08,710 --> 00:30:08,720
and then our depth we're clamping to min
 

1761
00:30:08,720 --> 00:30:11,029
and then our depth we're clamping to min
and max of zero and one perspective

1762
00:30:11,029 --> 00:30:11,039
and max of zero and one perspective
 

1763
00:30:11,039 --> 00:30:12,789
and max of zero and one perspective
respectively

1764
00:30:12,789 --> 00:30:12,799
respectively
 

1765
00:30:12,799 --> 00:30:14,070
respectively
our scissors basically going to be the

1766
00:30:14,070 --> 00:30:14,080
our scissors basically going to be the
 

1767
00:30:14,080 --> 00:30:15,909
our scissors basically going to be the
size of the screen right it's going to

1768
00:30:15,909 --> 00:30:15,919
size of the screen right it's going to
 

1769
00:30:15,919 --> 00:30:19,350
size of the screen right it's going to
clip anything that's outside of that

1770
00:30:19,350 --> 00:30:19,360
clip anything that's outside of that
 

1771
00:30:19,360 --> 00:30:21,430
clip anything that's outside of that
now our attributes so our attributes are

1772
00:30:21,430 --> 00:30:21,440
now our attributes so our attributes are
 

1773
00:30:21,440 --> 00:30:23,909
now our attributes so our attributes are
required we can't skip those so what i'm

1774
00:30:23,909 --> 00:30:23,919
required we can't skip those so what i'm
 

1775
00:30:23,919 --> 00:30:25,350
required we can't skip those so what i'm
going to do is

1776
00:30:25,350 --> 00:30:25,360
going to do is
 

1777
00:30:25,360 --> 00:30:26,950
going to do is
set up a

1778
00:30:26,950 --> 00:30:26,960
set up a
 

1779
00:30:26,960 --> 00:30:28,870
set up a
structure that we can sort of

1780
00:30:28,870 --> 00:30:28,880
structure that we can sort of
 

1781
00:30:28,880 --> 00:30:30,870
structure that we can sort of
expand as we go

1782
00:30:30,870 --> 00:30:30,880
expand as we go
 

1783
00:30:30,880 --> 00:30:33,190
expand as we go
and so

1784
00:30:33,190 --> 00:30:33,200
and so
 

1785
00:30:33,200 --> 00:30:34,230
and so
what we're going to do is we're going to

1786
00:30:34,230 --> 00:30:34,240
what we're going to do is we're going to
 

1787
00:30:34,240 --> 00:30:35,830
what we're going to do is we're going to
track an offset that's going to be an

1788
00:30:35,830 --> 00:30:35,840
track an offset that's going to be an
 

1789
00:30:35,840 --> 00:30:37,669
track an offset that's going to be an
offset size

1790
00:30:37,669 --> 00:30:37,679
offset size
 

1791
00:30:37,679 --> 00:30:39,430
offset size
and we'll see where that comes into play

1792
00:30:39,430 --> 00:30:39,440
and we'll see where that comes into play
 

1793
00:30:39,440 --> 00:30:41,590
and we'll see where that comes into play
here but basically as we add

1794
00:30:41,590 --> 00:30:41,600
here but basically as we add
 

1795
00:30:41,600 --> 00:30:43,350
here but basically as we add
attributes we're going to be offsetting

1796
00:30:43,350 --> 00:30:43,360
attributes we're going to be offsetting
 

1797
00:30:43,360 --> 00:30:45,909
attributes we're going to be offsetting
this and bytes

1798
00:30:45,909 --> 00:30:45,919
this and bytes
 

1799
00:30:45,919 --> 00:30:48,549
this and bytes
and we'll go ahead and create

1800
00:30:48,549 --> 00:30:48,559
and we'll go ahead and create
 

1801
00:30:48,559 --> 00:30:50,950
and we'll go ahead and create
an array here

1802
00:30:50,950 --> 00:30:50,960
an array here
 

1803
00:30:50,960 --> 00:30:53,510
an array here
size of attribute descriptions and this

1804
00:30:53,510 --> 00:30:53,520
size of attribute descriptions and this
 

1805
00:30:53,520 --> 00:30:55,750
size of attribute descriptions and this
is not using vlas because we are using a

1806
00:30:55,750 --> 00:30:55,760
is not using vlas because we are using a
 

1807
00:30:55,760 --> 00:30:57,669
is not using vlas because we are using a
constant value here so just bear that in

1808
00:30:57,669 --> 00:30:57,679
constant value here so just bear that in
 

1809
00:30:57,679 --> 00:30:59,430
constant value here so just bear that in
mind

1810
00:30:59,430 --> 00:30:59,440
mind
 

1811
00:30:59,440 --> 00:31:00,389
mind
and then

1812
00:31:00,389 --> 00:31:00,399
and then
 

1813
00:31:00,399 --> 00:31:01,990
and then
what we're going to do is we are going

1814
00:31:01,990 --> 00:31:02,000
what we're going to do is we are going
 

1815
00:31:02,000 --> 00:31:02,830
what we're going to do is we are going
to

1816
00:31:02,830 --> 00:31:02,840
to
 

1817
00:31:02,840 --> 00:31:06,630
to
define our actual

1818
00:31:06,630 --> 00:31:06,640
define our actual
 

1819
00:31:06,640 --> 00:31:09,830
define our actual
layout of our

1820
00:31:09,830 --> 00:31:09,840
layout of our
 

1821
00:31:09,840 --> 00:31:11,590
layout of our
attributes okay

1822
00:31:11,590 --> 00:31:11,600
attributes okay
 

1823
00:31:11,600 --> 00:31:13,350
attributes okay
and so for right now

1824
00:31:13,350 --> 00:31:13,360
and so for right now
 

1825
00:31:13,360 --> 00:31:16,950
and so for right now
the way that this works is we have a

1826
00:31:16,950 --> 00:31:16,960
the way that this works is we have a
 

1827
00:31:16,960 --> 00:31:18,789
the way that this works is we have a
variable that we're going to call

1828
00:31:18,789 --> 00:31:18,799
variable that we're going to call
 

1829
00:31:18,799 --> 00:31:20,630
variable that we're going to call
formats and this is going to be of

1830
00:31:20,630 --> 00:31:20,640
formats and this is going to be of
 

1831
00:31:20,640 --> 00:31:22,710
formats and this is going to be of
attribute count size and this is going

1832
00:31:22,710 --> 00:31:22,720
attribute count size and this is going
 

1833
00:31:22,720 --> 00:31:24,310
attribute count size and this is going
to give us the

1834
00:31:24,310 --> 00:31:24,320
to give us the
 

1835
00:31:24,320 --> 00:31:26,470
to give us the
format of each attribute

1836
00:31:26,470 --> 00:31:26,480
format of each attribute
 

1837
00:31:26,480 --> 00:31:29,110
format of each attribute
and our first first and right now only

1838
00:31:29,110 --> 00:31:29,120
and our first first and right now only
 

1839
00:31:29,120 --> 00:31:30,789
and our first first and right now only
attribute if you recall

1840
00:31:30,789 --> 00:31:30,799
attribute if you recall
 

1841
00:31:30,799 --> 00:31:32,789
attribute if you recall
is one of position which is a vector

1842
00:31:32,789 --> 00:31:32,799
is one of position which is a vector
 

1843
00:31:32,799 --> 00:31:33,750
is one of position which is a vector
three

1844
00:31:33,750 --> 00:31:33,760
three
 

1845
00:31:33,760 --> 00:31:35,830
three
so we are actually going to use the vk

1846
00:31:35,830 --> 00:31:35,840
so we are actually going to use the vk
 

1847
00:31:35,840 --> 00:31:40,950
so we are actually going to use the vk
format r32 g32 b32 s float

1848
00:31:40,950 --> 00:31:40,960
format r32 g32 b32 s float
 

1849
00:31:40,960 --> 00:31:42,470
format r32 g32 b32 s float
and so even though

1850
00:31:42,470 --> 00:31:42,480
and so even though
 

1851
00:31:42,480 --> 00:31:44,470
and so even though
this is colors you can also use this as

1852
00:31:44,470 --> 00:31:44,480
this is colors you can also use this as
 

1853
00:31:44,480 --> 00:31:45,909
this is colors you can also use this as
positions because it winds up being the

1854
00:31:45,909 --> 00:31:45,919
positions because it winds up being the
 

1855
00:31:45,919 --> 00:31:47,269
positions because it winds up being the
same data

1856
00:31:47,269 --> 00:31:47,279
same data
 

1857
00:31:47,279 --> 00:31:48,389
same data
basically what it's saying is we're

1858
00:31:48,389 --> 00:31:48,399
basically what it's saying is we're
 

1859
00:31:48,399 --> 00:31:50,070
basically what it's saying is we're
using a

1860
00:31:50,070 --> 00:31:50,080
using a
 

1861
00:31:50,080 --> 00:31:55,669
using a
32 bit for r or x 32 bit for g or y

1862
00:31:55,669 --> 00:31:55,679
32 bit for r or x 32 bit for g or y
 

1863
00:31:55,679 --> 00:31:57,590
32 bit for r or x 32 bit for g or y
32 bits for

1864
00:31:57,590 --> 00:31:57,600
32 bits for
 

1865
00:31:57,600 --> 00:31:59,029
32 bits for
b or z

1866
00:31:59,029 --> 00:31:59,039
b or z
 

1867
00:31:59,039 --> 00:32:00,870
b or z
and then that they're going to be

1868
00:32:00,870 --> 00:32:00,880
and then that they're going to be
 

1869
00:32:00,880 --> 00:32:03,669
and then that they're going to be
floating point right so this just tells

1870
00:32:03,669 --> 00:32:03,679
floating point right so this just tells
 

1871
00:32:03,679 --> 00:32:05,750
floating point right so this just tells
um the pipeline that that's what we're

1872
00:32:05,750 --> 00:32:05,760
um the pipeline that that's what we're
 

1873
00:32:05,760 --> 00:32:07,110
um the pipeline that that's what we're
going to be using

1874
00:32:07,110 --> 00:32:07,120
going to be using
 

1875
00:32:07,120 --> 00:32:09,110
going to be using
okay and so every time we add an

1876
00:32:09,110 --> 00:32:09,120
okay and so every time we add an
 

1877
00:32:09,120 --> 00:32:11,669
okay and so every time we add an
attribute we'll increment this and add

1878
00:32:11,669 --> 00:32:11,679
attribute we'll increment this and add
 

1879
00:32:11,679 --> 00:32:14,310
attribute we'll increment this and add
its format here

1880
00:32:14,310 --> 00:32:14,320
its format here
 

1881
00:32:14,320 --> 00:32:17,509
its format here
and then obviously we will need to track

1882
00:32:17,509 --> 00:32:17,519
and then obviously we will need to track
 

1883
00:32:17,519 --> 00:32:19,269
and then obviously we will need to track
sizes as well

1884
00:32:19,269 --> 00:32:19,279
sizes as well
 

1885
00:32:19,279 --> 00:32:21,909
sizes as well
so at least initially we only have one

1886
00:32:21,909 --> 00:32:21,919
so at least initially we only have one
 

1887
00:32:21,919 --> 00:32:23,029
so at least initially we only have one
size

1888
00:32:23,029 --> 00:32:23,039
size
 

1889
00:32:23,039 --> 00:32:24,789
size
because it's the you know obviously the

1890
00:32:24,789 --> 00:32:24,799
because it's the you know obviously the
 

1891
00:32:24,799 --> 00:32:26,389
because it's the you know obviously the
size of attribute count and it's the

1892
00:32:26,389 --> 00:32:26,399
size of attribute count and it's the
 

1893
00:32:26,399 --> 00:32:28,310
size of attribute count and it's the
size of vector 3 because position is a

1894
00:32:28,310 --> 00:32:28,320
size of vector 3 because position is a
 

1895
00:32:28,320 --> 00:32:29,830
size of vector 3 because position is a
vector 3.

1896
00:32:29,830 --> 00:32:29,840
vector 3.
 

1897
00:32:29,840 --> 00:32:32,070
vector 3.
and i believe that we actually do not

1898
00:32:32,070 --> 00:32:32,080
and i believe that we actually do not
 

1899
00:32:32,080 --> 00:32:36,710
and i believe that we actually do not
have vector 3 here so i'll

1900
00:32:36,710 --> 00:32:36,720

 

1901
00:32:36,720 --> 00:32:40,800

i'll need to include math types up here

1902
00:32:40,800 --> 00:32:40,810
i'll need to include math types up here
 

1903
00:32:40,810 --> 00:32:43,029
i'll need to include math types up here
[Music]

1904
00:32:43,029 --> 00:32:43,039
[Music]
 

1905
00:32:43,039 --> 00:32:44,230
[Music]
math types

1906
00:32:44,230 --> 00:32:44,240
math types
 

1907
00:32:44,240 --> 00:32:45,990
math types
okay

1908
00:32:45,990 --> 00:32:46,000
okay
 

1909
00:32:46,000 --> 00:32:48,470
okay
and so we have an array of formats an

1910
00:32:48,470 --> 00:32:48,480
and so we have an array of formats an
 

1911
00:32:48,480 --> 00:32:51,590
and so we have an array of formats an
array of sizes those things line up

1912
00:32:51,590 --> 00:32:51,600
array of sizes those things line up
 

1913
00:32:51,600 --> 00:32:54,789
array of sizes those things line up
and so what we'll wind up doing

1914
00:32:54,789 --> 00:32:54,799
and so what we'll wind up doing
 

1915
00:32:54,799 --> 00:32:57,509
and so what we'll wind up doing
is looping through both of those arrays

1916
00:32:57,509 --> 00:32:57,519
is looping through both of those arrays
 

1917
00:32:57,519 --> 00:32:59,590
is looping through both of those arrays
and setting our attribute descriptions

1918
00:32:59,590 --> 00:32:59,600
and setting our attribute descriptions
 

1919
00:32:59,600 --> 00:33:01,190
and setting our attribute descriptions
which is here

1920
00:33:01,190 --> 00:33:01,200
which is here
 

1921
00:33:01,200 --> 00:33:03,590
which is here
in this array

1922
00:33:03,590 --> 00:33:03,600
in this array
 

1923
00:33:03,600 --> 00:33:06,549
in this array
and we'll set the

1924
00:33:06,549 --> 00:33:06,559
and we'll set the
 

1925
00:33:06,559 --> 00:33:09,029
and we'll set the
oops i need a semicolon there there we

1926
00:33:09,029 --> 00:33:09,039
oops i need a semicolon there there we
 

1927
00:33:09,039 --> 00:33:12,470
oops i need a semicolon there there we
go and so we'll set the the binding

1928
00:33:12,470 --> 00:33:12,480
go and so we'll set the the binding
 

1929
00:33:12,480 --> 00:33:14,630
go and so we'll set the the binding
index which is always going to be

1930
00:33:14,630 --> 00:33:14,640
index which is always going to be
 

1931
00:33:14,640 --> 00:33:16,710
index which is always going to be
0 in our case because we're not going to

1932
00:33:16,710 --> 00:33:16,720
0 in our case because we're not going to
 

1933
00:33:16,720 --> 00:33:19,110
0 in our case because we're not going to
be using multiple bindings for this

1934
00:33:19,110 --> 00:33:19,120
be using multiple bindings for this
 

1935
00:33:19,120 --> 00:33:21,990
be using multiple bindings for this
the location of it is going to be i so

1936
00:33:21,990 --> 00:33:22,000
the location of it is going to be i so
 

1937
00:33:22,000 --> 00:33:23,590
the location of it is going to be i so
at least for the first one it'll be zero

1938
00:33:23,590 --> 00:33:23,600
at least for the first one it'll be zero
 

1939
00:33:23,600 --> 00:33:25,269
at least for the first one it'll be zero
for the second one it'll be one et

1940
00:33:25,269 --> 00:33:25,279
for the second one it'll be one et
 

1941
00:33:25,279 --> 00:33:28,960
for the second one it'll be one et
cetera so this location maps to

1942
00:33:28,960 --> 00:33:28,970
cetera so this location maps to
 

1943
00:33:28,970 --> 00:33:32,070
cetera so this location maps to
[Music]

1944
00:33:32,070 --> 00:33:32,080

 

1945
00:33:32,080 --> 00:33:34,310

this location here okay so the first

1946
00:33:34,310 --> 00:33:34,320
this location here okay so the first
 

1947
00:33:34,320 --> 00:33:37,269
this location here okay so the first
will always be position right

1948
00:33:37,269 --> 00:33:37,279
will always be position right
 

1949
00:33:37,279 --> 00:33:39,509
will always be position right
and then uh we'll use the format at the

1950
00:33:39,509 --> 00:33:39,519
and then uh we'll use the format at the
 

1951
00:33:39,519 --> 00:33:41,830
and then uh we'll use the format at the
given index and then we'll also use the

1952
00:33:41,830 --> 00:33:41,840
given index and then we'll also use the
 

1953
00:33:41,840 --> 00:33:43,669
given index and then we'll also use the
offset which is going to be

1954
00:33:43,669 --> 00:33:43,679
offset which is going to be
 

1955
00:33:43,679 --> 00:33:45,750
offset which is going to be
uh incremented by the size that we

1956
00:33:45,750 --> 00:33:45,760
uh incremented by the size that we
 

1957
00:33:45,760 --> 00:33:48,310
uh incremented by the size that we
defined here right so the offset for the

1958
00:33:48,310 --> 00:33:48,320
defined here right so the offset for the
 

1959
00:33:48,320 --> 00:33:49,750
defined here right so the offset for the
first one obviously will be zero and

1960
00:33:49,750 --> 00:33:49,760
first one obviously will be zero and
 

1961
00:33:49,760 --> 00:33:50,870
first one obviously will be zero and
that'll be

1962
00:33:50,870 --> 00:33:50,880
that'll be
 

1963
00:33:50,880 --> 00:33:53,590
that'll be
offset by the size of that index which

1964
00:33:53,590 --> 00:33:53,600
offset by the size of that index which
 

1965
00:33:53,600 --> 00:33:55,750
offset by the size of that index which
the first one will be size of vector 3

1966
00:33:55,750 --> 00:33:55,760
the first one will be size of vector 3
 

1967
00:33:55,760 --> 00:33:57,750
the first one will be size of vector 3
which will wind up being 12. okay

1968
00:33:57,750 --> 00:33:57,760
which will wind up being 12. okay
 

1969
00:33:57,760 --> 00:33:59,190
which will wind up being 12. okay
and so this

1970
00:33:59,190 --> 00:33:59,200
and so this
 

1971
00:33:59,200 --> 00:34:01,669
and so this
is just a nice easy way for us to make

1972
00:34:01,669 --> 00:34:01,679
is just a nice easy way for us to make
 

1973
00:34:01,679 --> 00:34:03,590
is just a nice easy way for us to make
this so that all we have to change

1974
00:34:03,590 --> 00:34:03,600
this so that all we have to change
 

1975
00:34:03,600 --> 00:34:04,710
this so that all we have to change
is this

1976
00:34:04,710 --> 00:34:04,720
is this
 

1977
00:34:04,720 --> 00:34:07,830
is this
and this as well as the overall count

1978
00:34:07,830 --> 00:34:07,840
and this as well as the overall count
 

1979
00:34:07,840 --> 00:34:09,909
and this as well as the overall count
and we don't have to change any of our

1980
00:34:09,909 --> 00:34:09,919
and we don't have to change any of our
 

1981
00:34:09,919 --> 00:34:12,710
and we don't have to change any of our
logic to support it going forward okay

1982
00:34:12,710 --> 00:34:12,720
logic to support it going forward okay
 

1983
00:34:12,720 --> 00:34:15,669
logic to support it going forward okay
so it's kind of configurable kind of not

1984
00:34:15,669 --> 00:34:15,679
so it's kind of configurable kind of not
 

1985
00:34:15,679 --> 00:34:17,030
so it's kind of configurable kind of not
we'll probably wind up making something

1986
00:34:17,030 --> 00:34:17,040
we'll probably wind up making something
 

1987
00:34:17,040 --> 00:34:19,430
we'll probably wind up making something
a little bit more flexible than this in

1988
00:34:19,430 --> 00:34:19,440
a little bit more flexible than this in
 

1989
00:34:19,440 --> 00:34:21,829
a little bit more flexible than this in
the future but for right now

1990
00:34:21,829 --> 00:34:21,839
the future but for right now
 

1991
00:34:21,839 --> 00:34:23,909
the future but for right now
this will simplify things for us for the

1992
00:34:23,909 --> 00:34:23,919
this will simplify things for us for the
 

1993
00:34:23,919 --> 00:34:25,109
this will simplify things for us for the
time being

1994
00:34:25,109 --> 00:34:25,119
time being
 

1995
00:34:25,119 --> 00:34:26,230
time being
okay

1996
00:34:26,230 --> 00:34:26,240
okay
 

1997
00:34:26,240 --> 00:34:28,470
okay
so the next thing that we need to do

1998
00:34:28,470 --> 00:34:28,480
so the next thing that we need to do
 

1999
00:34:28,480 --> 00:34:31,829
so the next thing that we need to do
is we need to set up our stages

2000
00:34:31,829 --> 00:34:31,839
is we need to set up our stages
 

2001
00:34:31,839 --> 00:34:36,470
is we need to set up our stages
and our stages

2002
00:34:36,470 --> 00:34:36,480

 

2003
00:34:36,480 --> 00:34:37,990

are just going to be pipeline shader

2004
00:34:37,990 --> 00:34:38,000
are just going to be pipeline shader
 

2005
00:34:38,000 --> 00:34:40,869
are just going to be pipeline shader
stage create info right and in this case

2006
00:34:40,869 --> 00:34:40,879
stage create info right and in this case
 

2007
00:34:40,879 --> 00:34:42,950
stage create info right and in this case
it's going to be 2 because our object

2008
00:34:42,950 --> 00:34:42,960
it's going to be 2 because our object
 

2009
00:34:42,960 --> 00:34:46,149
it's going to be 2 because our object
shader stage count is 2.

2010
00:34:46,149 --> 00:34:46,159
shader stage count is 2.
 

2011
00:34:46,159 --> 00:34:47,909
shader stage count is 2.
so to be safe we're just going to zero

2012
00:34:47,909 --> 00:34:47,919
so to be safe we're just going to zero
 

2013
00:34:47,919 --> 00:34:50,069
so to be safe we're just going to zero
out that entire thing and then we're

2014
00:34:50,069 --> 00:34:50,079
out that entire thing and then we're
 

2015
00:34:50,079 --> 00:34:52,069
out that entire thing and then we're
going to loop through each stage and

2016
00:34:52,069 --> 00:34:52,079
going to loop through each stage and
 

2017
00:34:52,079 --> 00:34:53,750
going to loop through each stage and
copy over the s-type

2018
00:34:53,750 --> 00:34:53,760
copy over the s-type
 

2019
00:34:53,760 --> 00:34:56,950
copy over the s-type
as well as the shader create info right

2020
00:34:56,950 --> 00:34:56,960
as well as the shader create info right
 

2021
00:34:56,960 --> 00:34:59,270
as well as the shader create info right
and so that will fill this guy out to be

2022
00:34:59,270 --> 00:34:59,280
and so that will fill this guy out to be
 

2023
00:34:59,280 --> 00:35:00,470
and so that will fill this guy out to be
used

2024
00:35:00,470 --> 00:35:00,480
used
 

2025
00:35:00,480 --> 00:35:03,270
used
i also do want to point out that uh

2026
00:35:03,270 --> 00:35:03,280
i also do want to point out that uh
 

2027
00:35:03,280 --> 00:35:05,430
i also do want to point out that uh
we're not doing descriptors yet

2028
00:35:05,430 --> 00:35:05,440
we're not doing descriptors yet
 

2029
00:35:05,440 --> 00:35:07,030
we're not doing descriptors yet
but this is where that's going to wind

2030
00:35:07,030 --> 00:35:07,040
but this is where that's going to wind
 

2031
00:35:07,040 --> 00:35:08,550
but this is where that's going to wind
up being so i'm going to put it to do

2032
00:35:08,550 --> 00:35:08,560
up being so i'm going to put it to do
 

2033
00:35:08,560 --> 00:35:10,230
up being so i'm going to put it to do
here

2034
00:35:10,230 --> 00:35:10,240
here
 

2035
00:35:10,240 --> 00:35:12,550
here
so that we come back to that

2036
00:35:12,550 --> 00:35:12,560
so that we come back to that
 

2037
00:35:12,560 --> 00:35:14,820
so that we come back to that
when we actually start using descriptors

2038
00:35:14,820 --> 00:35:14,830
when we actually start using descriptors
 

2039
00:35:14,830 --> 00:35:17,190
when we actually start using descriptors
[Music]

2040
00:35:17,190 --> 00:35:17,200
[Music]
 

2041
00:35:17,200 --> 00:35:19,349
[Music]
and then we're going to go ahead and

2042
00:35:19,349 --> 00:35:19,359
and then we're going to go ahead and
 

2043
00:35:19,359 --> 00:35:22,230
and then we're going to go ahead and
create the pipeline

2044
00:35:22,230 --> 00:35:22,240
create the pipeline
 

2045
00:35:22,240 --> 00:35:25,109
create the pipeline
okay and obviously that's going to call

2046
00:35:25,109 --> 00:35:25,119
okay and obviously that's going to call
 

2047
00:35:25,119 --> 00:35:27,829
okay and obviously that's going to call
we're going to call vulcan graphics

2048
00:35:27,829 --> 00:35:27,839
we're going to call vulcan graphics
 

2049
00:35:27,839 --> 00:35:30,950
we're going to call vulcan graphics
pipeline create which means that we need

2050
00:35:30,950 --> 00:35:30,960
pipeline create which means that we need
 

2051
00:35:30,960 --> 00:35:33,030
pipeline create which means that we need
to actually include that

2052
00:35:33,030 --> 00:35:33,040
to actually include that
 

2053
00:35:33,040 --> 00:35:34,390
to actually include that
so right under

2054
00:35:34,390 --> 00:35:34,400
so right under
 

2055
00:35:34,400 --> 00:35:36,310
so right under
shader details

2056
00:35:36,310 --> 00:35:36,320
shader details
 

2057
00:35:36,320 --> 00:35:40,540
shader details
i'm going to include vulcan pipeline.h

2058
00:35:40,540 --> 00:35:40,550
i'm going to include vulcan pipeline.h
 

2059
00:35:40,550 --> 00:35:42,829
i'm going to include vulcan pipeline.h
[Music]

2060
00:35:42,829 --> 00:35:42,839
[Music]
 

2061
00:35:42,839 --> 00:35:45,990
[Music]
and that should be defined there we are

2062
00:35:45,990 --> 00:35:46,000
and that should be defined there we are
 

2063
00:35:46,000 --> 00:35:47,750
and that should be defined there we are
we're good to go okay so

2064
00:35:47,750 --> 00:35:47,760
we're good to go okay so
 

2065
00:35:47,760 --> 00:35:49,829
we're good to go okay so
we're passing the context uh the render

2066
00:35:49,829 --> 00:35:49,839
we're passing the context uh the render
 

2067
00:35:49,839 --> 00:35:51,589
we're passing the context uh the render
pass the main render pass from the

2068
00:35:51,589 --> 00:35:51,599
pass the main render pass from the
 

2069
00:35:51,599 --> 00:35:52,790
pass the main render pass from the
context

2070
00:35:52,790 --> 00:35:52,800
context
 

2071
00:35:52,800 --> 00:35:55,109
context
the attribute counts which is one the

2072
00:35:55,109 --> 00:35:55,119
the attribute counts which is one the
 

2073
00:35:55,119 --> 00:35:57,109
the attribute counts which is one the
our array that we've created

2074
00:35:57,109 --> 00:35:57,119
our array that we've created
 

2075
00:35:57,119 --> 00:35:59,510
our array that we've created
our next thing that we're gonna that

2076
00:35:59,510 --> 00:35:59,520
our next thing that we're gonna that
 

2077
00:35:59,520 --> 00:36:00,950
our next thing that we're gonna that
this is looking for is the descriptor

2078
00:36:00,950 --> 00:36:00,960
this is looking for is the descriptor
 

2079
00:36:00,960 --> 00:36:03,829
this is looking for is the descriptor
set layout uh or descriptor set layout

2080
00:36:03,829 --> 00:36:03,839
set layout uh or descriptor set layout
 

2081
00:36:03,839 --> 00:36:06,150
set layout uh or descriptor set layout
count and descriptor set layouts array

2082
00:36:06,150 --> 00:36:06,160
count and descriptor set layouts array
 

2083
00:36:06,160 --> 00:36:07,430
count and descriptor set layouts array
we don't have those yet so we're just

2084
00:36:07,430 --> 00:36:07,440
we don't have those yet so we're just
 

2085
00:36:07,440 --> 00:36:09,990
we don't have those yet so we're just
passing zeros for that

2086
00:36:09,990 --> 00:36:10,000
passing zeros for that
 

2087
00:36:10,000 --> 00:36:12,550
passing zeros for that
how many stages we have which is two our

2088
00:36:12,550 --> 00:36:12,560
how many stages we have which is two our
 

2089
00:36:12,560 --> 00:36:14,310
how many stages we have which is two our
stage grade infos our viewport or

2090
00:36:14,310 --> 00:36:14,320
stage grade infos our viewport or
 

2091
00:36:14,320 --> 00:36:15,589
stage grade infos our viewport or
scissor

2092
00:36:15,589 --> 00:36:15,599
scissor
 

2093
00:36:15,599 --> 00:36:19,109
scissor
we're passing in false

2094
00:36:19,109 --> 00:36:19,119
we're passing in false
 

2095
00:36:19,119 --> 00:36:20,870
we're passing in false
for is wireframe for right now because

2096
00:36:20,870 --> 00:36:20,880
for is wireframe for right now because
 

2097
00:36:20,880 --> 00:36:22,550
for is wireframe for right now because
we don't want wireframe

2098
00:36:22,550 --> 00:36:22,560
we don't want wireframe
 

2099
00:36:22,560 --> 00:36:25,589
we don't want wireframe
and then a pointer to hold the created

2100
00:36:25,589 --> 00:36:25,599
and then a pointer to hold the created
 

2101
00:36:25,599 --> 00:36:27,410
and then a pointer to hold the created
pipeline okay

2102
00:36:27,410 --> 00:36:27,420
pipeline okay
 

2103
00:36:27,420 --> 00:36:29,829
pipeline okay
[Music]

2104
00:36:29,829 --> 00:36:29,839
[Music]
 

2105
00:36:29,839 --> 00:36:32,470
[Music]
all right

2106
00:36:32,470 --> 00:36:32,480

 

2107
00:36:32,480 --> 00:36:34,069

so all of this

2108
00:36:34,069 --> 00:36:34,079
so all of this
 

2109
00:36:34,079 --> 00:36:35,750
so all of this
to create our pipeline so what i'm going

2110
00:36:35,750 --> 00:36:35,760
to create our pipeline so what i'm going
 

2111
00:36:35,760 --> 00:36:37,990
to create our pipeline so what i'm going
to do is i'm going to set a breakpoint

2112
00:36:37,990 --> 00:36:38,000
to do is i'm going to set a breakpoint
 

2113
00:36:38,000 --> 00:36:39,589
to do is i'm going to set a breakpoint
here

2114
00:36:39,589 --> 00:36:39,599
here
 

2115
00:36:39,599 --> 00:36:41,270
here
and i'm gonna go ahead and build

2116
00:36:41,270 --> 00:36:41,280
and i'm gonna go ahead and build
 

2117
00:36:41,280 --> 00:36:42,790
and i'm gonna go ahead and build
and looks like we had a warning let me

2118
00:36:42,790 --> 00:36:42,800
and looks like we had a warning let me
 

2119
00:36:42,800 --> 00:36:44,069
and looks like we had a warning let me
just

2120
00:36:44,069 --> 00:36:44,079
just
 

2121
00:36:44,079 --> 00:36:45,910
just
verify this

2122
00:36:45,910 --> 00:36:45,920
verify this
 

2123
00:36:45,920 --> 00:36:48,069
verify this
looks like we forgot to include k memory

2124
00:36:48,069 --> 00:36:48,079
looks like we forgot to include k memory
 

2125
00:36:48,079 --> 00:36:49,829
looks like we forgot to include k memory
in our object shader i thought i already

2126
00:36:49,829 --> 00:36:49,839
in our object shader i thought i already
 

2127
00:36:49,839 --> 00:36:52,790
in our object shader i thought i already
got that

2128
00:36:52,790 --> 00:36:52,800

 

2129
00:36:52,800 --> 00:36:54,710

nope i didn't okay

2130
00:36:54,710 --> 00:36:54,720
nope i didn't okay
 

2131
00:36:54,720 --> 00:36:57,349
nope i didn't okay
so i'll include core

2132
00:36:57,349 --> 00:36:57,359
so i'll include core
 

2133
00:36:57,359 --> 00:36:58,630
so i'll include core
okay memory

2134
00:36:58,630 --> 00:36:58,640
okay memory
 

2135
00:36:58,640 --> 00:37:00,550
okay memory
build again

2136
00:37:00,550 --> 00:37:00,560
build again
 

2137
00:37:00,560 --> 00:37:02,310
build again
and no errors okay

2138
00:37:02,310 --> 00:37:02,320
and no errors okay
 

2139
00:37:02,320 --> 00:37:05,910
and no errors okay
so let's go ahead and run

2140
00:37:05,910 --> 00:37:05,920

 

2141
00:37:05,920 --> 00:37:07,910

and we'll go ahead and check our

2142
00:37:07,910 --> 00:37:07,920
and we'll go ahead and check our
 

2143
00:37:07,920 --> 00:37:11,030
and we'll go ahead and check our
pipeline creation so i'm just going to

2144
00:37:11,030 --> 00:37:11,040
pipeline creation so i'm just going to
 

2145
00:37:11,040 --> 00:37:13,030
pipeline creation so i'm just going to
actually skip over all this assignment

2146
00:37:13,030 --> 00:37:13,040
actually skip over all this assignment
 

2147
00:37:13,040 --> 00:37:14,150
actually skip over all this assignment
here

2148
00:37:14,150 --> 00:37:14,160
here
 

2149
00:37:14,160 --> 00:37:16,150
here
and come down here

2150
00:37:16,150 --> 00:37:16,160
and come down here
 

2151
00:37:16,160 --> 00:37:19,109
and come down here
to our pipeline layout right

2152
00:37:19,109 --> 00:37:19,119
to our pipeline layout right
 

2153
00:37:19,119 --> 00:37:22,230
to our pipeline layout right
so i will go ahead and run this okay and

2154
00:37:22,230 --> 00:37:22,240
so i will go ahead and run this okay and
 

2155
00:37:22,240 --> 00:37:24,710
so i will go ahead and run this okay and
we didn't assert there so we're good

2156
00:37:24,710 --> 00:37:24,720
we didn't assert there so we're good
 

2157
00:37:24,720 --> 00:37:26,970
we didn't assert there so we're good
and i'll skip over these things

2158
00:37:26,970 --> 00:37:26,980
and i'll skip over these things
 

2159
00:37:26,980 --> 00:37:28,069
and i'll skip over these things
[Music]

2160
00:37:28,069 --> 00:37:28,079
[Music]
 

2161
00:37:28,079 --> 00:37:30,390
[Music]
and here our

2162
00:37:30,390 --> 00:37:30,400
and here our
 

2163
00:37:30,400 --> 00:37:31,349
and here our
result

2164
00:37:31,349 --> 00:37:31,359
result
 

2165
00:37:31,359 --> 00:37:34,310
result
for our create pipelines

2166
00:37:34,310 --> 00:37:34,320
for our create pipelines
 

2167
00:37:34,320 --> 00:37:36,630
for our create pipelines
we'll go ahead and

2168
00:37:36,630 --> 00:37:36,640
we'll go ahead and
 

2169
00:37:36,640 --> 00:37:38,470
we'll go ahead and
skip over that

2170
00:37:38,470 --> 00:37:38,480
skip over that
 

2171
00:37:38,480 --> 00:37:40,950
skip over that
our result is vk success so we have

2172
00:37:40,950 --> 00:37:40,960
our result is vk success so we have
 

2173
00:37:40,960 --> 00:37:43,349
our result is vk success so we have
wired up everything as needed and we do

2174
00:37:43,349 --> 00:37:43,359
wired up everything as needed and we do
 

2175
00:37:43,359 --> 00:37:45,109
wired up everything as needed and we do
not have any validation errors here so

2176
00:37:45,109 --> 00:37:45,119
not have any validation errors here so
 

2177
00:37:45,119 --> 00:37:47,990
not have any validation errors here so
that's also a good sign

2178
00:37:47,990 --> 00:37:48,000
that's also a good sign
 

2179
00:37:48,000 --> 00:37:48,950
that's also a good sign
and

2180
00:37:48,950 --> 00:37:48,960
and
 

2181
00:37:48,960 --> 00:37:50,950
and
that means that our graphics pipeline is

2182
00:37:50,950 --> 00:37:50,960
that means that our graphics pipeline is
 

2183
00:37:50,960 --> 00:37:53,750
that means that our graphics pipeline is
created and we're good to go so

2184
00:37:53,750 --> 00:37:53,760
created and we're good to go so
 

2185
00:37:53,760 --> 00:37:55,589
created and we're good to go so
that means that we can go ahead and let

2186
00:37:55,589 --> 00:37:55,599
that means that we can go ahead and let
 

2187
00:37:55,599 --> 00:37:56,630
that means that we can go ahead and let
this run

2188
00:37:56,630 --> 00:37:56,640
this run
 

2189
00:37:56,640 --> 00:37:59,589
this run
and again we're not going to see

2190
00:37:59,589 --> 00:37:59,599
and again we're not going to see
 

2191
00:37:59,599 --> 00:38:03,670
and again we're not going to see
sort of anything actually appearing

2192
00:38:03,670 --> 00:38:03,680

 

2193
00:38:03,680 --> 00:38:05,910

just yet on the screen but

2194
00:38:05,910 --> 00:38:05,920
just yet on the screen but
 

2195
00:38:05,920 --> 00:38:06,870
just yet on the screen but
we are

2196
00:38:06,870 --> 00:38:06,880
we are
 

2197
00:38:06,880 --> 00:38:08,150
we are
getting there

2198
00:38:08,150 --> 00:38:08,160
getting there
 

2199
00:38:08,160 --> 00:38:10,630
getting there
uh however it looks like we have

2200
00:38:10,630 --> 00:38:10,640
uh however it looks like we have
 

2201
00:38:10,640 --> 00:38:13,349
uh however it looks like we have
forgotten to destroy something so

2202
00:38:13,349 --> 00:38:13,359
forgotten to destroy something so
 

2203
00:38:13,359 --> 00:38:17,270
forgotten to destroy something so
destroy device

2204
00:38:17,270 --> 00:38:17,280

 

2205
00:38:17,280 --> 00:38:20,069

ah we did not call our

2206
00:38:20,069 --> 00:38:20,079
ah we did not call our
 

2207
00:38:20,079 --> 00:38:21,670
ah we did not call our
pipeline destroy so let me go ahead and

2208
00:38:21,670 --> 00:38:21,680
pipeline destroy so let me go ahead and
 

2209
00:38:21,680 --> 00:38:22,700
pipeline destroy so let me go ahead and
wire that up

2210
00:38:22,700 --> 00:38:22,710
wire that up
 

2211
00:38:22,710 --> 00:38:23,990
wire that up
[Music]

2212
00:38:23,990 --> 00:38:24,000
[Music]
 

2213
00:38:24,000 --> 00:38:27,270
[Music]
so that is going to be an object shader

2214
00:38:27,270 --> 00:38:27,280
so that is going to be an object shader
 

2215
00:38:27,280 --> 00:38:28,550
so that is going to be an object shader
and then

2216
00:38:28,550 --> 00:38:28,560
and then
 

2217
00:38:28,560 --> 00:38:30,630
and then
before we destroy the shader modules we

2218
00:38:30,630 --> 00:38:30,640
before we destroy the shader modules we
 

2219
00:38:30,640 --> 00:38:34,230
before we destroy the shader modules we
are going to destroy this so we'll say

2220
00:38:34,230 --> 00:38:34,240
are going to destroy this so we'll say
 

2221
00:38:34,240 --> 00:38:36,710
are going to destroy this so we'll say
context

2222
00:38:36,710 --> 00:38:36,720
context
 

2223
00:38:36,720 --> 00:38:38,069
context
and

2224
00:38:38,069 --> 00:38:38,079
and
 

2225
00:38:38,079 --> 00:38:41,130
and
context

2226
00:38:41,130 --> 00:38:41,140

 

2227
00:38:41,140 --> 00:38:44,790

[Music]

2228
00:38:44,790 --> 00:38:44,800
[Music]
 

2229
00:38:44,800 --> 00:38:49,990
[Music]
say context and then shader

2230
00:38:49,990 --> 00:38:50,000

 

2231
00:38:50,000 --> 00:38:50,780

pipeline

2232
00:38:50,780 --> 00:38:50,790
pipeline
 

2233
00:38:50,790 --> 00:38:53,589
pipeline
[Music]

2234
00:38:53,589 --> 00:38:53,599
[Music]
 

2235
00:38:53,599 --> 00:38:55,109
[Music]
and

2236
00:38:55,109 --> 00:38:55,119
and
 

2237
00:38:55,119 --> 00:38:58,790
and
we'll need the address of that

2238
00:38:58,790 --> 00:38:58,800

 

2239
00:38:58,800 --> 00:39:02,069

okay let's go ahead and build again

2240
00:39:02,069 --> 00:39:02,079
okay let's go ahead and build again
 

2241
00:39:02,079 --> 00:39:04,490
okay let's go ahead and build again
and we get a we got a warning

2242
00:39:04,490 --> 00:39:04,500
and we get a we got a warning
 

2243
00:39:04,500 --> 00:39:05,990
and we get a we got a warning
[Music]

2244
00:39:05,990 --> 00:39:06,000
[Music]
 

2245
00:39:06,000 --> 00:39:07,670
[Music]
oh i guess we don't need the address of

2246
00:39:07,670 --> 00:39:07,680
oh i guess we don't need the address of
 

2247
00:39:07,680 --> 00:39:11,270
oh i guess we don't need the address of
that because that's already pointing

2248
00:39:11,270 --> 00:39:11,280
that because that's already pointing
 

2249
00:39:11,280 --> 00:39:13,670
that because that's already pointing
okay there we go okay so here is our

2250
00:39:13,670 --> 00:39:13,680
okay there we go okay so here is our
 

2251
00:39:13,680 --> 00:39:15,510
okay there we go okay so here is our
pipeline destroy

2252
00:39:15,510 --> 00:39:15,520
pipeline destroy
 

2253
00:39:15,520 --> 00:39:18,150
pipeline destroy
so now we'll go ahead and run again

2254
00:39:18,150 --> 00:39:18,160
so now we'll go ahead and run again
 

2255
00:39:18,160 --> 00:39:21,430
so now we'll go ahead and run again
let's get rid of that break point

2256
00:39:21,430 --> 00:39:21,440
let's get rid of that break point
 

2257
00:39:21,440 --> 00:39:22,790
let's get rid of that break point
okay

2258
00:39:22,790 --> 00:39:22,800
okay
 

2259
00:39:22,800 --> 00:39:26,790
okay
and

2260
00:39:26,790 --> 00:39:26,800

 

2261
00:39:26,800 --> 00:39:28,470

go ahead and exit this and we can see

2262
00:39:28,470 --> 00:39:28,480
go ahead and exit this and we can see
 

2263
00:39:28,480 --> 00:39:30,310
go ahead and exit this and we can see
that the validation errors have gone

2264
00:39:30,310 --> 00:39:30,320
that the validation errors have gone
 

2265
00:39:30,320 --> 00:39:32,069
that the validation errors have gone
away so

2266
00:39:32,069 --> 00:39:32,079
away so
 

2267
00:39:32,079 --> 00:39:33,990
away so
our pipeline is

2268
00:39:33,990 --> 00:39:34,000
our pipeline is
 

2269
00:39:34,000 --> 00:39:36,870
our pipeline is
good to go uh we are

2270
00:39:36,870 --> 00:39:36,880
good to go uh we are
 

2271
00:39:36,880 --> 00:39:38,630
good to go uh we are
ready to move on to the next step which

2272
00:39:38,630 --> 00:39:38,640
ready to move on to the next step which
 

2273
00:39:38,640 --> 00:39:40,390
ready to move on to the next step which
is going to be very soon getting stuff

2274
00:39:40,390 --> 00:39:40,400
is going to be very soon getting stuff
 

2275
00:39:40,400 --> 00:39:42,710
is going to be very soon getting stuff
on the actual screen so we're getting

2276
00:39:42,710 --> 00:39:42,720
on the actual screen so we're getting
 

2277
00:39:42,720 --> 00:39:45,030
on the actual screen so we're getting
there folks

2278
00:39:45,030 --> 00:39:45,040
there folks
 

2279
00:39:45,040 --> 00:39:46,950
there folks
so this is uh going to wrap it up for

2280
00:39:46,950 --> 00:39:46,960
so this is uh going to wrap it up for
 

2281
00:39:46,960 --> 00:39:48,310
so this is uh going to wrap it up for
this video thank you guys so much for

2282
00:39:48,310 --> 00:39:48,320
this video thank you guys so much for
 

2283
00:39:48,320 --> 00:39:49,589
this video thank you guys so much for
watching

2284
00:39:49,589 --> 00:39:49,599
watching
 

2285
00:39:49,599 --> 00:39:51,030
watching
if you liked the video go ahead and toss

2286
00:39:51,030 --> 00:39:51,040
if you liked the video go ahead and toss
 

2287
00:39:51,040 --> 00:39:53,190
if you liked the video go ahead and toss
it a thumbs up i greatly appreciate it

2288
00:39:53,190 --> 00:39:53,200
it a thumbs up i greatly appreciate it
 

2289
00:39:53,200 --> 00:39:54,630
it a thumbs up i greatly appreciate it
if you haven't already consider

2290
00:39:54,630 --> 00:39:54,640
if you haven't already consider
 

2291
00:39:54,640 --> 00:39:57,030
if you haven't already consider
subscribing click the little bell icon

2292
00:39:57,030 --> 00:39:57,040
subscribing click the little bell icon
 

2293
00:39:57,040 --> 00:39:59,510
subscribing click the little bell icon
there to get notifications as to when

2294
00:39:59,510 --> 00:39:59,520
there to get notifications as to when
 

2295
00:39:59,520 --> 00:40:01,910
there to get notifications as to when
the next video and this or other series

2296
00:40:01,910 --> 00:40:01,920
the next video and this or other series
 

2297
00:40:01,920 --> 00:40:06,040
the next video and this or other series
drops and i will see you guys next time

2298
00:40:06,040 --> 00:40:06,050
drops and i will see you guys next time
 

2299
00:40:06,050 --> 00:40:17,750
drops and i will see you guys next time
[Music]

2300
00:40:17,750 --> 00:40:17,760

 

2301
00:40:17,760 --> 00:40:19,839

you


