GentenStudios / Phoenix-OLD

Phoenix is an open world sandbox style voxel game designed to make all content optional.
BSD 3-Clause "New" or "Revised" License
30 stars 10 forks source link

Consolidate duplicate code into single function #368

Closed apachano closed 3 years ago

apachano commented 3 years ago

Authors: @apachano

Summary of changes

Caveats

Does this introduce any new bugs?

On approval

Merge

vyomfadia commented 3 years ago

Like you said, constructor making GL calls could get annoying, so just mark the coup constructor as delete as well as the move and copy assignment operators, you can leave the move constructor as default since that shouldn't interfere.

apachano commented 3 years ago

@beeperdeeper089 Alternatively it may make sense for this to be a private member function on the renderer itself? That was my original plan but for some reason I liked this last night. Something like generateRenderData(mesh)

vyomfadia commented 3 years ago

I think it may make sense as a private member, in my opinion RAII for OpenGL is quite a non-intuitive way of working it bc it's just horrid for it 😂