Advertisement Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

260 Neutral

About philipptr

  • Rank
  1. @jyk: had a very long search to find the leak wihtout debug tools and finally found a piece of code, where I freed variable twice instead of that one and a similar named one. After that I thought I still had a small leak, but it seems like windows was just too lazy to free all the memory properly. (Was about 2mb above what the memory usage should have been) @Kitt3n: seems way to expensive for me as a student, but I might have a go at the trial version ;) @rioki: I think I am going to install Linux again to do exactly the same thing you do ;) Thanks for the help guys, I didn't make this thread because I was too lazy to search for solutions, but because I thought there might be a easy soution which I was missing.
  2. I didn't know what the code does, so I thought he might be checking whether or not the compiler is visual studio to because there might be some extra stuff needed for that.
  3. Quote:Original post by Nypyren There are a bunch of free solutions available if you search. Maybe I didn't express myself properly: I did search for free solutions and I tried to get some to work (I am trying splint at the moment for example). But none got none of them to work, which surprised me since I remember using valgrind of linux which was very easy to get to work. So I thought I would ask here since someone might have a tip what the easiest way might be. _fastcall: I'm using g++ and cant seem to get that example to work: ... #ifndef MEMCHECK_H #define MEMCHECK_H #if defined( _MSC_VER ) // Visual Studio only #define _CRTDBG_MAP_ALLOC #include <stdlib.h> #include <crtdbg.h> #define new DEBUG_NEW #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ ) // Add in main(): // _CrtSetDbgFlag ( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF ); #endif // _MSC_VER #endif // MEMCHECK_H int main ( int argc, char** argv ) { _CrtSetDbgFlag ( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF ); ... results in: main.cpp:37: error: `_CRTDBG_ALLOC_MEM_DF' was not declared in this scope main.cpp:37: error: `_CRTDBG_LEAK_CHECK_DF' was not declared in this scope main.cpp:37: error: `_CrtSetDbgFlag' was not declared in this scope
  4. philipptr

    Collision Detection using SDL

    Proper collision detection between 2 Balls should be rather easy mathematics. You could just use the Pythagorean theorem as follows. If you have the mid points x1,y1 and x2,y2 and the corresponding radius r1 and r2 you could just check if (r1+r2) < sqrt((x2-x1)²+(y2-y1)²) If that returns true they intersect, if it returns falls they dont intersect.
  5. I search for a quick and easy solution to find memory leaks, without the need to change much (or any) of the code. Something like mcheck.h for windows. Any ideas?
  6. philipptr

    Slow OpenGL (maybe sw) after standby

    ah okay, I am using a 7600gt and wasn't running the latest drivers. Updated now, thanks ;)
  7. For the second time this week I return to my pc, which was in standby mode, just to realize that OpenGL applications suffer from extremly slow (<1fps) performance. DirectX runs fine, it happens only to OpenGL. The only explanation I could think of, was that OpenGL uses its software renderer. What are the reasons for it to get activated and how do I activate/deactivate it?
  8. Quote:Original post by Servant of the Lord [Setting up SDL with Code::Blocks on Windows] I am talking about SDL_Mixer. Quote:Original post by Nypyren .a files are typically called .lib files in Windows land... did you get one of those when you compiled it? In the lib folder of mingw all library files are called .a plus when I put the linux .a files in there the linker is able to find -lSDL_Mixer but this doesn't seem to work either since I get undefined references then...
  9. Quote:Original post by swiftcoder Quote:Original post by philipptr Maybe I am blind or dumb, but I can't seem to find the .a files I would need for g++. Well, at least I think I need them... I do, right?All the SDL libraries are distributed as dynamic libraries (.DLL) on Windows. yes, but for compiling something that links sdl i still need libSDLmain.a
  10. Maybe I am blind or dumb, but I can't seem to find the .a files I would need for g++. Well, at least I think I need them... I do, right?
  11. Quote:Original post by jyk Did you do the 'configure' step? How would I do that on windows? On Linux I would just type ./configure which seems impossible in a win32 commandline :/
  12. I really don't get it. Everytime I try to compile a library I encounter a different problem. Is there some kind of FAQ that solves most problems? Is it easier with Visual studio than with code::blocks + g++? (I use the latter one) Just to give an example: SDL_mixer: Documentation says nothing about windows compiling. Pretty much all it says is: Quote:./configure make make install So I download make and get Quote:C:\Dokumente und Einstellungen\Philipp\Eigene Dateien\c++\Unixutils\SDL>make make: Nothing to be done for `'. C:\Dokumente und Einstellungen\Philipp\Eigene Dateien\c++\Unixutils\SDL>make install make: Nothing to be done for `'. make: *** No rule to make target `install'. Stop. Am I the only person with such problems, and if so why? :(
  13. philipptr

    Sprites in 3d

    Thanks, I didnt know the term billboard. Problem solved :)
  14. philipptr

    Sprites in 3d

    I try to get quads facing the camera after manipulating the view with glRotatef. Whats the best way to do that? current code looks like this: glLoadIdentity(); glTranslatef(0, 0, -zoom); glRotatef(float(rotx)/2,0,0.5f,0); glRotatef(float(roty)/2,0.5,0,0.0f); glTranslatef(field[a].x,field[a].y,field[a].z); glBegin(GL_QUADS); glVertex3f(-0.01f,-0.01f, 0.0f); glVertex3f( 0.01f,-0.01f, 0.0f); glVertex3f( 0.01f, 0.01f, 0.0f); glVertex3f(-0.01f, 0.01f, 0.0f); glEnd();
  15. Thanks for the answers. Quote:Original post by Porthos And how do you want to find the exact location where the camera data lies? ToohrVyk's approach (controlling input) is much easier to implement, I assume. Well even with controlling input I would have to find out where the unit is thats currently selected. Actually there is a hotkey for moving the camera for that location and there are already applications which spam that hotkey, but it's not a very good solution since it's not working fast enough and isn't very smooth.. well i think i'll try both ;)
  • 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!