- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 2
- Posts with Upvotes
- 2
- Upvoting Members
- 2
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
15 Posted Topics
Re: I recommend looking at [URL="http://www.youtube.com/watch?v=2AqO4rZOEew"]Siege[/URL] as a place to get some inspiration. IIRC The code is rather neat and functional. | |
Re: I guess the reason that framelocking would still consume 100% of the available processor cycles is the engine might only draw a frame after a defined time has passed, but still update as fast as possible in the background. You could apply a similar methodology to the call to your … | |
Re: Open Asset Import Library, [URL="http://assimp.sourceforge.net/index.html"]http://assimp.sourceforge.net/index.html[/URL], would be useful to load the different mesh formats into a single consistent interface. Then extract the required data from its structures and create your ID3DX* structures using this data. Loading of static mesh data in this way is trivial, animation data is also possible … | |
Re: If you [U]have to[/U] use a shader to manipulate the vertex data from a flat plane, the easiest way would be to load the height map into a texture, and extract the height value in the vertex shader using a call the texture2D. | |
Re: Your logic is right, you are just being let down by the syntax of your for loops. Check out examples at [URL="http://www.cplusplus.com/doc/tutorial/control/"]http://www.cplusplus.com/doc/tutorial/control/[/URL]. Also the code you posted should not compile, there are a number of syntax errors (mainly the for loops as I mentioned above). If it is a direct … | |
Re: It is fine to use a char* here over a std::string. You could determine the size of the file at runtime and allocate exactly that amount of memory for the buffer. It is also more convenient to use a std::ifstream object over a std::stringstream/std::string to access the more-convenient operators/methods which … | |
Re: Either Crypto++ [URL="http://www.cryptopp.com/"]http://www.cryptopp.com/[/URL] or OpenSSL [URL="http://www.openssl.org/"]http://www.openssl.org/[/URL] libraries should have functions to compute both md5 and sha-1 hashes. | |
Re: Something using more standard c++: #include <iostream> #include <fstream> ... ifstream myfile ("example.txt"); if(myfile.is_open()) { long begin, end; begin = myfile.tellg(); myfile.seekg (0, ios::end); end = myfile.tellg(); myfile.close(); if(begin == end) // empty } else // didn't exist | |
Re: techie1991's code is fundamentally broken anyway. s should be initialized to FLT_MAX and l to FLT_MIN. | |
Re: When you add a new employee you don't set the value of i (and j, I don't get why you have two different values here) to the appropriate position in the arrays. This is fine for a single insert if that's all you were going to do, but will cause … | |
Re: Microsoft only expose a small subset of the OpenGL functions in their implementation, so if you want to use the fun stuff I recommend you use GLEW [URL="http://glew.sourceforge.net/"]http://glew.sourceforge.net/[/URL] or something similar. | |
Re: timeGetTime is part of the Winmm library, not directx itself. You will need to also link against Winmm.lib | |
Re: From what it looks like, your functions are declared in different files. Put them all in the same .cpp file and it should be fine (merge into the one with WinMain). | |
Re: You might want to look at using an stl container (list or vector would be suitable) to maintain a collection of your enemies. It might also make sense to use a 2d array because of the layout of the enemies. To handle the moving and dropping down, maybe look at … | |
Re: I realise this is an old thread, but anyone else with the same problem (as I just had), the solution is you need to run glewInit() before any of its exposed functionality can be used. In the above example, I would run it in the init() function. |
The End.