• Advertisement

Sent1nel

Member
  • Content count

    11
  • Joined

  • Last visited

Community Reputation

100 Neutral

About Sent1nel

  • Rank
    Member
  1. [quote name='MJP' timestamp='1331158808' post='4920222'] [quote name='Sent1nel' timestamp='1331145203' post='4920145'] The only example I can think of is in non-interleaved data scenarios, but that doesn't really seem like something that should be encouraged through the API. :\ [/quote] Why not? Interleaved isn't always the best way to lay out your vertex data. [/quote] There is nothing wrong with non-interleaved data per se, it just don't have the same performance characteristics as interleaved data (see Game Programming Gems 1 or [url="https://developer.apple.com/library/ios/#DOCUMENTATION/3DDrawing/Conceptual/OpenGLES_ProgrammingGuide/TechniquesforWorkingwithVertexData/TechniquesforWorkingwithVertexData.html"]here[/url]). I just find it odd that Direct3D seems to expose the use of vertex buffer arrays whereas, as far as I can tell, OpenGL does not.
  2. I've been trying to figure out why [url="http://msdn.microsoft.com/en-us/library/windows/desktop/ff476456(v=vs.85).aspx"]ID3D11DeviceContext::IASetVertexBuffer[/url][url="http://msdn.microsoft.com/en-us/library/windows/desktop/ff476456(v=vs.85).aspx"]s[/url] let's you set an array of vertex buffers. Does anyone know of a scenario where you would use an array of vertex buffers? The only example I can think of is in non-interleaved data scenarios, but that doesn't really seem like something that should be encouraged through the API. :\ Edit:: Thanks for letting me know about the wrong link. Fixed it now.
  3. I have a project that has both VS 2008 and VS 2010 solutions. Everything compiles fine across bother projects. When I start my server on VS 2008 server (non-blocking) and try to connect a client through 127.0.0.1::20175 I get the error "[u][b]No connection could be made because the target machine actively refused it."[/b][/u] This does not occur on VS 2010, can anyone explain why?? I tried having a friend connect over the web with the VS 2010 exe's (client and server) and it worked just fine. Then tried with the VS 2008 and it failed with the error I mentioned above. I then tried connecting to myself via the loopback address and got the same error. So its definitely not the firewall. Also when debugging the server, the server does not even receive an accept() event when a client tried to join. Its almost as if the client didn't even try to connect. Here is my Connect function below:: [code]// Create a TCP socket and attemp to connect to a server ib the // specificed IP address and Port number. // if coalesce is false Nagle algorithim is turned off : socket is set to not TCP_NODELAY int NETConnectSock(SOCKET& newSocket, const String& ip, const String& port, bool coalesce) { bool optVal = TRUE; int optLen = sizeof(bool); // first, load up address structs with getaddrinfo() ADDRINFOT hints; std::memset( &hints, 0, sizeof(ADDRINFOT) ); hints.ai_family = AF_INET; // Use AF_UNSPEC for IPv4 or IPv6 compatibility hints.ai_socktype = SOCK_STREAM; // Specify TCP usage hints.ai_protocol = IPPROTO_TCP; // Specify TCP usage ADDRINFOT* pResult = 0; GetAddrInfo( ip.c_str(), port.c_str(), &hints, &pResult ); for (ADDRINFOT* p = pResult; p != NULL; p = pResult->ai_next) { // Create the socket newSocket = socket(p->ai_family, p->ai_socktype, p->ai_protocol); if (newSocket == INVALID_SOCKET) { Cout << ieS("Creating socket TCP failed.") << WSAGetLastError() << std::endl; NETPrintError(); continue; // skip this loop and go to ai_next } // if coalesce is false Nagle algorithim is turned off if (!coalesce) { if ( setsockopt( newSocket, IPPROTO_TCP, TCP_NODELAY, (char *)&optVal, optLen ) == SOCKET_ERROR ) { Cout << ieS("Could not set TCP_NODELAY with setsockopt.") << std::endl; NETPrintError(); closesocket(newSocket); newSocket = INVALID_SOCKET; continue; } } // This function establishes an Internet connection with the server at socket address address if ( connect(newSocket, p->ai_addr, (int)p->ai_addrlen) == SOCKET_ERROR ) { // Free up used resources Cout << ieS("Could not connect TCP socket.") << std::endl; NETPrintError(); closesocket(newSocket); newSocket = INVALID_SOCKET; continue; } break; } // Free up used resources FreeAddrInfo(pResult); if (newSocket == INVALID_SOCKET) { Cout << ieS("Socket Invalid.") << std::endl; NETPrintError(); return 1; } Cout << ieS("Connnected to: ") << std::endl; Cout << ieS("IP: ") << ip << std::endl; Cout << ieS("Port: ") << port << std::endl; return 0; } [/code]
  4. I've implemented an abstracted renderer that keeps my calls to direct3d or opengl hidden away from the higher levels of my framework. Unfortunately this has left me with using the fixed function pipelines of the rendering API's. I was hoping to add support for loading in effect files but without using something like ID3DXEffect, so as the user at the application programming level can manage their use, but am unsure as to how to go about creating a shader loader? I've looked into a number of different open source engines to see if I can get an idea as to how to go about doing this but so far only the WildMagic engine has been easiest to understand, but it looks like a lot of hog work of which I don't have the time to do for my framework. Does anyone have any suggestions or examples of how to provide effect loading support that maintains abstraction from any particular API's?
  5. I came across a paper titled "Improving Large Vector Operations with C++ Expression Template and ATLAS" by L. Plagne and F. H¨ulsemann. It can be found through a quick google search. The use of CRTP (curiously recurring template pattern) seems pretty interesting in forming a template maths library. I was wondering if anyone could take a look at the paper also and discuss if it would be worthwhile implementing a full blown maths library based on this technique. It does seem like a lot of code just for some simple functionality, but if the perfrormance increase is true it may be worth it?
  6. Boost enable_if, Help Required

    I moved everything into the class declaration just to make sure it was not that casuing the problems.( I was using a .inl file before splitting the class from the functions ). It's still throwing compile errors. It's not saying "no such thing as type" in enable_if_c, which would mean the boolean condition is getting set as false.
  7. Boost enable_if, Help Required

    I also just tried the boost::enable_if_c, and it compiles but not builds. I get external linker errors. error LNK2019: unresolved external symbol "public: __thiscall Engine::Maths::Vector<3,float>::Vector<3,float>(float const &,float const &,float const &)" (??0?$Vector@$02M@Maths@Engine@@QAE@ABM00@Z) referenced in function _main Main.obj :'(
  8. Boost enable_if, Help Required

    Sorry nipped away for some dinner. The error I am getting if I implement what you just described is : error C2955: 'boost::enable_if' : use of class template requires template argument list : error C2974: 'boost::enable_if' : invalid template argument for 'Cond', type expected template < std::size_t N = 3, typename T = float > class Vector { Vector(const typename boost::enable_if<N==1,T>::type &x); Vector(const T &x, const T &y); Vector(const T &x, const T &y, const T &z); Vector(const T &x, const T &y, const T &z, const T &w); } I tried inserting the typename boost::enable_if<N==1,T>::type into both the declartion and the actual constructor function.
  9. I am trying to use boost enable_if for a vector class of which can be set to be of various dimensions. I want to be able to hide specific constructors and functions of which do not apply to all types of vector. The error I am getting is related to the std::size_t in the example below. Could someone show me how to use enable_if? example template < std::size_t N = 3, typename T = float > class Vector { Vector(const T &x); Vector(const T &x, const T &y); Vector(const T &x, const T &y, const T &z); Vector(const T &x, const T &y, const T &z, const T &w); }
  10. ATL for games programming

    Is that the primary reason for not using ATL? From what I can see ATL could be easly used in Windows for some performance gain as you could create multiple windows without having to use virtual functions in some base window class. I'm not sure if I am presenting my argument very well, but an example I can point to is in David Eberly's Geometric Tools Engine. His windows application class makes use of a bunch of virtual functions for OnInput, OnCreate etc, to be later inherited through other child classes. This strikes me as odd as the virtual's can be avoided if using ATL? or am I wrong...
  11. After spending a few days looking into Win32 programming and trying to figure out good ways in which flexable window's based classes can be created, I keep coming across ATL. It just seems to fit pretty well with object orientated design (which it's for) and could be implemented in a game engine. But after searching through open soruce engine code and looking at engine programming books, there seems to be no use of ATL what so ever. Is there anyone working on game engine programming who could tell my why ATL does not seem to be used for creating Win32 games?
  • Advertisement