Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed #553: Disable 3D nodes for smaller executable #569

Merged
merged 1 commit into from
Jul 3, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion scene/main/viewport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ void Viewport::_notification(int p_what) {

} break;
case NOTIFICATION_READY: {

#ifndef _3D_DISABLED
if (cameras.size() && !camera) {
//there are cameras but no current camera, pick first in tree and make it current
Camera *first=NULL;
Expand All @@ -290,6 +290,7 @@ void Viewport::_notification(int p_what) {
if (first)
first->make_current();
}
#endif
} break;
case NOTIFICATION_EXIT_SCENE: {

Expand Down
18 changes: 14 additions & 4 deletions scene/resources/world.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -225,44 +225,54 @@ struct SpatialIndexer {

void World::_register_camera(Camera* p_camera) {

#ifndef _3D_DISABLED
indexer->_add_camera(p_camera);
#endif
}

void World::_update_camera(Camera* p_camera){

#ifndef _3D_DISABLED
indexer->_update_camera(p_camera);

#endif
}
void World::_remove_camera(Camera* p_camera){

#ifndef _3D_DISABLED
indexer->_remove_camera(p_camera);
#endif
}




void World::_register_notifier(VisibilityNotifier* p_notifier,const AABB& p_rect){


#ifndef _3D_DISABLED
indexer->_notifier_add(p_notifier,p_rect);
#endif
}

void World::_update_notifier(VisibilityNotifier* p_notifier,const AABB& p_rect){


#ifndef _3D_DISABLED
indexer->_notifier_update(p_notifier,p_rect);
#endif
}

void World::_remove_notifier(VisibilityNotifier* p_notifier){


#ifndef _3D_DISABLED
indexer->_notifier_remove(p_notifier);
#endif
}


void World::_update(uint64_t p_frame) {

#ifndef _3D_DISABLED
indexer->_update(p_frame);
#endif
}


Expand Down