summaryrefslogtreecommitdiff
path: root/src/block.c
Commit message (Collapse)AuthorAgeFilesLines
* Minor performance boost + better inputAaditya Dhruv39 hours1-5/+5
| | | | Draw triangles in correct counter clock order, back face wasn't correct
* Add basic block texturesAaditya Dhruv41 hours1-43/+73
| | | | | | | | | - Remove the code that sent colors through uniform variables, instead send texture data - Each vertex now has a texture coordinate - struct texture is a easy way to represent textures, can be extended later - Shaders updated to use textures
* Add chunk_unloading on chunk ChangesAaditya Dhruv2 days1-2/+15
| | | | | If we change a chunk, unload all chunks. This removes block GPU data (vbo, ebo, vao). We anyways redraw so we don't lose anything
* Update chunk rendering, improve chunk loadingAaditya Dhruv2 days1-2/+3
| | | | | | | | | | - On world_init, LOAD_CHUNK amount of chunks are preloaded - Chunks are loaded around the player's current chunk, in a square shape. The size of the shape is controlled by CHUNK_DISTANCE - Allow chunks struct to be independent of a position. We load a chunk TO a position in the world chunk grid (x, y). This allows us to "wrap" chunks, so we have an endless world, but we are really just wrapping around
* Add basic directional lightAaditya Dhruv4 days1-9/+66
|
* Add camera handling and movementAaditya Dhruv4 days1-17/+1
| | | | | | | | Camera related movements have been moved to camera.c - it tracks the matrices as well so we don't have to call it in block_update The player class is empty right now, but the camera will be a child of the player, and the player a child of the engine
* Improve Block featuresAaditya Dhruv5 days1-14/+32
| | | | | - Rotate block scene at the center - Add block_debug to print block data
* Update local world coords for blockAaditya Dhruv6 days1-8/+9
|
* Fix block_init/draw bug, add more blocks to drawAaditya Dhruv7 days1-3/+9
| | | | | - VAO/VBO binding bug fixed, added explaination in comments - Add 9 rotating blocks
* Better rotating cubeAaditya Dhruv7 days1-39/+37
|
* rotating cubeAaditya Dhruv7 days1-17/+71
|
* wipAaditya Dhruv7 days1-0/+55