-
-
Notifications
You must be signed in to change notification settings - Fork 279
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement rendering pause. Add missing implementation.
- Loading branch information
1 parent
9c13c5f
commit ba9c476
Showing
11 changed files
with
190 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
var LibraryRenderer = { | ||
$dmRenderer: { | ||
renderContext: null, | ||
renderCallback: null, | ||
|
||
rendererContextEvent: function(event_name) { | ||
if (dmRenderer.renderCallback) { | ||
var event_id = stringToUTF8OnStack(event_name); | ||
{{{ makeDynCall('vii', 'dmRenderer.renderCallback') }}}(dmRenderer.renderContext, event_id); | ||
} | ||
} | ||
}, | ||
setupCallbackJS: function(context, callback) { | ||
dmRenderer.renderContext = context; | ||
dmRenderer.renderCallback = callback; | ||
} | ||
} | ||
|
||
autoAddDeps(LibraryRenderer, '$dmRenderer'); | ||
addToLibrary(LibraryRenderer); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// Copyright 2020-2024 The Defold Foundation | ||
// Copyright 2014-2020 King | ||
// Copyright 2009-2014 Ragnar Svensson, Christian Murray | ||
// Licensed under the Defold License version 1.0 (the "License"); you may not use | ||
// this file except in compliance with the License. | ||
// | ||
// You may obtain a copy of the License, together with FAQs at | ||
// https://www.defold.com/license | ||
// | ||
// Unless required by applicable law or agreed to in writing, software distributed | ||
// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR | ||
// CONDITIONS OF ANY KIND, either express or implied. See the License for the | ||
// specific language governing permissions and limitations under the License. | ||
|
||
#include "render/render_private.h" | ||
|
||
namespace dmRender | ||
{ | ||
void PlatformSetupContextEventCallback(void* context, ContextEventCallback callback) | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Copyright 2020-2024 The Defold Foundation | ||
// Copyright 2014-2020 King | ||
// Copyright 2009-2014 Ragnar Svensson, Christian Murray | ||
// Licensed under the Defold License version 1.0 (the "License"); you may not use | ||
// this file except in compliance with the License. | ||
// | ||
// You may obtain a copy of the License, together with FAQs at | ||
// https://www.defold.com/license | ||
// | ||
// Unless required by applicable law or agreed to in writing, software distributed | ||
// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR | ||
// CONDITIONS OF ANY KIND, either express or implied. See the License for the | ||
// specific language governing permissions and limitations under the License. | ||
|
||
#include "render/render_private.h" | ||
|
||
extern "C" void setupCallbackJS(void* context, dmRender::ContextEventCallback callback); | ||
|
||
namespace dmRender | ||
{ | ||
void PlatformSetupContextEventCallback(void* context, ContextEventCallback callback) | ||
{ | ||
setupCallbackJS(context, callback); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters