-
Notifications
You must be signed in to change notification settings - Fork 25
Chapter reorder and content for "Basics" chapter #137
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
Conversation
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.
Found 2 unrelated things... we can fix those later or treat them with this as well...
Otherwise this reshuffle should be alright
<VCProjectVersion>16.0</VCProjectVersion> | ||
<Keyword>Win32Proj</Keyword> | ||
<ProjectGuid>{E38C17E3-29B9-40BF-9372-0EB24DDE4B06}</ProjectGuid> | ||
<RootNamespace>My13HelloTriangle</RootNamespace> |
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.
Oi, where did that come from? :o
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 do not know, multiple projects seem to have that
float4 Main(VSOutput input): SV_Target | ||
{ | ||
float4 texel = Texture.Sample(LinearSampler, input.Uv); | ||
//return float4(input.Color, 1.0f) + 0.5 * texel; |
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.
This can be removed i guess
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.
Well, partly, this still exists in some other chapters, but those will all still require adjusting to what each chapter requires (though I'd assume each chapter after Texturing probably needs the texture sample
static size_t GetLayoutByteSize(VertexType vertexType); | ||
|
||
void Set(ID3D11DeviceContext* context); |
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.
Hmm where would it make sense to expose this function, when you pass the device in the class factory already? (deferred contexts are also kind of a not worthy endeavour in d3d11)
|
||
void Rendering3DApplication::CreateDepthStencilView() | ||
{ | ||
D3D11_TEXTURE2D_DESC texDesc{}; |
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.
Can we write it out as textureDescription
or textureDescriptor
please
ID3D11Texture2D* texture = nullptr; | ||
if (FAILED(_device->CreateTexture2D(&texDesc, nullptr, &texture))) | ||
{ | ||
std::cout << "DXGI: Failed to create texture for DepthStencilView\n"; |
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.
Heh std::cout
also triggers me, but once all the tuts are in place, we shall replace with spdlog
for some more real worldyisms
return; | ||
} | ||
|
||
D3D11_DEPTH_STENCIL_VIEW_DESC dsvDesc{}; |
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.
same here, can we write it out as dsvDescriptor
or dsvDescription
|
||
void Rendering3DApplication::CreateDepthState() | ||
{ | ||
D3D11_DEPTH_STENCIL_DESC depthDesc{}; |
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.
Here as well
@@ -193,7 +250,6 @@ bool Rendering3DApplication::Load() | |||
//Back | |||
4, 6, 7, | |||
7, 5, 4 | |||
|
|||
}; | |||
|
|||
D3D11_BUFFER_DESC bufferInfo = {}; |
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.
This should also be a ...Descriptor
or ...Description
to be consistent
ID3D11RenderTargetView* nullTarget = nullptr; | ||
ID3D11RenderTargetView* nullRTV = nullptr; | ||
|
||
//set to nullptr so we can clear properly |
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.
instead of saying set to nullptr so we can clear properly
write this will ensure proper clear
(its obvious that we are setting it in the line of code below, doesn't need separate mention)
…clarity, remove Models-Refactored
…into nonabstraction
…nd theres no finished chapters for these yet
todo:
Complete Models,
Complete Dear ImGui
todo:
refactor earlier projects