Adding other files to the project and question about instances...
4 posters
Adding other files to the project and question about instances...
Hi this may seem like the dumbest question ever, but, what should I do in order to add other files than template.mm and template.h to the project without getting more than 1K compilation errors? Its not that what I've written has errors since without "#including" them into the sio2 code or the template code it does not give me any error...
I've seen that all of the sio2 files from the sio2 src are included in "sio2.h" I've tried to do this and it just does not compile I've also tried to #include it into the template files and it does not work either... is it because is buttons.c and buttons.h instead of buttons.mm or something¿?
---
Another question about instances, I would like to know if instances are taken as instances besides knowing that they are instances (ok, weird question here...) I mean if they share info about them or something or they just load like different objects but knowing that they are instances in order have them ordered in some sort of hierarchy or so...
I've seen that all of the sio2 files from the sio2 src are included in "sio2.h" I've tried to do this and it just does not compile I've also tried to #include it into the template files and it does not work either... is it because is buttons.c and buttons.h instead of buttons.mm or something¿?
---
Another question about instances, I would like to know if instances are taken as instances besides knowing that they are instances (ok, weird question here...) I mean if they share info about them or something or they just load like different objects but knowing that they are instances in order have them ordered in some sort of hierarchy or so...
exavi- Posts : 37
Join date : 2008-10-21
Re: Adding other files to the project and question about instances...
First Question: you probably just need to right click the new files in Xcode and choose the 'Get Info' option. In the popup there will be a dropdown menu of file types. Be sure to choose source.cpp.objcpp and that should take care of your compilation issues. Try doing a 'Get Info' on one of the SDK files to compare it to your files.
Second Question: I think you are talking about object instances but I am not sure. If you are, instances share materials with each other but they have their own position, mass, velocity, acceleration, etc.
Second Question: I think you are talking about object instances but I am not sure. If you are, instances share materials with each other but they have their own position, mass, velocity, acceleration, etc.
uprise78- Posts : 228
Join date : 2008-10-31
Re: Adding other files to the project and question about instances...
Pseudo-Instance are only sharing geometry, material, texture with their parent... for all the rest such as transformation, physic properties etc... its independent to the object...
Re: Adding other files to the project and question about instances...
wow, thanks that "get info" thing worked
about the second question, I meant just that, but I would like to know if vbo's are also taken into account so there are not two vertex arrays with the same vertexes and stuff like this... I am asking this because from what I've seen in the file format specifications all objects save all vertexes but they save also their positions so I was thinking that maybe if these objects are instances they take the same vertex stuff but use this position...
Btw, I would like to know also if this 6K triangle limit is taking into account the scene-view culling system or if this 6k limit is for the whole sio2 file even if it is never going to be seen. (for example a camera ponting in the z++ direction and a couple boxes in z=-5.0f)
And I would like to know also if this scene culling knows if there's something between the view and a certain object or if draws everything that is into the view "frustum". for example: if we are watching a big cube with a small cube inside, the small cube inside is drawn? I guess that it will be drawn since its not bsp-like, right?
about the second question, I meant just that, but I would like to know if vbo's are also taken into account so there are not two vertex arrays with the same vertexes and stuff like this... I am asking this because from what I've seen in the file format specifications all objects save all vertexes but they save also their positions so I was thinking that maybe if these objects are instances they take the same vertex stuff but use this position...
Btw, I would like to know also if this 6K triangle limit is taking into account the scene-view culling system or if this 6k limit is for the whole sio2 file even if it is never going to be seen. (for example a camera ponting in the z++ direction and a couple boxes in z=-5.0f)
And I would like to know also if this scene culling knows if there's something between the view and a certain object or if draws everything that is into the view "frustum". for example: if we are watching a big cube with a small cube inside, the small cube inside is drawn? I guess that it will be drawn since its not bsp-like, right?
exavi- Posts : 37
Join date : 2008-10-21
Re: Adding other files to the project and question about instances...
wow, thanks sio2 by the time I submitted last post I've seen your earlier reply. that sharing-geometry thing rocks!
exavi- Posts : 37
Join date : 2008-10-21
Re: Adding other files to the project and question about instances...
Btw, I would like to know also if this 6K triangle limit is taking into account the scene-view culling system or if this 6k limit is for the whole sio2 file even if it is never going to be seen. (for example a camera ponting in the z++ direction and a couple boxes in z=-5.0f)
>> Well the 6k limit is relative, with the current dev. version (1.3.2) with optimization, I was able to render near 40k of triangles at 15 fps and up... with physic ( ground + 10 convex hull) on a sec gen iPod Touch... I realize that was is killing the most is the from the texture switch... Try to reuse the same material as much as possible, and try to create texture atlas (image consolidator will help) as mush as you can.
And I would like to know also if this scene culling knows if there's something between the view and a certain object or if draws everything that is into the view "frustum". for example: if we are watching a big cube with a small cube inside, the small cube inside is drawn? I guess that it will be drawn since its not bsp-like, right?
>> Unfortunately no... at least not at the moment, I haven't find any decent way to do an occlusion test on the device...
>> Well the 6k limit is relative, with the current dev. version (1.3.2) with optimization, I was able to render near 40k of triangles at 15 fps and up... with physic ( ground + 10 convex hull) on a sec gen iPod Touch... I realize that was is killing the most is the from the texture switch... Try to reuse the same material as much as possible, and try to create texture atlas (image consolidator will help) as mush as you can.
And I would like to know also if this scene culling knows if there's something between the view and a certain object or if draws everything that is into the view "frustum". for example: if we are watching a big cube with a small cube inside, the small cube inside is drawn? I guess that it will be drawn since its not bsp-like, right?
>> Unfortunately no... at least not at the moment, I haven't find any decent way to do an occlusion test on the device...
Re: Adding other files to the project and question about instances...
uprise78 wrote:First Question: you probably just need to right click the new files in Xcode and choose the 'Get Info' option. In the popup there will be a dropdown menu of file types. Be sure to choose source.cpp.objcpp and that should take care of your compilation issues. Try doing a 'Get Info' on one of the SDK files to compare it to your files.
Hi, i have added all folders from sio2 src to my project, but after compilation there an error
duplicate symbol luaopen_SIO2_user(lua_State*) in /Users/dilshod/Documents/test/build/test.build/Debug-iphonesimulator/test.build/Objects-normal/i386/sio2_wrap.o and /Users/dilshod/Documents/test/build/test.build/Debug-iphonesimulator/test.build/Objects-normal/i386/sio2.o
in my project's lua folder i can see sio2_wrap.c, but i can't find it in the template.
I'm using 1.3.1 version.
dilshod- Posts : 7
Join date : 2008-12-28
Re: Adding other files to the project and question about instances...
Just use the template project and create a copy then start plugin your code... its alot more simple instead of trying to link back everything...
Similar topics
» SDK problems with new project and adding .sio2
» Using my own camera
» Adding SIO2 to an existing Xcode iPhone project
» Tutorial14 / adding md2 to tutorial09
» Adding a UIViewController to the SIO2 template
» Using my own camera
» Adding SIO2 to an existing Xcode iPhone project
» Tutorial14 / adding md2 to tutorial09
» Adding a UIViewController to the SIO2 template
Permissions in this forum:
You cannot reply to topics in this forum