Skip to content

Commit 9e175c5

Browse files
author
Ravbug
committed
Update for API changes
1 parent 90a91e7 commit 9e175c5

6 files changed

Lines changed: 11 additions & 11 deletions

File tree

02-Cubes/cubes.vert

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ void main() {
1919
const uint gridSize = 6;
2020

2121
vec3 pos = vec3(
22-
(gl_InstanceID % gridSize - gridSize/2.0f) * 2.5, // column
23-
(gl_InstanceID / gridSize - gridSize/2.0f) * 2.5, // row
22+
(gl_InstanceIndex % gridSize - gridSize/2.0f) * 2.5, // column
23+
(gl_InstanceIndex / gridSize - gridSize/2.0f) * 2.5, // row
2424
0
2525
);
2626

2727
const float scaleFactor = 1;
2828

29-
float spinSpeed = cubeSpeeds[gl_InstanceID];
29+
float spinSpeed = cubeSpeeds[gl_InstanceIndex];
3030

3131
mat4 model = mat4(
3232
vec4(scaleFactor, 0.0, 0.0, 0.0),

03-Imgui/imgui.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ void main(){
215215
.format = RGL::TextureFormat::RGBA8_Unorm,
216216
.debugName = "ImGui Font Texture"
217217
},
218-
{pixels, static_cast<size_t>(width * height * 4)}
218+
{ {pixels, static_cast<size_t>(width * height * 4)} }
219219
);
220220
imgui_io->Fonts->SetTexID(fontsTexture.get());
221221

05-XR/xr.vert

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,5 @@ void main() {
4848
vec4 worldpos = (model * rotmatx) * vec4(inPosition,1);
4949

5050
gl_Position = ubo.viewProj * worldpos;
51-
vertColor = vertColors[gl_VertexID % 3];
51+
vertColor = vertColors[gl_VertexIndex % 3];
5252
}

09-BindlessTexturing/btex.vert

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ vec3 positions[] = {
2121

2222
void main(){
2323

24-
instance = indices[gl_InstanceID];
24+
instance = indices[gl_InstanceIndex];
2525

26-
vec3 pos = vec3(inPosition, 0) + positions[gl_InstanceID];
26+
vec3 pos = vec3(inPosition, 0) + positions[gl_InstanceIndex];
2727

2828
gl_Position = ubo.viewProj * vec4(pos, 1);
2929
outUV = inUV;

CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ macro(add_sample dir)
224224
target_sources(${dir} PUBLIC ${outname})
225225
set_source_files_properties(${outname} PROPERTIES
226226
GENERATED TRUE
227-
VS_SHADER_MODEL "6.4"
227+
VS_SHADER_MODEL "6.8"
228228
VS_SHADER_TYPE "Vertex"
229229
VS_SHADER_ENABLE_DEBUG ON
230230
VS_SHADER_DISABLE_OPTIMIZATIONS ON
@@ -255,7 +255,7 @@ macro(add_sample dir)
255255
target_sources(${dir} PUBLIC ${outname})
256256
set_source_files_properties(${outname} PROPERTIES
257257
GENERATED TRUE
258-
VS_SHADER_MODEL "6.4"
258+
VS_SHADER_MODEL "6.8"
259259
VS_SHADER_TYPE "Pixel"
260260
VS_SHADER_ENABLE_DEBUG ON
261261
VS_SHADER_DISABLE_OPTIMIZATIONS ON
@@ -286,7 +286,7 @@ macro(add_sample dir)
286286
target_sources(${dir} PUBLIC ${outname})
287287
set_source_files_properties(${outname} PROPERTIES
288288
GENERATED TRUE
289-
VS_SHADER_MODEL "6.4"
289+
VS_SHADER_MODEL "6.8"
290290
VS_SHADER_TYPE "Compute"
291291
VS_SHADER_ENABLE_DEBUG ON
292292
VS_SHADER_DISABLE_OPTIMIZATIONS ON

deps/RGL

Submodule RGL updated 238 files

0 commit comments

Comments
 (0)