-
Notifications
You must be signed in to change notification settings - Fork 15
ex using new debug draw aabb + added draw mesh obb in ex 12 #202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
very nice, very clean |
| params.assetManager = m_assetMgr; | ||
| params.transfer = getTransferUpQueue(); | ||
| params.drawMode = ext::debug_draw::DrawAABB::ADM_DRAW_BATCH; | ||
| params.batchPipelineLayout = ext::debug_draw::DrawAABB::createDefaultPipelineLayout(m_device.get()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm pretty sure the push constant range for the layout can be wrong here by accident see review of the main nabla PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please Address
| @@ -0,0 +1,50 @@ | |||
| import org.DevshGraphicsProgramming.Agent | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove the file please, we have now actions based CI
| @@ -0,0 +1,28 @@ | |||
| { | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| std::array<float32_t3, 24> getVerticesFromAABB(core::aabbox3d<float>& aabb) | ||
| { | ||
| const auto& pMin = aabb.MinEdge; | ||
| const auto& pMax = aabb.MaxEdge; | ||
|
|
||
| std::array<float32_t3, 24> vertices; | ||
| vertices[0] = float32_t3(pMin.X, pMin.Y, pMin.Z); | ||
| vertices[1] = float32_t3(pMax.X, pMin.Y, pMin.Z); | ||
| vertices[2] = float32_t3(pMin.X, pMin.Y, pMin.Z); | ||
| vertices[3] = float32_t3(pMin.X, pMin.Y, pMax.Z); | ||
|
|
||
| vertices[4] = float32_t3(pMax.X, pMin.Y, pMax.Z); | ||
| vertices[5] = float32_t3(pMax.X, pMin.Y, pMin.Z); | ||
| vertices[6] = float32_t3(pMax.X, pMin.Y, pMax.Z); | ||
| vertices[7] = float32_t3(pMin.X, pMin.Y, pMax.Z); | ||
|
|
||
| vertices[8] = float32_t3(pMin.X, pMax.Y, pMin.Z); | ||
| vertices[9] = float32_t3(pMax.X, pMax.Y, pMin.Z); | ||
| vertices[10] = float32_t3(pMin.X, pMax.Y, pMin.Z); | ||
| vertices[11] = float32_t3(pMin.X, pMax.Y, pMax.Z); | ||
|
|
||
| vertices[12] = float32_t3(pMax.X, pMax.Y, pMax.Z); | ||
| vertices[13] = float32_t3(pMax.X, pMax.Y, pMin.Z); | ||
| vertices[14] = float32_t3(pMax.X, pMax.Y, pMax.Z); | ||
| vertices[15] = float32_t3(pMin.X, pMax.Y, pMax.Z); | ||
|
|
||
| vertices[16] = float32_t3(pMin.X, pMin.Y, pMin.Z); | ||
| vertices[17] = float32_t3(pMin.X, pMax.Y, pMin.Z); | ||
| vertices[18] = float32_t3(pMax.X, pMin.Y, pMin.Z); | ||
| vertices[19] = float32_t3(pMax.X, pMax.Y, pMin.Z); | ||
|
|
||
| vertices[20] = float32_t3(pMin.X, pMin.Y, pMax.Z); | ||
| vertices[21] = float32_t3(pMin.X, pMax.Y, pMax.Z); | ||
| vertices[22] = float32_t3(pMax.X, pMin.Y, pMax.Z); | ||
| vertices[23] = float32_t3(pMax.X, pMax.Y, pMax.Z); | ||
|
|
||
| return vertices; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unused function
| smart_refctd_ptr<IGPUGraphicsPipeline> m_pipeline; | ||
| smart_refctd_ptr<IGPUGraphicsPipeline> m_streamingPipeline; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unused variables
| InputSystem::ChannelReader<IMouseEventChannel> mouse; | ||
| InputSystem::ChannelReader<IKeyboardEventChannel> keyboard; | ||
|
|
||
| core::smart_refctd_ptr<IDescriptorPool> m_descriptorSetPool; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unused variable
|
|
||
| uint16_t gcIndex = {}; // note: this is dirty however since I assume only single object in scene I can leave it now, when this example is upgraded to support multiple objects this needs to be changed | ||
|
|
||
| float fov = 60.f, zNear = 0.1f, zFar = 10000.f, moveSpeed = 1.f, rotateSpeed = 1.f; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you probably want them constexpr near where they are getting used instead of being members
| Camera camera; | ||
| video::CDumbPresentationOracle oracle; | ||
|
|
||
| uint16_t gcIndex = {}; // note: this is dirty however since I assume only single object in scene I can leave it now, when this example is upgraded to support multiple objects this needs to be changed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unused variable
| hlsl::shapes::AABB<3, float> testAABB = hlsl::shapes::AABB<3, float>{ { -5, -5, -5 }, { 10, 10, -10 } }; | ||
|
|
||
| using streaming_buffer_t = video::StreamingTransientDataBufferST<core::allocator<uint8_t>>; | ||
| smart_refctd_ptr<streaming_buffer_t> streamingBuffer; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unused variable
No description provided.