-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fixed get_game_version call * Open the level after getting it if not already open. * Fixed typo * Expose View3D to other plugins * Added chunk builder stub file * Added View3D layout and button * Expanded Optional * Added error chunk and null chunk geometry * Renamed WidgetLevelGeometry to LevelGeometry * Renamed GlData to CanvasGlData * Added debug logging and comments * Renamed WidgetChunkData to ChunkData * Fixed LibraryUID hashing and equality. * Split up default layout plugin * Renamed package * Implemented missing widget population If a layout is added before a required widget is added it will be displayed as a missing widget. Once the widget is added it can be populated. Likewise when plugins are disabled. * Added main window destruction When the plugin is disabled, the window will be destroyed. * Reformatted * Removed Drawable ABC * Renamed modules * Added prototype renderer * Removed multisample * Updated stub file * Reformatted * Fixed issues starting and stopping threads The stop method is called twice without being started for some reason. * Drop chunk meshing to idle priority This should make it lag a little less. Releasing the GIL will also improve this. * Reduced thread count I may increase this again but they are all locked by the GIL currently. * Remove duplicate code * Renamed OpenGLResourcePackHandle * Remove RPC * Moved the texture out of the chunk If each chunk stores the texture, we need to re-bind the texture for each draw making it slower. When the resource pack changes we just unload all chunks like Minecraft does. * Set texture location once * Refactored chunk mesh module * Reformatted * Update references * Added first chunk mesher * Refactored and improved chunk meshing Moved performant code to C++ so it does not need the GIL. __init__ is now extension * Moved C++ chunk meshing code Moved pure C++ meshing code to its own file. * Removed Amulet:: prefix * Refactored chunk mesher Added neighbour chunk component inputs. This is needed to determine culling at chunk edges. Merged the chunk mesher into one function. Converted storage to raw pointers. * Modified python function signature * Refactored chunk mesher Switched to a transparency array. This makes the code a bit simpler and reduces the number of calls to get_block_mesh which should make it a bit faster. * Fixed mesher call * Fixed stride bug * Fixed transparency issues Draw the blocks with translucency after the opaque blocks. * Implemented vertical culling * Pencilled in neighbour chunk getting This causes a deadlock currently. * Implemented getting neighbour chunks * Implemented neighbour chunk culling * Implemented block shading * Updated widget titles * Reformatted * Bumped amulet dependency * Moved tests * Added tests init py * Added a dummy test * Added missing import
- Loading branch information
1 parent
38d8ac2
commit 39e8a0f
Showing
68 changed files
with
1,796 additions
and
1,584 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
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
This file was deleted.
Oops, something went wrong.
7 changes: 7 additions & 0 deletions
7
src/builtin_plugins/amulet_team_3d_viewer/_view_3d/__init__.pyi
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,7 @@ | ||
from __future__ import annotations | ||
|
||
from amulet_team_3d_viewer._view_3d._widget import View3D | ||
|
||
from . import _chunk_mesher_lod0, _resource_pack_base | ||
|
||
__all__ = ["View3D"] |
27 changes: 27 additions & 0 deletions
27
src/builtin_plugins/amulet_team_3d_viewer/_view_3d/__init__view_3d.py.cpp
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,27 @@ | ||
#include <pybind11/pybind11.h> | ||
namespace py = pybind11; | ||
|
||
void init_resource_pack_base(py::module); | ||
void init_chunk_mesher(py::module); | ||
|
||
static bool init_run = false; | ||
|
||
void init_view_3d(py::module m) | ||
{ | ||
if (init_run) { | ||
return; | ||
} | ||
init_run = true; | ||
|
||
// This is normally added after initilsation but we need it to pass to subpackages. | ||
// This may cause issues with frozen installs. | ||
//m.attr("__path__") = py::module::import("importlib.util").attr("find_spec")("amulet_team_3d_viewer._view_3d").attr("submodule_search_locations"); | ||
|
||
init_resource_pack_base(m); | ||
init_chunk_mesher(m); | ||
|
||
m.attr("View3D") = py::module::import("amulet_team_3d_viewer._view_3d._widget").attr("View3D"); | ||
} | ||
|
||
PYBIND11_MODULE(__init__, m) { init_view_3d(m); } | ||
PYBIND11_MODULE(_view_3d, m) { init_view_3d(m); } |
Oops, something went wrong.