Ooops.. I made a mistake... it seems SystemParametersInfo(SPI_SETSCREENSAVERRUNNING, 1, &old, 0); will disable hotkeys...
There is something in each of us we don't know. Something with great power.
I want to create a 3d program using OpenGL and Software rendering (gdi). The main problem are the system hotkeys, because I don't want the user to be able to minimize/activate startmenu/press ALT-TAB, etc..
I know, using DirectDraw, SetCooperativeLevel with DDSCL_EXCLUSIVE|DDSCL_FULLSCREEN will...
I had a similar weird problem a while ago, and I didn't solve it.
Try to reduce the number of fstreams you got by REUSING some of them. If you don't have all of them opened at the same time, why not reuse the closed ones instead of making a new one?
The reason that constants (or global variables) increase in size is that they are put into the .data segment, which is in the main executable.
Variables on stack will not increase the size of the executable on disk, but will use stack memory, like global variables.
In Low-level code, the stack...
When I said it was good code, I realised you were a novice. I just tried to encourage you, because I saw how other novices make and they build pretty awful code.. I hope you haven't take it as an offense.
Good code. You could try to optimize it a little more. First thing where to look are jumps and calls, and most of all, inner loops. I bet you can optimize them if you take a look at some optimization articles, such as Agner Fog's Pentium Optimisation manuals.
You'll find them very useful...
Visual C++ uses stack probes if a function requires more than 4K local storage, but why does it need stack probes? What are these stack probes actually doing?
What is the _chkstk function doing? What exactly is a stack probe and why do you need it?
Please forgive me for so many questions, but...
Or you could use the Windows GDI (the standard windows gui). It's not so powerful, but I think it uses less resources than DirectX.
PS: I may be wrong, so please correct me if so.
__declspec(dllexport) is not a calling convention. It just exports the function so executables can use them. It is mainly used in dlls.
__stdcall is a calling convention. See this for related information on Microsoft calling conventions.
Ok thanks. I didn't know it was less efficient, because all I wanted to do is keep a very temporary variable in registers to increase speed of a inner loop, but I guess I'll have to write the function in assembler if I want that.
Thanks anyway.
I use a lot of byte variables (5 in fact) and I want to achieve the most performant code with Visual C++ 6.0
I want to load all of them in registers, but the compiler isn't as smart as I thought... It loads three of them in registers al, bl and cl, but it doesn't want to load the others in ah...
The difference between intrinsic and inline is that in inline code you need to write C code. If you write inline assembler code, it will do a lot of crap on performance. For example, if I write my own inline memcpy, and then use the standard intrinsic memcpy, it's a little difference in the...
In Visual C++, the functions memcmp, memcpy and memset are all intrinsics (which makes them really fast), but is there a way to make memchr intrinsic too?
Also, I'd like to make a new intrinsic function which searches a string and stops if it encounters a character other than al. For example...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.