Lesson%202%3A%20Lets%20Go%203D%21/1.%203D%20Cube/ #6
Replies: 4 comments 4 replies
-
|
I got these errors during compilation: In file included from /Users/cooper/Projects/pcl_analyzer/src/mtl_engine.mm:1:
In file included from /Users/cooper/Projects/pcl_analyzer/src/mtl_engine.hpp:6:
/Users/cooper/Projects/pcl_analyzer/3rd_party/metal-cpp-cmake/metal-cmake/metal-cpp/Metal/MTLRenderPass.hpp:250:90: error:
no type named 'SamplePosition' in namespace 'MTL'
void setSamplePositions(const MTL::SamplePosition* positions, NS::UInteger count);
~~~~~^
/Users/cooper/Projects/pcl_analyzer/3rd_party/metal-cpp-cmake/metal-cmake/metal-cpp/Metal/MTLRenderPass.hpp:252:84: error:
no type named 'SamplePosition' in namespace 'MTL'
NS::UInteger getSamplePositions(MTL::SamplePosition* positions, NS::UInteger count);
~~~~~^
/Users/cooper/Projects/pcl_analyzer/3rd_party/metal-cpp-cmake/metal-cmake/metal-cpp/Metal/MTLRenderPass.hpp:760:75: error:
no type named 'SamplePosition' in namespace 'MTL'
_MTL_INLINE void MTL::RenderPassDescriptor::setSamplePositions(const MTL::SamplePosition* positions, NS::UInteger count)
~~~~~^
/Users/cooper/Projects/pcl_analyzer/3rd_party/metal-cpp-cmake/metal-cmake/metal-cpp/Metal/MTLRenderPass.hpp:766:77: error:
no type named 'SamplePosition' in namespace 'MTL'
_MTL_INLINE NS::UInteger MTL::RenderPassDescriptor::getSamplePositions(MTL::SamplePosition* positions, NS::UInteger count)
~~~~~^
4 errors generated.And this can be solved by adding this line at the top of mtl_engine.hpp. #include "Metal/MTLTypes.hpp"Hope this helps if anyone encountered this error. :D |
Beta Was this translation helpful? Give feedback.
-
|
Amazing tutorial so far! It has been a great resource for me to create a game engine using metal-cpp. How is the progress on the lighting and 3D Models tutorial? |
Beta Was this translation helpful? Give feedback.
-
|
Do we need any synchronisation around that memcpy that's copying the transformation data to the GPU? Is it not in theory possible that the GPU might be reading from that buffer at the same time that we're copying into it for the next frame? I've seen other examples deal with this by multiplying the size of buffers by N, where N is the number of frames in-flight, and then writing/reading to sections of the buffers based on which frame is currently being rendered. |
Beta Was this translation helpful? Give feedback.
-
|
I am not sure the data in Step 3: View Transformation is correct. Perhaps the order was meant to be R, U, F? I am not sure, this is all new to me. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Lesson%202%3A%20Lets%20Go%203D%21/1.%203D%20Cube/
https://metaltutorial.com/Lesson%202%3A%20Lets%20Go%203D%21/1.%203D%20Cube/
Beta Was this translation helpful? Give feedback.
All reactions