• Advertisement

DMINATOR

Member
  • Content count

    775
  • Joined

  • Last visited

Community Reputation

240 Neutral

About DMINATOR

  • Rank
    Advanced Member
  1. [SDL] Mouse button Down?

    Check: /* Function prototypes */ /* * Retrieve the current state of the mouse. * The current button state is returned as a button bitmask, which can * be tested using the SDL_BUTTON(X) macros, and x and y are set to the * current mouse cursor position. You can pass NULL for either x or y. */ extern DECLSPEC Uint8 SDLCALL SDL_GetMouseState(int *x, int *y); With: /* Used as a mask when testing buttons in buttonstate Button 1: Left mouse button Button 2: Middle mouse button Button 3: Right mouse button Button 4: Mouse wheel up (may also be a real button) Button 5: Mouse wheel down (may also be a real button) */ #define SDL_BUTTON(X) (1 << ((X)-1)) #define SDL_BUTTON_LEFT 1 #define SDL_BUTTON_MIDDLE 2 #define SDL_BUTTON_RIGHT 3 #define SDL_BUTTON_WHEELUP 4 #define SDL_BUTTON_WHEELDOWN 5 #define SDL_BUTTON_LMASK SDL_BUTTON(SDL_BUTTON_LEFT) #define SDL_BUTTON_MMASK SDL_BUTTON(SDL_BUTTON_MIDDLE) #define SDL_BUTTON_RMASK SDL_BUTTON(SDL_BUTTON_RIGHT) in SDL_mouse.h
  2. Spotlight On: Us!

    Quote:How old are you? 24 Quote:How long have you been programming? Started at 16. 8 Years total now including 2 years professional. Quote:What would you say is the hardest thing about being a programmer? I am not sure, maybe fixing code created by someone else :) ? Quote:What personal programming achievement are you proudest of?
  3. How did you check the memory ? Did you use Task Manager for that ? In that case you don't have to worry it is normal behaviour for any windows application. If you want to check if memory leaks are really occuring then you need to use crtdbg.h
  4. XP delayed logon.

    Hmm I got the same problem with my canon photo drivers. There is some service they are starting and can't start because I have disabled it. To find exactly what is delaying it look in the event viewer under administrative options in the control panel. Check the error messages and google them :)
  5. Quote:Original post by louisx Whoa... that's a great snowfall :D i love it very much ^^ umm... can you take a look of my code and..tell me which part that should i change into?and how much the value? Thanks all :) Well I would rewrite it all together and make it simple, but I don't have time for that. Sorry. I can suggest though that you check Crystal Space 3D engine. This is what inspired me to make a snow effect :)
  6. Hi Don't know if it might help but for the most simple particle simulation like this clicky there are only few things needed: 1. The particle speed is always constant and it doesn't accelerate. Otherwise they would look more like rain and unrealistically. 2. Each frame the particle should get small random direction for X,Y,Z coordinates. This would make it look more realistic . You need to pick the value carefully so it would work with the speed value properly. Thats probably it.
  7. I think you should put the LoadGLTextures() in the resize function at the end and not in the Draw() . And yes try to enable GL_TEXTURE_2D because it may disable the states also.
  8. It would be good if you could show the resize code. I can however make a guess that you are recreating window context with new screen width and height parameters. When you usually do that in windows then all the data that is stored in OpenGL is cleared (textures for example) (This may be the issue specific to only OpenGL + SDL - I am not sure, but I am getting the same results). You just need to reload the textures. The resizing is not so widely used with openGL. Usually it is a fixed size window windowed/fullscreen. I guess this is the reason for this. I don't know how it works in linux though.
  9. C++ "Message handlers"

    Hi. The C++ doesn't have delegates as part of the language. It has only function pointers. However the function pointers are different depending on if you are trying to point to the member function or a regular function. I would suggest you look at fastdelegate "hack". I found it to be one of the best examples of delegates for C++
  10. Show us your projects

    Well, you can check our project we have finished Blazetris. It was also part of IOTD a year ago :) video can be found here Current project is still under heavy work, and not much to show right now.
  11. Diablo movie?

    I am a little bit skeptical. However if the movie would have randomly generated levels then I will be happy ! :)
  12. OpenGL OpenGL release in VC++

    P.S. Also don't forget to build the program as Release, otherwise it would ask for visual studio debug dlls.
  13. Physx is cool

    Quote:Original post by superpig Quote:Original post by Skizz The drivers are for the PhysX physics accelerator hardware that is available. They give away the SDK and software implementation of the engine so that people are tempted to buy the hardware.Yes, that's what I figured. But I couldn't see a way of installing the PhysX runtime - on a machine without the accelerator hardware - that didn't involve installing drivers. If they seriously think that people will be more likely to buy the hardware "because they already have the drivers installed," they're insane in the membrane. The drivers should be installed with the hardware and the software SDK should do a check to see if they are present. There is a way with a simple hack to make physX app work without the requirement to install drivers. Just place dlls into physx folder manually and set the path in the registry. I think the ageia is aware of this problem and probably working on the solution.
  14. LOLCode

    This is really awesome ! :)
  15. It is probably related to the drivers, I have seen plenty of problems on system with different video cards. What video cards you have there ? Usually this is related to the problem with your own code. I can recommend that you leave everything you don't need or create a really simple demo. That way you can quickly get a picture where it is failing exactly.
  • Advertisement