|
Hey there, I was wondering if someone would be willing to show me how to capture a frame from a webcam and turn it into a texture in OpenGL.. I'd like to do this realtime so the webcam is displaying in my OpenGL project. If anyone has some tips that would be great.
|
|
|
|
|
This really is two completely different parts to your question...
1/ grabbing a picture from a webcam,
and,
2/ Now I have a bitmap, how do I turn that into a texture and use it in OpenGL.
You'll have luck researching each of these parts, but I doubt anyone will give you the whole thing on a platter.
My guess is that the camera will provide a TWAIN interface for grabbings pics, but I don;t have any direct experience?
Iain.
|
|
|
|
|
Iain Clarke wrote: but I doubt anyone will give you the whole thing on a platter.
and some are not allowed to serve platters.... bum wrist.
_________________________
Asu no koto o ieba, tenjo de nezumi ga warau.
Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
|
|
|
|
|
I have created a window and done some drawing in the WM_PAINT message (drawing a border at the window's edge). However, when I resize the window, the window isnt updated from the WM_SIZE message. Is this normal and I have to explicitly have to tell the app to redraw the window when it is sized, or is there a window style or something that I have to set for the window to be updated when it is sized?
If I resize the window, minimize it then restore it, then the window has been repainted with the border at its edge, so I know it is something to do with the WM_SIZE message.
Thanks for your help,
--PerspX
"Nowadays, security guys break the Mac every single day. Every single day, they come out with a total exploit, your machine can be taken over totally. I dare anybody to do that once a month on the Windows machine." - Bill Gates
|
|
|
|
|
Can you show the code you use in response to WM_PAINT?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
You could try getting your resize notification from the WM_WINDOWPOSCHANGED message instead.
|
|
|
|
|
What are you doing in response to the WM_SIZE message?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Make sure that your OnSize handler is calling the default implementation also.
ie
void CMyWnd::OnSize (....)
{
CWnd::OnSize (....); (or CDialog:: etc - whatever the parent class is
}
Iain.
|
|
|
|
|
Are you using a class library or the APIs directly? If the latter, check that your window class has the CS_HREDRAW and CS_VREDRAW styles.
|
|
|
|
|
I am currently using the VC++ debugger to debug both managed and unmanaged code by attaching to a process, setting breakpoints, and running the program in such a way that it should stop at the breakpoints.
I have checked all of my DLLs and they all have debugging symbols loaded (some of them are .NET DLLs). This can be seen in the Modules window. The breakpoints window also shows all of my breakpoints as a solid red, and not "?". For some reason though, my program refuses to stop at these points even though I'm 100% sure that they pass by them.
Any suggestions?
|
|
|
|
|
When attaching to the process, have you set the debugger to attach to both native and managed code?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
|
hmm...beats me. Will it stop on a breakpoint in the EXE module? If so, can you step into a DLL from there?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I guess I could've tried that, but I decided to do a rebuild, and see if it was some kind of environment issue. The same DLLs are actually placed in multiple locations (copied over, but not sure what kind of script manages it), and you get references from one location to another, so starting from scratch may be the best way.
Thanks for helping.
I'll post an update later to see if I figure anything out.
|
|
|
|
|
Well, I never really finally understood what was wrong, but by setting the DLL project as the startup application and launching it with the executable specified, rather than attaching to process, something worked (by the way, I didn't figure this out -- I had a bit of help on my end).
|
|
|
|
|
2nd parameter of SQLConnect() method is the DSN name.
In my application i m using DSN-less connection by specifying the path of data.
So now whst do i pass as the 2nd parameter?
Alternatively: I tried using SQLConfigDataSource():
SQLConfigDataSource(NULL,ODBC_ADD_DSN, "SQL Server (*.mdf)",
"DSN=New SQL Data Source\0");
BUt it returns 'false'
Am i passing it the right data??
-- modified at 0:58 Wednesday 22nd August, 2007
|
|
|
|
|
yashveer wrote: 2nd parameter of SQLExecute() method is the DSN name.
Last time I checked, SQLExecute() had only one parameter, the statement handle.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi,
what are .ppm files.How can we open these files.If they are the type of image format then how can i open them.
Regards,
|
|
|
|
|
|
See .PPM File Extension[^] this site is a very good site about extension files you can get perfect info of extension files.
|
|
|
|
|
i mant to extract html source code of any web page and store it in CString.
Which Interface to use.
Any GURU Pls help me with the code.
thanks in advance.
Dhiraj
Dhiraj Kumar Saini
|
|
|
|
|
CInternetSession objInternetsession;
int nLength = 100; // Can be changed.
char* pchData = new char[nLength];
CHttpFile* pHttpFile = (CHttpFile*) objInternetsession.OpenURL(m_csUrl);
long x = pHttpFile->GetLength();
pHttpFile->Read(pchData, x);
CString csData = pchData;
I hope this will work for you.
Thanks,
Anand.
|
|
|
|
|
In above example, m_csUrl is a CSting object containing the URL.
Thanks,
Anand.
|
|
|
|
|
|
My problem is that whenever i open a web page i wanna extract the source code of the web page and display it in a MessageBox.
for eg if i visit www.yahoo.com the entire source code of yahoo.com should be extracted and displayed through a message box.
Pls help me out any one of the gurus.
Thanks in advance
Dhiraj Kumar
dhiraj kumar saini
|
|
|
|