implemented LWJGL3 BufferAllocator#588
Conversation
|
What is the reason for all those changes? Please explain why you think it is necessary to change more than just adding the new class for lwjgl3. |
|
|
Lets start this way: Please note that this is my personal opinion, I'm not entirely sure how the rest of the jme community thinks about using statics here. |
|
Yeah, logger to LOGGER is a no-no. In general, don't change unnecessary things if you want your patch accepted. |
|
so, what do I need to do else? Do I need to revert the name of the logger field? |
|
@empirephoenix but at this moment, the field is static and we can't use different allocators at the same time. |
|
Oh you are right, my bad. I would suggest:
|
|
|
I have updated the PR. |
|
Great, thanks one last question: You set the property in the lwjgl context, what happens if it is already set by something else before? Eg a custom made allocator for a special case, would this overwrite the users property? Maybee a check should be added, to only set it, if none is set. |
|
I agree with you and I have updated the PR :) |
|
OK, looks fine for me, I will now give a little protest time (~4-7days) for others, if noone objects i will merge it. |
|
Cool :) |
|
So what are the advantages of using this allocator exactly? What's wrong with the regular one? |
|
The benefits are the one thing I'm certain about. Finally a way to efficiently manage memory manually in jme. No more directBuffer errors due to incompetent GC algorithms :) (Also it is not direct memory as far as I understand, so does not abide to it's limits, is swappable, ect.) |
|
Also https://blog.lwjgl.org/memory-management-in-lwjgl-3/ |
|
I think all agree with this PR... |
|
Merged it, thanks for the work :) |
Implemented LWJGLBufferAllocator.