Jump to content
  • Advertisement

Zao

Member
  • Content Count

    443
  • Joined

  • Last visited

Community Reputation

988 Good

About Zao

  • Rank
    GDNet+

Personal Information

  • Website
  • Role
    DevOps
    Programmer
  • Interests
    Audio
    DevOps
    Education
    Programming

Social

  • Twitter
    zaoo
  • Github
    zao
  • Twitch
    zaooo
  • Steam
    ZaoFishbones

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. I believe you've got the meaning of the flag the wrong way round. If you use D3DCREATE_FPU_PRESERVE you need to ensure you don't have FP exceptions enabled. If you don't use the flag, D3D9 should disable FP exceptions and put you into single precision. If you desire to keep doubles doubles, you need to ensure like you do that FP exceptions are off, and probably hunt down whoever enabled it in your process.
  2. Several game developers have been surprised by the prevalence of vocal Phenom II owners out there, which even lack SSE4.2 SSE 4.1. I guess it's up to you to figure out how much of your market share you want to miss out on, and how many support cases you get opened by people who can't/won't read minspecs.
  3. Zao

    C++ thread problem

    The reason behind @RPTD 's answer is that std::thread copies (or moves) the arguments before calling the function. std::ref (and std::cref) gets you a copyable wrapper around a reference, which is the blessed way of passing a reference for the args of std::thread, please see the Notes at cppreference. Please note that join() on a thread is blocking until the thread completes, so your loop in main will never be reached as the thread in its current state never has a reason to return.
  4. Zao

    getaddrinfo() trouble

    See the struct definition at https://msdn.microsoft.com/en-us/library/windows/desktop/ms737530(v=vs.85).aspx typedef struct addrinfo { int ai_flags; int ai_family; int ai_socktype; int ai_protocol; size_t ai_addrlen; char *ai_canonname; struct sockaddr *ai_addr; struct addrinfo *ai_next; } ADDRINFOA, *PADDRINFOA; You're reinterpreting the start of this struct as an sockaddr, which is completely wrong. You probably want to use the ai_addr field of your addrinfo, which holds the sockaddr instead of a bunch of assorted fields.
  5. Zao

    DXGI swapchain call to action

    I don't like the tone of the article that only the newest Windows versions matter at all, only briefly touching on in which Windows version things appeared, not mentioning OS support at all in the "should I do this?" bit. But I guess that's the Microsoft way, forget the past and targetting down-level systems.
  6. In this context, "relative to" means that the space it transforms from is the one mentioned, the space of the node's parent. For the root node, that is the object space. For a child node, it's the space of the parent. It's a bit unfortunate, but the "to" in this usage isn't a direction like in "from/to".
  7. The letter/digit keys have no constants because their value are the ASCII values, so you can just use a character literal 'A' etc.
  8. template <size_t N> void f(int (&arr)[N]) { std::cout << N << std::endl; } For taking arbitrary array types, make the int a template parameter as well.
  9. In general, newer compilers have better conformance to standards, only straying if the functionality is part of a vendor extension or a long-standing defect with the compiler. Ill-formed or non-standard code will only become less and less supported, so you don't have much choice than to update your understanding of the language if you wish to move away from ancient toolchains and their quirks.
  10. Zao

    C++ Overloading Question

    The authors may have some more or less rational arguments against overloading. In this particular case, the call site may be a bit unexpected if you use NULL or 0 as a null pointer constant, as the integer overload will be chosen. There's nothing intrinsically wrong with overloading, but it can be a bit more clear at the call site what function is intended and what it does. Use common sense and adhere to local style.
  11. Zao

    OpenGL legacy to shader mapping

    The only well-defined standard location is 0 for the vertex position attribute. The use of location 2 for normals and similarly for other attributes is a NVIDIA-specific thing, and will most probably break you hard on other vendors. Please see this discussion on SO: https://stackoverflow.com/a/528824/87969 If you only care about those devices and are happy to rely on vendor-specific behaviour, the mapping should then be that gl_MultiTexCoord0 is at location 8, according to the docs.
  12. Zao

    Normal question

    When showing source code in public, it may be beneficial to ensure that your indentation is consistent. You seem to have a wild mixture of four spaces and four-wide tabs that expand very poorly in a eight-wide tab world. You may want to invest in a source code formatter or an IDE that unscrews your indentation.
  13. Zao

    Particle system

    You're picking the X, Y, and Z components from different unrelated positions as each call to GenSpherePointCorrect makes a completely new position. You need to generate a single Vector3 each loop iteration and assign its components to the vertex position.
  14. As this is the primary web search hit for the subject, any non-zero flags like the read-only depth/stencil ones in a DSV desc require feature level 11_0 or greater, the debug runtime returns invalid arg and issues a diagnostic: D3D11 ERROR: ID3D11Device::CreateDepthStencilView: A non-zero Flags field (0x1) is not valid, unless the GetFeatureLevel returns D3D_FEATURE_LEVEL_11_0 or greater. [ STATE_CREATION ERROR #2097153: CREATEDEPTHSTENCILVIEW_INVALIDFLAGS] D3D11 ERROR: ID3D11Device::CreateDepthStencilView: Returning E_INVALIDARG, meaning invalid parameters were passed. [ STATE_CREATION ERROR #148: CREATEDEPTHSTENCILVIEW_INVALIDARG_RETURN]
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!