View Full Version : I3DXXXX Interface?
daeheekim
07-02-2003, 02:10 AM
I am interested in I3D_XXXX interface.
I read API reference, but that is the list of functions.
I am finding the examples with I3D_XXXX interface.
Would you mind telling me some references about I3D_XXXX interface?
ruben
07-02-2003, 05:12 AM
I3D, I3DUtil, I3dModel interfaces give you access to 3d rendering engine. 3D rendering engine is available only from BREW 2.1 and it is implemented in silicon in upcoming MSM 6100 chip. Current BREW emulator does not have any library so you can not do any test/debugging work in emulator till it is available.
ruben
markb
07-03-2003, 02:55 PM
Originally posted by ruben
3D rendering engine is available only from BREW 2.1
It's not part of BREW 2.1. It's a static extension that is compatible with BREW 2.0 and later.
Current BREW emulator does not have any library so you can not do any test/debugging work in emulator till it is available.
The current emulator (2.1) does include this extension. You should have a file call I3DExtension.dll in bin/modules/.
ruben
07-03-2003, 03:40 PM
yes that's right. It is MPEG module for which so far there is no support in emulator.
thanks
ruben
daeheekim
07-03-2003, 06:49 PM
Originally posted by markb
It's not part of BREW 2.1. It's a static extension that is compatible with BREW 2.0 and later.
The current emulator (2.1) does include this extension. You should have a file call I3DExtension.dll in bin/modules/.
Thank you for your answer.
Where can I get information about the usage of I3DExtension.dll ?
I would like to know the examples for I3D_XXXX interfaces.
This is not included in the BREW sample application guide.
If you have some information. please let me konw that.
markb
07-07-2003, 04:33 PM
I think the only documentation is what's in the API reference and the header files.
daeheekim
07-10-2003, 02:30 AM
Originally posted by markb
The current emulator (2.1) does include this extension. You should have a file call I3DExtension.dll in bin/modules/.
Thank you for your answer.
How can I link I3DExtension.dll to the current emulator (2.1)?
Can I use I3D_XXXX interfaces when I just include header files of I3D_XXXX inferfaces?
Is there any setting in the Visual C++ development tool?
markb
07-11-2003, 06:43 PM
You don't have to do anything special. When the emulator starts up, it automatically queries each DLL in the Modules directory to obtain a list of class IDs and instantiation functions, which it adds to an internal table. When you call ISHELL_CreateInstance(), the emulator searches this table for the class ID you specify, and calls the associated function and returns the resulting interface to your application.
So the simple answer is, you just call:
ISHELL_CreateInstance(pShell, AEECLSID_3D, (void**)&p3D);
daeheekim
07-11-2003, 08:43 PM
Originally posted by markb
You don't have to do anything special. When the emulator starts up, it automatically queries each DLL in the Modules directory to obtain a list of class IDs and instantiation functions, which it adds to an internal table. When you call ISHELL_CreateInstance(), the emulator searches this table for the class ID you specify, and calls the associated function and returns the resulting interface to your application.
So the simple answer is, you just call:
ISHELL_CreateInstance(pShell, AEECLSID_3D, (void**)&p3D);
Thank you markb
daeheekim
08-07-2003, 10:16 PM
Originally posted by markb
You don't have to do anything special. When the emulator starts up, it automatically queries each DLL in the Modules directory to obtain a list of class IDs and instantiation functions, which it adds to an internal table. When you call ISHELL_CreateInstance(), the emulator searches this table for the class ID you specify, and calls the associated function and returns the resulting interface to your application.
So the simple answer is, you just call:
ISHELL_CreateInstance(pShell, AEECLSID_3D, (void**)&p3D);
I have tried to load and draw q3d file with I3DModel Interface.
Followings are my codes
I3DModel_Load(pMe->m_pI3DModel, "DUCK.q3d") ;
I3DModel_Draw(pMe->m_pI3DModel, pMe->m_pI3D) ;
However, Brew emulator did not display 3D model.
I think I3DModel_GetModelData() is used to identify the model information. But the second argument of this function needs AEE3DModelData** variable.
I wonder why this function needs the double pointer(** type).
I hope to know how AEE3DModelData is linked to the I3D Interface.
In addtion, I would like to know the procedure that displays the loaded q3d on the Brew Emulator.
Please let me those.
Thank you.
Murray Bonner
08-08-2003, 08:27 AM
If you want to change the pointer in the called function, instead of what it points to, you have to pass the pointer by reference (i.e. pointer to pointer).
Sorry, I don't have an answer for your other questions.
Murray
daeheekim
08-10-2003, 07:39 AM
Originally posted by Murray Bonner
If you want to change the pointer in the called function, instead of what it points to, you have to pass the pointer by reference (i.e. pointer to pointer).
Sorry, I don't have an answer for your other questions.
Murray
Thank you your answer.
The second argument of I3DModel_GetModelData() is pointer to pointer.
So I would like to know how we allococate memory of AEE3DModelData** variable.
If I3DModel_GetModelData() does't need special memory space, is it true that we just declare AEE3DModelData** variable before AEE3DModel_GetModelData() function call.
Murray Bonner
08-10-2003, 08:05 AM
I haven't used the interface. Does I3DModel_GetModelData() allocate memory? I suspect it must, since it requires an argument of type AEE3DModelData**. If it allocates memory, then you are correct, you would simply proceed as follows:
AEE3DModelData *pmd = NULL;
I3DModel_GetModelData(..., &pmd);
...
I don't have BREW 2.1 on my machine, so I'm afraid I can't help you much beyond this.
I hope I've helped.
Murray
daeheekim
08-10-2003, 09:31 AM
Originally posted by Murray Bonner
AEE3DModelData *pmd = NULL;
I3DModel_GetModelData(..., &pmd);
...
[/B]
You mean that it is not necessary to allocate memory for pmd.
And how pmd is linked to the I3D interface or drawing routines.
Murray Bonner
08-10-2003, 10:52 AM
I suspect so, given that the pointer is passed into the function by reference.
I suggest you run a test using the emulator and VC++ debugger, watching the pointer as you step over the call to I3DModel_GetModelData(). If the pointer changes from NULL to some valid address, you'll know that the memory is being allocated inside the function. I must admit that it seems a bit odd that the function would allocate the memory but I can think of no other reason for a pointer to pointer to be passed in.
daeheekim
08-10-2003, 07:17 PM
Originally posted by Murray Bonner
I suspect so, given that the pointer is passed into the function by reference.
I suggest you run a test using the emulator and VC++ debugger, watching the pointer as you step over the call to I3DModel_GetModelData(). If the pointer changes from NULL to some valid address, you'll know that the memory is being allocated inside the function. I must admit that it seems a bit odd that the function would allocate the memory but I can think of no other reason for a pointer to pointer to be passed in.
I have difficulties to draw a 3D model, which is converted by q3d converter, on the Brew emulator.
In order to display a 3D model, what steps shall I take before I3DModel_Draw(pMe->m_pI3DModel, pMe->m_pI3D) ;?
twhite
08-15-2003, 06:01 PM
I'm also trying to figure out the I3D interface with no luck in the emulator thus far. Here's what I do in my init with error checking stripped out:
ISHELL_CreateInstance(pMe->a.m_pIShell, AEECLSID_3D, (void**)&pMe->p3D);
ISHELL_CreateInstance(pMe->a.m_pIShell, AEECLSID_3DMODEL, (void**)&pMe->p3Dm);
I3DModel_Load(pMe->p3Dm, "mymodel.q3d");
IBitmap *pbmScreen = IDISPLAY_GetDestination(pMe->a.m_pIDisplay);
I3D_SetDestination(pMe->p3D, pbmScreen);
Here I'm using a 16bbp device since I3D must have a 16bpp destination. Then later on I try:
I3D_StartFrame(pMe->p3D);
I3DModel_Draw(pMe->p3Dm, pMe->p3D);
IDISPLAY_Update (pMe->a.m_pIDisplay);
But the little screen remains blank. Its not exactly clear to me from the docs where the default viewing area is, but I would guess things within a few units of the origin would show up. Other things I've tried are changing the viewing transform via I3DUtil_GetViewTransformMatrix and I3D_SetModelViewTransform, as well as setting just drawing triangles manually by calling I3D_RenderTriangles after setting up the data structures, but all to no avail.
Anyway, I'd be interested in comparing notes to know if this is close to what you had been doing as well.
-Tom
daeheekim
08-17-2003, 11:33 PM
Thank you for your kind answer.
I have tried to draw a 3-D model with your guide.
The attached file is my code to draw a 3-D model, but
the memory error happens at the line of I3DModel_Draw(pMe->m_pI3DModel, pMe->m_pI3D); in my program and my program terminated.
Please check my program and let me know what are problems.
If my program has no problem to draw a 3D model, I think my 3D model file(*.q3d) or my device configuration of the emulator has some problems, so I hope that you give me your device file and your q3d file.
If you hesitate to send those files, I will send you my q3d file to check my 3D model file after you inform me your e-mail address.
- Daehee -
igordon
12-20-2003, 04:28 PM
I've had similar problems displaying I3DModels.
My guess is that the converter has some issues. The only model I was able to convert from a 3DMax model and display successfully was a simple un-textured unit sphere.
When I tried anything more complex I managed to crash the emulator in I3DModel_Draw().
Depending on the 3D model, on hardware I either lock the hardware with a blank screen or lock the hardware with an Exception.
I didn't attempt making my own Q3D converter, so that might be one option. I was moving toward my own Model class that I could shoot directly to I3D_RenderTriangle*().
Good luck, I'm interested to hear if you make any progress.
sky_hyf
12-07-2005, 04:53 PM
i can't find any 3D interface in SDK3.1.2, but i found them in SDK2.1.3.
Did qualcomm remove 3D interface in SDK3.1.2?
Yes, they were removed from 3.x
sky_hyf
12-08-2005, 06:01 PM
why, i don't understand, it's cool feature.
or is there any replacement?
sky_hyf
12-09-2005, 07:00 PM
Max, thank u so much.
another question: after i develop 3D application in emulator, should i do any extra in order to make it run in 3.x handset? does 3.x handset support this built-in?
vBulletin v3.0.13, Copyright ©2000-2009, Jelsoft Enterprises Ltd.