This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This example shows a demo as per new deallocation model suggestion. | |
// Here, the derive class explicitly deallocates | |
// a. owned resources. | |
// b. based class resources | |
#include <iostream> | |
using namespace std; | |
class Position // GPU allocator/deallocator for position buffers | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This example shows a demo as per existing Pan3D Model. | |
// Here, each class is responsible to release it own resources. | |
#include <iostream> | |
using namespace std; | |
class Position // GPU allocator/deallocator for position buffers | |
{ | |
public: | |
Position() { cout << "Position Ctor" << endl; Allocate(); } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Enable Metal validation layer: 0FF-0, ON-1 | |
export METAL_DEVICE_WRAPPER_TYPE=1 | |
export METAL_ERROR_MODE=5 | |
export METAL_DEBUG_ERROR_MODE=5 | |
# Clean and make | |
make clean && make | |
# Execute | |
./YourExecutableName |
NewerOlder