summaryrefslogtreecommitdiff
path: root/c2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'c2.cpp')
-rw-r--r--c2.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/c2.cpp b/c2.cpp
index 37e4876..3b46920 100644
--- a/c2.cpp
+++ b/c2.cpp
@@ -65,10 +65,12 @@ int main() {
Device* dev;
Shader* shader;
Texture* texture;
+ Texture* texture2;
Buffer_Id vbo;
Sampler_Id clamped_linear;
C2* app = App::create<C2>("c2");
void* per_frame;
+ int frame = 0;
app->running = 1;
init_arena(
&video_arena,
@@ -85,6 +87,7 @@ int main() {
app->dev = dev;
shader = (Shader*)assets.load("triangle.csh");
texture = (Texture*)assets.load("22.tex");
+ texture2 = (Texture*)assets.load("kita.tex");
per_frame = heap_alloc(
dev->heap,
per_frame_memory_size
@@ -110,7 +113,7 @@ int main() {
pb.vertex_format(shader->vf);
pb.texture(
shader->descriptor_index("colour_texture"),
- texture->id,
+ frame % 2? texture->id: texture2->id,
clamped_linear
);
Pipeline& pip = pb.build();
@@ -127,9 +130,9 @@ int main() {
draw.instance_count = 1;
dev->get_ctx().submit(draw, pip, pass);
- /* dev->get_ctx().submit(*dev, pass);*/
r += 10;
+ frame++;
dev->present();
app->end();
}