lwjglgamedev / lwjglbook-leg

Source code of the chapters of the book 3D Game Development with LWJGL 3
https://ahbejarano.gitbook.io/lwjglgamedev/
Apache License 2.0
560 stars 202 forks source link

Memory Allocation Updates #24

Closed TechnicalSoup closed 7 years ago

TechnicalSoup commented 7 years ago

Updates to the source code for chapter 4 and 5 (Rendering and More on Rendering) to remove the BufferUtils method for off-heap memory allocation and instead use the memAlloc methods provided in org.lwjgl.system.MemoryUtil.

The memFree method calls have been placed immediately after the buffers are accessed by the OpenGL library. These calls could be moved if it's felt that improves readability of the code.

lwjglgamedev commented 7 years ago

I'm justupdating the whole source code base. I've changed a little bit how it's handled, so maybe I will not be able to merge your changes.

In any case, it will take more time since I'm struggling with a strange error with openl which makes that samples fro chapter 22 and beyond do not work.

lwjglgamedev commented 7 years ago

I've changed the code a little bit, I will close this pull request, but the changes are made.

Thanks again.