You are browsing as a guest. Sign up (or log in) to start making projects!

Open comments for this post

2h 22m 53s logged

DEVLOG 3 - First Cube!!!
 
How satisfying, my first 3D object!

Since previously all vertices were written manually in the shader, I opted to learn how to create buffers to load more complex 3D geometry onto the screen.
 
I’m loading the resources directly into a specific portion of memory called Host Visible, where the CPU can also write, and the GPU’s reading isn’t as fast as it could be. If I instead allocate the memory in a portion of VRAM called Device Local, the GPU will be very fast at accessing the data, but the CPU, on the other hand, won’t be able to do anything with that memory. To modify it, you need to first allocate the data in an intermediate buffer called Staging Buffer, and then from there the data can go to Device Local memory (the GPU’s fast memory).
 
I also added some transformations and rotations with GLM to rotate the cube, and this is the result, which is nice.
 
I think I’ll try using Device Local memory by loading data to it, as discussed before, with a Staging Buffer and after that I think I’ll start experimenting with textures.

0
3

Comments 0

No comments yet. Be the first!