|
The easiest solution would be direct-x9, but there's no support for 3ds files. However, there is a converter for 3ds meshes to direct-x meshes.
I did this once, it's straightforward.
using: [VISUAL STUDIO 6.0 sp5] [WIN98/2]
|
|
|
|
|
Dear Zizilamoroso,
Thanks for your help,
Please send more information about this to me.
I want to show and move 3dMax(3dstudio) Files
by visul c++,
Best Regards,
Mohsen Jamali,
|
|
|
|
|
If you want to load meshes into c++, I assume that you know how to program in c++.
So, all you have to do is this:
- install dx SDK (min. 8, pref. 9)
- find the converter on the internet (it's called conv3ds.exe or simmilar)
- convert *.3ds to *.x
- there's an example on how to load those converted meshes (*.x) into c++ dx9.
btw. There're some helper classes in a common dir somewhere. You can do something like this:
<br />
pMesh->Load("test.x");<br />
pMesh->Render();<br />
Easy or what?
regards
Zizi
using: [VISUAL STUDIO 6.0 sp5] [WIN98/2]
|
|
|
|
|
Hi, I have an MFC application with a COM interface. When I try to load a document when a call has been made to this interface, I get an assertion in OpenDocumentFile after AfxGetMainWnd() is called (wnd == NULL). I guess this call asserts because I called it from a different thread.
Anyone knows a (clean) sollution for this one?
|
|
|
|
|
To use OpenDocumentFile() from worker threads in ED (see sig) I post a message to the main thread which calls OpenDocumentFile() and then synchronize this with the worker thread. This is the only way I've found to do this sort of thing from a worker thread.
Neville Franks, Author of ED for Windows. Free Trial at www.getsoft.com
|
|
|
|
|
I was afraid that was the only way.
|
|
|
|
|
Doing anything much in any thread except the main one which has anything remotely to do with CWnd* and/or MFC Handle Maps is a real pain in the backside. I go through various hoops in ED to work-around these limitations.
Neville Franks, Author of ED for Windows. Free Trial at www.getsoft.com
|
|
|
|
|
Hexadecimal data are stored in a string(CString type).How can I
convert them to a Hexadecimal value?
LeonOrient
|
|
|
|
|
Use the CString.GetBuffer(CString.GetLength()) function to get the buffer of the CString and then use
unsigned long strtoul( const char *nptr, char **endptr, int base ); to convert the string to an unsigned long. After this, call CString.ReleaseBuffer().
The base for the strtoul function would in your case be 16.
-Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
|
|
|
|
|
This is a difficult way. At first I think as you. But after a moment
I think that since this is a frequent convertion, so the Micro Soft
should offer a function to solve the problem.
What is the function? Can you tell me?
LeonOrient
|
|
|
|
|
A difficult way? 3 lines? 2 lines for preparing the CString and only 1 line to do the conversion? Not that much I would say...
-Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
|
|
|
|
|
----------------------------------------------------------------------------
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
Could you tell me what the codes above can do with?
LeonOrient
|
|
|
|
|
Yes, I could. Have you tried it?
-Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
|
|
|
|
|
No, but I haver tried another way, it's very easy. Please look!
strText=m_lstWrite.GetItemText(i,j+1); //Get the CString: strText
sscanf((const char*)(strText),"%x",&temp); //convert,Only a sentence!
Of course, It's very nice to discuss with you.
LeonOrient
|
|
|
|
|
Well! BUT you use a const char * cast to get the char* from the CString. My solution with GetBuffer/ReleaseBuffer is safer.
If I would do it with a cast like you my solution would be:
strText = m_lstWrite.GetItemText(i,j+1);
temp = strtoul((const char*)(strText),NULL,16); Only one line of conversation code then too!
-Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
|
|
|
|
|
My god!
It is very good and very easy!
And it's also very regretful for me to say that and not to read MSDN carefullly after you gave me the tip.
Thank you very much!
LeonOrient
|
|
|
|
|
A frequent conversion?
not for me... it's rare that I want to convert a string into a hex string of individual bytes. If I was writing hex dump programs, it might be.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
Santa Cruz Networks
|
|
|
|
|
I should use "not very easy" to replace "difficult".
Sure, it is a good way to solve the problem.
In addition, maybe we will program simply to find the endptr's value, do you think so? ( I am not good at using the function yet, maybe i am wrong again.)
Could you give us an example, please?
LeonOrient
|
|
|
|
|
Just use NULL for endptr
-Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
|
|
|
|
|
;PProblem: Convert CStrring to int. etc
We can use the function: atoi,atof,atol etc
LeonOrient
|
|
|
|
|
As far as I know atoi, atof and atol cannot read Hex strings
-Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
|
|
|
|
|
int n;
sscanf((const char*)(yourString),"%x",&n);
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
This is a good thought!
All is right!!
3Ks!
LeonOrient
|
|
|
|
|
I want to know if you could create a real life world inside C++? Because I have had a really crazy idea.. now I know it may seem really stupid but think about the possiblities if you could do it. That is why I am trying to find some people to help me in the creation of a world that you would be able to enter through VR. Yes, if you are asking it is sort of like the matrix. However, you will be able to access it through a VR helmet or something of that nature however, that is beside the point. Firstly, I just want to know if it is possible. So please help me.
"Life is a game that can't be won..."
|
|
|
|
|
What have you been smoking and where can I get some?
|
|
|
|