|
Have a look at:
boost_1_31_0\libs\regex\example\snippets\regex_grep_example_1.cpp
but all the examples are pretty good, I think one is even a pretty printer for C++ code
If you can keep you head when all about you
Are losing theirs and blaming it on you;
If you can dream - and not make dreams your master;
If you can think - and not make thoughts you aim;
Yours is the Earth and everything that's in it.
Rudyard Kipling
|
|
|
|
|
Well you probably would have to make a parser yourself, probably search a specified file(s)/folder(s) and then search through them for '//TODO:' and then use getline or copy the contents until you come up to a \n
Actual Linux Penguins were harmed in the creation of this message.
|
|
|
|
|
Hello,
I am an experienced C++ programmer especially on the Win32 platform (MFC, Win32 API, etc.). I am limited experience on intensive graphics programming including OpenGL and DirectX. I have some general questions about graphics programming.
1) I often read about how DirectX does not work well with MFC. Is that accurate?
2) Is DirectX platform independent?
3) Is OpenGL platform independent?
4) What do graphics programmers including gamers use: DirectX or OpenGL?
5) What is more extensible, and essentially, better graphics API on the Win32 platform? What are some good books for learning this graphics programming tool?
6) What is the future of graphics programming especially on the Windows platform?
As you can see, my experience and knowledge in graphics programming is quite limited. I'd appreciate any insight.
Thanks,
Kuphryn
|
|
|
|
|
1) I often read about how DirectX does not work well with MFC. Is that accurate?
Sounds like a complaint from someone who didn't understnad how to use MFC very well, but then again I could be wrong.
2) Is DirectX platform independent?
No it's only for the Win32/x86 platform.
3) Is OpenGL platform independent?
Yes it is, OpenGL runs on linux, unix, irix, OSX, Win32, Solaris, and several other platforms.
4) What do graphics programmers including gamers use: DirectX or OpenGL?
My understanding is that if you're going to write games, particularly for Win32, DirectX is slightly better as it has a number of features that are specifically targetted at game programmers. However if you are going to write CAD/3D modeling, etc kind of applications, especially if they require high precision, then OpenGL is much better.
5) What is more extensible, and essentially, better graphics API on the Win32 platform?
I personally dislike COM intensely, and DirectX is all COM, unless you want to start using the new managed DirectX libs. I personally would prefer OpenGL.
6) What is the future of graphics programming especially on the Windows platform?
Well, aparently it is all gonna be Avalon, and managed API's. GDI's days are numbered, supposedly. I take all of this with a grain of salt though.
¡El diablo está en mis pantalones! ¡Mire, mire!
Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)!
SELECT * FROM User WHERE Clue > 0
0 rows returned
|
|
|
|
|
|
A couple of OpenGL references
1. Try the Red Book[^]. Very extensive.
2. Try Gamedev's OpenGL tutorials[^] for OpenGL
and
3. Gamedev's DirectX tutorials[^] for DirectX
i hope this helps
"It was when I found out I could make mistakes that I knew I was on to something."
-Ornette Coleman
"Philosophy is a study that lets us be unhappy more intelligently."
-Anon.
|
|
|
|
|
This is a great question, and, I know too little about it.
However, I would recommend Feng Yuan's book,
"Windows Graphics Programming", published 2000, written for the Windows 2000 platform; it is all about a non-MFC, C++ class approach to high quality graphics. It includes a section on DirectX, but, no OpenGl.
Everything I know about graphics I learned from this book.
The author includes a CD with a huge library of professional quality Windows graphics classes source code and dozens of really useful demo programs.
www.fengyuan.com[^]
|
|
|
|
|
I saw this a few years ago in a bookstore and almost bought it. Is it as good as it looks - I glanced through it and it seemed really good.
¡El diablo está en mis pantalones! ¡Mire, mire!
Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)!
SELECT * FROM User WHERE Clue > 0
0 rows returned
|
|
|
|
|
It's an awesome book, even if GDI+ makes much of it now redundant.
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
kuphryn wrote:
I often read about how DirectX does not work well with MFC. Is that accurate?
That's the most stupid thing I ever heard. I spent two years working on a project that mixed DX with MFC and never once heard a complaint. We only ditched MFC to start on a version that used our own windowing library, written in Python.
kuphryn wrote:
Is DirectX platform independent?
Nope
kuphryn wrote:
Is OpenGL platform independent?
I believe so, that is, there are GL implimentations for multiple platforms.
kuphryn wrote:
What do graphics programmers including gamers use: DirectX or OpenGL?
My understanding is that a lot of games get written for both, as some cards work better with DX, some with GL. I reckon DX will win in the end.
kuphryn wrote:
What is more extensible, and essentially, better graphics API on the Win32 platform? What are some good books for learning this graphics programming tool?
There are two Open GL books, the red and blue books ( forget the names, but the covers are red and blue ). One is a 3D programming reference, the other a GL libray reference. The trouble with DX is it changes so often, most books written are obsolete as they hit print. Better off to buy the GL books for 3D concepts, and use the DX SDK docs.
kuphryn wrote:
What is the future of graphics programming especially on the Windows platform?
In my experience:
Most gaming companies do not make a profit, meaning that games programmers often are people who change jobs a lot. General graphics coding is the sort of thing that can make you a lot of money, as it's specialised. I get a bit of contract work in graphics even nowadays, and I've been doing web stuff for my day job for a couple of years now. However, demand has got to be low, how many paint packages does the world need ? Scientific/medical work may be a whole different ball game. It's lots of fun and really interesting though, that's why I keep doing it.
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
I'd never done any DirectX before January, and only enough MFC to get me by in some smallish tools, but I found that these papers made getting going much easier:
Integrating Direct3D9.0 With MFC[^] helped me to get going with the basic concepts. One thing that I found made it much easier to work with was to write my own AppWizard to generate the basic code discussed in the article.
Creating 3D Tools with MFC[^] was another article which helped alot, even though it discusses OpenGL the splitter window design pattern and MFC code to get it going has made writing and extending application much easier.
If you can keep you head when all about you
Are losing theirs and blaming it on you;
If you can dream - and not make dreams your master;
If you can think - and not make thoughts you aim;
Yours is the Earth and everything that's in it.
Rudyard Kipling
|
|
|
|
|
One reason I am asking so many questions about graphics programming is because I've found that there are very few graphics programming books. For example, if you were to search Amazon, say, database programming, you'd see many more results than graphics programming. My point is there are very few books on graphics programming.
I read that the one drawback to graphics programming using OpenGL on the Win32 platform is the fact that MS does not update the to the latest OpenGL library, which is 1.4. MS only port up to version 1.1 or 1.2. Secondly, version 2.0 is already in the works. However, there is no plan to port it to the Windows platform.
Right now I am seriously considering these two books. One is on OpenGL. The other book is on graphics programming in C++. Both are very expensive and I do not want to buy the wrong book.
OpenGL Programming Guide: The Official Guide to Learning OpenGL, Version 1.4, Fourth Edition
http://www.amazon.com/exec/obidos/tg/detail/-/0321173481/qid=1084372965/sr=8-1/ref=pd_ka_1/002-9611673-6764029?v=glance&s=books&n=507846
Computer Graphics with OpenGL (3rd Edition) by Donald Hearn and M. Pauline Baker
http://www.amazon.com/exec/obidos/tg/detail/-/0130153907/ref=pd_sim_books_3/002-9611673-6764029?v=glance&s=books
Please give inputs if you have read them. Also, other recommendations and good online tutorials would be greatly appreciated.
Kuphryn
|
|
|
|
|
I just learn windows programming, so maybe this question has somewhat of ridiculous.
typedef struct {
HWND hwnd;
UINT message;
WPARAM wParam;
LPARAM lParam;
DWORD time;
POINT pt;
} MSG, *PMSG;
What is the usage of the last two parameter?
|
|
|
|
|
the time is probably system time, or perhaps ticks - allowing you to, at the very least, determine the time delta's between events.
The pt field is a point of where the cursor was for this event. I don't know if it's always valid, or if it is in screen coords or in client coords. Check MSDN to be sure.
¡El diablo está en mis pantalones! ¡Mire, mire!
Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)!
SELECT * FROM User WHERE Clue > 0
0 rows returned
|
|
|
|
|
In window procedure, we use the switch-case to choose a message which we want to deal with. However, this window procedure doesn't get the last two parameters. How can I get the last two parameters?
|
|
|
|
|
use GetMessagePos and GetMessageTime
|
|
|
|
|
windows program's running depends on the driving of the event .the program continually wait (using the "while "loop below)
winMain(.....)
{Msg msg;
....
while(GetMessage(&msg))//get the messge from the message queue
{TranslateMessage(....);//judge where is the message from
DispatchMessage(......);//dispath the message
}
...}
os capture any possible input ,then they go into the program by the form of message.the leading role to receive and treat with message is window,every window should have a function(window function)to be responsible for treating with message.
by the help of USER MODULE of os ,the message is dispatched the corresponding window function
that is:WndProc(hwnd,msg,wParam,LParam)
{
switch(msg)
{case wm_create:..
case wm_xxx:..
.....
}
}
that is all,;P
|
|
|
|
|
I mean that WndProc(&MSG) may be a better choice, but the win system use WndProc(hwnd,msg,wParam,LParam), why?
|
|
|
|
|
Is there anyone make a catalog of the essential APIs which a beginner should know?
|
|
|
|
|
I need to write two programs for my algo class...
1) I have to compare the insertionSort, MergeSort and QuickSort on an array of million chars using rand() and clock()...
2) Compare the number of leaves of a binary tree (I have to think recursively)
If anyone can help please do...it has to be done in C...Please anyone help...
TS
|
|
|
|
|
"Help me" is not the same as "do it for me." Show us the code that is giving you trouble, and you're bound to get help.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
I'm happy to do this for you. You can use Paypal to pay my fees. I hope your daddy is rich. If you skip out on this lesson, you'll probably need my help for the next one, and the one after that, etc. I can retire and just make a living doing easy programming assignments for rich people too lazy to learn for themselves.
Or you could give it a go and post your code here when you get stuck. Then I'll help for free.
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
Guiro wrote:
1) I have to compare the insertionSort, MergeSort and QuickSort on an array of million chars using rand() and clock()...
2) Compare the number of leaves of a binary tree (I have to think recursively)
Since you have written those many programming jargons (like Merge Sort, rand(), recursively, ...), you know well about programming and you can do it yourself!
Maxwell Chen
|
|
|
|
|
Hello everyone, I'm looking for information about the AC-3 (also called a52) algorithm.
I've already found an implementation, but it is slow and a very "simple" encoder, not much worth to gather information from it. I also had a look at the standard definition of ATSC, but there are still many unclear things. Does anyone know a good source of information or source codes (no matter which language)?
thx for your answers
Alex
Don't try it, just do it!
|
|
|
|
|
|