Advertisement Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

451 Neutral

About Ashkan

  • Rank
    Advanced Member
  1. Quote:Original post by michprog31 I can also recall several people from northern and western European countries who don't like coming into US offices because they don't like working more than 31 hours a week. As someone who has worked in Europe (Germany), I assure you that it's not the case everywhere. 9-10 hours a day was the norm where I was working. Quote:Original post by michprog31 Or maternity time for men so they can breastfeed (Germany). And they pay a high percentage of their income in taxes for exactly such benefits. You can't have it both ways. Overall, the situation, neither in the U.S. nor in Europe, is as dark as you make it seem.
  2. Ashkan

    Recomended C++ books

    Quote:Original post by sjaakiejj Two really good books on the subject are "Effective C++" and "More Effective C++". They're short but easy to read through. Wrong. While they are both great books and definitely belong in the shelf of any intermediate C++ programmer, they are not beginner-level material. I strongly advise against them as first books. @OP C++ is a complex beast. You would want to start learning programming with a language that allows you to concentrate on the concepts rather than the complexities of the language. Remember that learning to program is not the same as learning a programming language. A good first programming language would get out of your way and allow you to focus on what really matters: the concepts. For this reason, Python is a much better choice for novice programmers. If you have no option, such as when you have to learn C++ because your university requires you, "Thinking in C++" is a great first book as jpetrie mentioned.
  3. Quote:Original post by Joni-Matti I've always understood that it decreases performance. In my case, using timeBeginPeriod(1) improves performance, which I don't understand. Here are some numbers of one of my benchmarks for the memory pool version: timeGetTime: 810 ms QPC: 807 ms timeGetTime+timeBeginPeriod(1): 602 ms QPC+timeBeginPeriod(1): 606 ms QPC+timeBeginPeriod(1) is just for reference. I know that timeBeginPeriod(1) doesn't have any effect on QPC, but it was quite weird that still the program execution time improved. This is the first time I see this happening. I've used timeGetTime() and QPC for a long time and this has occurred never before. Oh, and even adding cin.get(); to the end of the main() resulted that performance decreased (from 607 ms to 813 ms). It would be good to know which timer or other profiling mechanism to trust, so that I can concentrate on the cache problem. timeBeginPeriod() *globally* sets the system quantum so it also affects all other applications running at the moment. This is so abhorrent I wonder why it's allowed!
  4. Ashkan

    Weird C++ casting problem

    Generally speaking using reinterpret_cast and multiple inheritance is a recipe for disaster as reinterpret_cast simply changes the static type of the pointer without making the required adjustments to the pointer value - adjustments that are automatically taken care of by the compiler behind the scene when static_cast or dynamic_cast is used. Moreover, you cannot downcast a virtual base class pointer to a derived class pointer using static_cast. This is because the case may involve some pointer adjustment that depends on the dynamic type of the object pointed to. The solution is to use dynamic_cast, which performs the correct conversion by checking the real type of the object. So long story short, with non-virtual multiple inheritance you can use static_cast to walk the tree, while with virtual inheritance, dynamic_cast is the only way. If you want to avoid dynamic_cast, stay away from virtual inheritance.
  5. Quote:Original post by belfegor I don't know what is cgfx equivalent for dx effect CommitChanges. cgUpdatePassParameters? This might prove useful.
  6. Another approach: Policy Based Design. template< typename Impl > class IConsole : private Impl { public: void write( const std::wstring& msg ) { Impl::writeImpl( msg ); } }; class Impl1 { protected: void writeImpl( const std::wstring& msg ) { // Implementation } }; class Impl2 { protected: void writeImpl( const std::wstring& msg ) { // Implementation } }; #ifdef CONDITION1 typedef IConsole< Impl1 > Console; #elif CONDITION2 typedef IConsole< Impl2 > Console; #endif
  7. Quite frankly, the time you're spending on such tiny issues is way better spent on developing your application.
  8. Ashkan

    Multithreaded Rendering

    Don't be surprised if multithreaded rendering doesn't result in as much a gain as you're expecting or even worse lowers the performance altogether, especially considering that on a multi-core machine, command lists are already dispatched for execution on multiple threads in the driver. Based on what I've seen, unless there's a significant amount of parallelism in your rendering pipeline, the cost outweighs any benefits substantially. The MultithreadedRendering11 sample that comes with the SDK for instance, which is supposed to make a good use of the API, runs twice / thrice slower on my quad core machine when choosing the MT renderpath as opposed to ST. Anyway, keep us informed. I'd love to see how your implementation is going to end up.
  9. Ashkan

    How not to sleep after 3 minutes of coding?

    This is not about you not having enough coffee, sleep or exercise. More often than not, it's about you not being sufficiently interested in or motivated by whatever it is you're doing. The number one question that you have to ask yourself in these situations is this: Am I or am I not genuinely interested in what I am doing? If you're not, then maybe you should start looking for your true passion in life. If, on the other hand, you are interested in what you're doing and these feelings are temporary, these articles might prove useful: 5 Steps To Move Out Of Stagnancy In Life 11 Reasons Why You Aren't Getting Results 11 Practical Ways To Stop Procrastination 12 Useful Ways To Get Out Of Ruts 13 Strategies To Jumpstart Your Productivity
  10. Quote:Original post by CDProp What if you expect it to occur exactly 1 in 10,000 times? That's exactly what abort() is for.
  11. DieterVW, so just to double-check, the best way to render a scene is to have big dynamic vertex/index buffers per input layout that are filled on the fly each frame as opposed to storing the geometry on a per mesh basis, right?
  12. Ashkan

    No More File Loading...

    Quote: but for some reason the Milkshape viewer program is using something different in the calculation setup or in the actual interpolation, and I'm truly sick of trying to figure out what the hell is wrong... I used to write loaders as part of a contract job for two years. I wrote two loaders for Google SketchUp and Autodesk DWF files during that period. I spent approximately two months getting a functional loader up and running for both of those formats that were capable of loading some 80% of all of the models that we'd randomly chosen as test cases. But between inaccurate exporters, lack of documentation and all sorts of hidden crazy hacks that I had to discover along the way, I spent the other one and a half year cutting the corner cases. I left the job when I was this close to having a stroke during the last week, when I finally realized that no matter how many problems I solve, how many bugs I fix or how many hidden hacks I discover, someone will eventually come up with the one model that'll break my code and I'm never going to get paid completely. Even thinking about it fills me with excruciating rage. The moral of the story: I'd rather drive taxis than writing loaders.
  13. Ashkan

    Game Engine help

    Define "Advanced". What beginner to intermediate software developers consider advanced, more experienced designers may think of as common knowledge. Anyway, this is a good introduction on the subject: Game Engine Architecture Game Engine Design by Dave Eberly (linked above by elurahu) is also a good introductory book.
  14. Ashkan

    Transforms / 4x4 matrices

    From Wild Magic Engine: Wm4Transformation.h Wm4Transformation.inl Wm4Transformation.cpp Wm4Transformation::GetHomogeneous will address your question.
  15. Ashkan

    D3D11 SwapChain confusion

    Your observation is correct. More information can be found here.
  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!