• Content count

  • Joined

  • Last visited

Community Reputation

431 Neutral

About matt77hias

  • Rank

Personal Information


  • Twitter
  • Github

Recent Profile Visitors

3873 profile views
  1. DX11 DirectX 11 , Where to start?

    Thanks for the info.
  2. DX11 DirectX 11 , Where to start?

    BTW @ericrrichards22 I noticed your bookshelf while googling some D3D11 stuff. I wonder since you have all three books that I mentioned, if you know some other more advanced D3D11 books (C++, no SlimDX)?
  3. Sky Domes

    Could I still achieve the following (by applying stretching the transformation some how): The sky above the camera appears flatter (less curved).
  4. Your code is only telling part of the story. Add the copy and move constructor, copy and move assignment operator as well. They will be equal to the default, but you can add some printing as well. BTW: the content in your map is destructed as well in your second code listing.
  5. Same quality as what? As providing the coordinate frame yourself? It is not numerically the same, but that is not a real issue for your purposes. It is a perturbation (i.e. small scale), so that will be fine.
  6. So why bother then? If you do not want to learn why and how things work, just reuse the code.
  7. Try this: #include <iostream> struct Widget { Widget() : m_data(0) { std::cout << "Constructor" << std::endl; } Widget(const Widget &widget) : m_data(widget.m_data) { std::cout << "Copy Constructor" << std::endl; } Widget(Widget &&widget) : m_data(widget.m_data) { std::cout << "Move Constructor" << std::endl; } ~Widget() { std::cout << "Destructor" << std::endl; } Widget &operator=(const Widget &widget) { std::cout << "Copy Assignment Operator" << std::endl; m_data = widget.m_data; return *this; } Widget &operator=(Widget &&widget) { std::cout << "Move Assignment Operator" << std::endl; m_data = widget.m_data; return *this; } int m_data; }; const Widget Foobar() noexcept { std::cout << "Foobar" << std::endl; const Widget widget; return widget; } int main() { std::cout << "Begin" << std::endl; Widget widget = Foobar(); std::cout << "End" << std::endl; } Visual Studio C++ Web Compiler Begin Foobar Constructor Copy Constructor // presume Debug mode End Destructor (GCC?) C++ Web Compiler C++14: Begin Foobar Constructor End Destructor C++11: Begin Foobar Constructor End Destructor C++98 (without move semantics and noexcept): Begin Foobar Constructor End Destructor All due to RVO (Return Value Optimization) which already existed before introducing move semantics.
  8. Sky Domes

    How many ico sphere subdivisions steps does one normally use for rendering sky domes? Depending on the resulting number of vertices, does one normally use the Geometry Shader for the tessellation or just bind a mesh? Which non-uniform scaling does one typically apply to transform the ico sphere to an ellipsoid (flatter appearance thus more natural)? For rendering an ico sphere as model, I typically use 5k triangles (2.5k vertices, 5 subdivision steps).
  9. Alternatively, you can use Tangent Space Normal Mapping without Precomputed Tangents. This does not require tangents (or bitangents) stored per vertex at the expense of doing all calculations in the pixel shader. Info + GLSL Since, I do not use GLSL myself, I also have an HLSL version. Edit: My apologies, didn't read the full answer before posting
  10. As a side note: You can use a create a resource manager that constructs instances of a subclass of VertexShader (which should have a virtual destructor) by using variadic templates to pass the constructor arguments to the base class VertexShader, and that stores weak pointers to them. That way the resource manager is kind of notified on deletion. Take a look at: SharedresourcePool in the DirectXTK.
  11. Ah ok, I thought you meant something like this: std::unordered_map< LPCSTR, std::unique_ptr< VertexShader > & > vertexShaders;
  12. A reference as data element in the collection?
  13. Take a look at the Return Value Optimization example on Wikipedia. It is possible that the copy assignment operator is invoked twice (which also implies that the destructor is invoked twice). Although, I really doubt that any C++11/14 compiler would use a copy assignment in the presence of move semantics?
  14. The copy is not guaranteed due to C++'s Return Value Optimization. The object or class instance gets destructed, not the class itself. Idd.: An object or class instance is returned, not the class itself. Yes, the copy constructor is used resulting in a copy of vertexShader.
  15. Need House Models Made

    Realistic or cartoon, modern or medieval? With textures? With normal mapping? High or low poly count? Model format? With texture coordinates and normals per vertex?