Hi guys!
I can't believe this, but I've almost finished the advanced series. And I'm saying almost because I have one last problem that I can't figure out why it appears. When drawing an image rotated and scaled, one of the component triangles (bottom flat if I remember correctly) refuses to draw. I made sure to double check everything, but nothing seems wrong.
Meanwhile, I changed to a new laptop and upgraded to Windows 10 and VS 2015. I moved the old project here to try debugging it again, but i get a few errors while trying to build it about vector containers not being able to work with const templates. I tried over and over to get rid of the consts or change the variable type, still can't get it to work.
So, I uploaded a screenshot of the build errors and the project itself. Hope you can help me, at least with the vector containers.
End of Advanced Tutorials problem
-
- Posts: 52
- Joined: March 10th, 2015, 7:51 pm
- Location: Romania
- Contact:
End of Advanced Tutorials problem
- Attachments
-
- Thrust.rar
- (1.27 MiB) Downloaded 166 times
-
- Untitled.png
- The build errors
- (263.08 KiB) Not downloaded yet
“Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.”
– Martin Golding
– Martin Golding
-
- Posts: 4373
- Joined: February 28th, 2013, 3:23 am
- Location: Oklahoma, United States
Re: End of Advanced Tutorials problem
Get the same error in VS2015, but builds in VS2013, I'm guessing this is yet another feature that has been removed from the C++ standard between C++11 and C++14.
The other one that I have seen is using Initializer lists to initialize members in the class declaration, in the header files.
The other one that I have seen is using Initializer lists to initialize members in the class declaration, in the header files.
If you think paging some data from disk into RAM is slow, try paging it into a simian cerebrum over a pair of optical nerves. - gameprogrammingpatterns.com
-
- Posts: 4373
- Joined: February 28th, 2013, 3:23 am
- Location: Oklahoma, United States
Re: End of Advanced Tutorials problem
As far as the missing triangle,
Look in D3DGraphics::DrawTriangleTex at the lines below
should be
Look in D3DGraphics::DrawTriangleTex at the lines below
Code: Select all
DrawFlatBottomTriangleTex(v0, v2, vi, clip, tex);
Code: Select all
DrawFlatBottomTriangleTex(v0, v1, vi, clip, tex);
If you think paging some data from disk into RAM is slow, try paging it into a simian cerebrum over a pair of optical nerves. - gameprogrammingpatterns.com
-
- Posts: 52
- Joined: March 10th, 2015, 7:51 pm
- Location: Romania
- Contact:
Re: End of Advanced Tutorials problem
Thanks a lot albinopapa
I'm going to play around with the Initializer list and see the best way to replace it. I'll post back here once I have it working again, but will take a while since I'm kinda' busy right now...
I'm going to play around with the Initializer list and see the best way to replace it. I'll post back here once I have it working again, but will take a while since I'm kinda' busy right now...
“Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.”
– Martin Golding
– Martin Golding
-
- Posts: 52
- Joined: March 10th, 2015, 7:51 pm
- Location: Romania
- Contact:
Re: End of Advanced Tutorials problem
Ok, finally managed to get it to work. Had to replace the std::initializer_list with std::allocator and remove all const from std::vector<const Vec2> in PolyClosed and TriangleStrip. Everything seems to work well now
“Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.”
– Martin Golding
– Martin Golding