stephen-hqxu / superterrainplus

SuperTerrain+: A real-time procedural 3D infinite terrain engine with geographical features and photorealistic rendering.
MIT License
12 stars 1 forks source link

Possible illegeal memory access on GPU #2

Closed stephen-hqxu closed 3 years ago

stephen-hqxu commented 3 years ago

Currently

Suggestion

stephen-hqxu commented 3 years ago

Fixes

Now the copy of the class that is going to be copied to device will be kept at host side, to retain the deivce pointer inside.

There are some more improvements about the usage of pointer. I will try to cut down the number pointer used in-class to avoid troubles of memory leaks and implementations of explicit constructors #3.