I hadn't been aware that double buffering is significantly slower than blitting directly into the front DC. The main cause of the problem (delayed reaction) seems to have been the number & size of...
Type: Posts; User: fusikon
I hadn't been aware that double buffering is significantly slower than blitting directly into the front DC. The main cause of the problem (delayed reaction) seems to have been the number & size of...
My SwapBuffers() function now looks like this:
void Bitmaps::SwapBuffers()
{
InvalidateRgn(hwnd, NULL, false);
UpdateWindow(hwnd);
}
I clear the buffer in the WM_PAINT case after...
Edited post:
Disregard the earlier post. Novocain, I got your method to work. Trouble is, the result is exactly the same as it was before! I can't detect any difference. It acts as if...
void Bitmaps::Init(HWND hw )
{
init=true;
hwnd = hw;
windowRect = new RECT;
GetClientRect(hwnd, windowRect );
hdc = GetDC(hwnd );
hdcBuf = CreateCompatibleDC(hdc );
Well well well. I've finished implementing double buffering, and what a cake it bakes, too!
Programming is a battlefield and I actually managed to crash my computer by getting my graphics driver...
Let's pull this apart here, because it's not making much sense to me.
Here's the Init function I posted. This function is called at the start of the program to set up the DCs used by every other...
Okay, I understand about the deselecting and releasing of the DCs, which I do at the end of my program. The GetDC() resource is the front DC I'm blitting into, so I want to keep that throughout the...
The gist of the term is to insert something into something else; to insert estimated values or to determine an outcome by inserting estimated values into a function.
Usually interpolation refers...
I put off posting this as long as I could, figuring I'd try out every possibility, but, well, here I am.
I've started to implement double buffering, and it works like a charm except that Windows...
I'm not sure I experienced your problem, but once the apple did seem to appear over the tail of the worm.
The problem with your for(...) loop test that I see is that you'll get "true" based on...
Cool, thanks man.
The GDI game I'm working on is finally within a few parsecs of something distantly related to completion. But before I move on to the next stage I want to ask a few questions. I've seen some good...
Yay! Got it!
The solution was to pass in the address of the font class object, and then deference it:
SelectObject(hdc, gameFonts->hfScoreFont);
Before I was passing the gameFonts...
What is 3-D game studio?
You might want to check out DarkBasic. That's a 3-D programming language and it's easier than C++, though of course I recommend you move into C++ game programming...
Okay, sorry, update:
The problem's not with the wrapped function, it's with selecting the fonts. For some reason all the fonts wind up being just one of the fonts, the Menu Items font. Why? ...
Hmm ... I thought this would be simple, but so often are the simple things the ones that take up whole days...
All I want to do is wrap up my fonts (just Windows fonts) in their own class for a...
Yeah, okay, you're right about the maths ... although I would specify physics and an aptitude for translating programming/mathmatical concepts into something that's entertaining.
Personally I find...
But you can't just assess these skills in the abstract outside of game programming. I would say "aptitude" rather than "knowledge". The thing is that game programming might be the first thing that...
Though my opinion is hardly professional, I would say that game development requires a certain je ne sais quoi that's distinct from other forms of programming. You say "software engineer, not...
This is a gerneral question about how to handle transparentcy in OpenGL scenes where fog is enabled.
Let's say I'm trying to create trees or some other complex object by first drawing a mask...
Actually my way is the right way. You only pass in the uint returned from SetTimer if you set hwnd to NULL, that is:
KillTimer(NULL, returnValueFromSetTimer)
but
KillTimer(hwnd, TimerID) ...
Setting up a timer is easy.
In your main() function you call
SetTimer(hwnd, TimerID, TimerDelay, TimerProc);
where TimerID is any ID you make up (say, 1), TimerDelay is the period in...
Can't you put all your class declarations in the same place?
I only see a problem when you're constructing these objects. But that's not a problem if you create the objects before you link them.
Gotcha.
I'm trying to do what I thought would be as straightforward a task as there can be.
All I want to do is set up a bunch of RECT objects to use in a DrawText call.
But for some reason my program...