Hello,
I write simulations to study the spatial spread of disease. Often, to be
sure that the code is doing what we expect, we draw a 2-D representation of
the dynamics to a window. The "universe" is essentially chopped up into a
grid. The state of a grid cell can be anything such as infected/uninfected
or number or density of infected individuals, etc. A few colors represent
most of the cases.
However, what we're really after are the output numbers at the end. So,
because the graphics are so slow (simulating large areas with large #'s of
individuals for long times), I often have to disable graphics as a
practical matter. But, I see the lightening speed of computer game
graphics and I think, it doesn't have to be so...
But, 95% of the info I've found about using graphics with pc's relates to
dos. That's great, and I've no problem with it in principle. But, since
graphics are a small part of my goals and numerical classes & libraries etc
are a large part, it makes more sense to me to fit the graphics routines
into my science rather than fit my science into graphics routines.
I've still got a long way to go, but I believe that I don't care whether or
not I include assembly files in my vc++ projects (I've gotten this worked
out w/the help of excellent web-based turorials) or use inline __asm
routines (correct me if I'm wrong). However, 3 problems (at least) remain:
1) there are precious few resources describing assembly graphics
programming in something like win2k
2) I don't really want to draw to the screen the way games do. I've got
lots' of windows probing the process in various ways and displaying info,
with various check boxes and option buttons available to change this or
that. Don't want to lose access to control over program flow.
3) I've actually found a couple win32 examples (excellent), but they are
not well-documented (few comments in guts of prog) and they are stand-
alone.
Evidently (and correct me if there are things I'm not recognizing), I want
graphic *routines* that draw to my existing window classes (mfc). My guess
is that these would be functions in *.asm files that would be built into
*.obj files and linked to my c++ *.exe. Or, as I said, if inline is the
way to go, that's fine too (although makes reusability a bit more of a
pain).
So, does anyone know of any resources relating to what I'm describing here?
For assembly manipulations, I've downloaded MASM, I also have NASMW &
NASMEDIT & numerous on-line books/tutorials some of which get close to the
issue, but none of which really gets me there yet.
Thank you for reading and thank you for any tips.
Best regards,
Kevin