Commit Graph

275 Commits

Author SHA1 Message Date
Jozufozu
68ca281ee8 Interfaces and less log lines
- MateralManager, MaterialGroup, and InstanceMaterial are all interfaces
 - Separate (T)EI facing API from implementation
 - Comment out debug log in ModelPool
2021-08-23 22:34:27 -07:00
Jozufozu
d431318022 Errors and pools
- GlException and error checking WIP
 - Put all models within a material in a ModelPool
 - Instancers directly accept IModels
 - ModelPools are very WIP
2021-08-20 15:05:41 -07:00
Jozufozu
d41acf2bcf Storage clean-up
- Wrapper for sync objects
 - Compat layer for buffer storage
 - Don't get persistent buffers if they're not supported
2021-08-14 15:57:52 -07:00
Jozufozu
f82b9d2d23 Persistent buffers v1.5
- Add new sync function to GlBuffer
2021-08-14 13:33:17 -07:00
Jozufozu
5956fbfaa0 Merge branch 'dev' into shader-pipeline 2021-08-13 16:15:28 -07:00
Jozufozu
6374d6e369 Persistent buffers v1 2021-08-13 16:15:20 -07:00
Jozufozu
55537fb2af Better float array buffering 2021-08-13 13:35:18 -07:00
Jozufozu
550f567190 Random utilities from a messy workspace
- More documentation/clean up some old docs
 - isFirstLoad check on GatherContextEvent
 - Instancers no longer crash on empty model
 - setIdentity on MatrixTransformStack
 - more utilities for TransformStack
 - ModelData "nullification"
2021-08-13 11:23:09 -07:00
Jozufozu
9ac7a79d69 Final loader and temporary ShaderSources 2021-08-10 17:39:11 -07:00
Jozufozu
8f13097a40 Some decoupling
- New Loader class in charge of loading and compiling everything
 - ShaderSources now only loads sources
 - ShaderSources is immutable now
 - Resolver singleton in charge of managing name resolutions
 - ProgramSpecs go through Resolver
 - WorldShaderPipeline no longer needs reference to ShaderSources
2021-08-10 15:20:51 -07:00
Jozufozu
82ea5b1720 A heck of a lot
- Reorganize everything
 - Isolate SourceFile related things
 - Should consider decoupling ShaderLoader from resource loading
 - Document a lot of newer things
 - Index functions
 - Awkward WorldContext builder
 - Template responsible for providing shader inputs
 - Template is now an abstract class
 - Template provides GLSL version
 - ProgramSpecs now only accept one file
2021-08-10 02:06:22 -07:00
Jozufozu
3c24abe837 Reload
- Redo shader loading
 - Now loads an immutable SourceFile containing some metadata
 - Replace legacy compilation pipeline with improved new one using new api
 - Builtins are defined in one file, now "header"
 - New ErrorReporter/ErrorBuilder methods
 - Fancier shader loading errors
2021-08-08 22:33:32 -07:00
Jozufozu
a417b2944c Merge branch 'dev' into shader-pipeline 2021-08-08 17:07:33 -07:00
Jozufozu
c7771015a3 Missed changelog line 2021-08-08 17:06:50 -07:00
Jozufozu
ef512d8cf9 Almost there
- WorldContext sort of uses a shader pipeline interface
 - Smarter import resolution
 - Reorganize shader sources
 - Rewritten shader templating
 - Still need builtin support
2021-08-07 01:00:32 -07:00
Jozufozu
a9ae8ca68e More LightVolume guards
- Should fix odd crash
2021-08-06 12:55:56 -07:00
Jozufozu
935f8efc00 Merge branch 'dev' into shader-pipeline 2021-08-06 11:45:39 -07:00
Jozufozu
b266e6014c Whoops remove that import 2021-08-05 15:05:47 -07:00
Jozufozu
e5840754c6 Bump version - 0.2.3 2021-08-05 14:55:07 -07:00
Jozufozu
344ea74cab Event adjustments to work with optifine shadows 2021-08-05 14:53:22 -07:00
Jozufozu
c2d110e38f More steps towards actually using the new loader 2021-08-05 12:16:17 -07:00
Jozufozu
7bb38afda9 Merge branch 'dev' into shader-pipeline 2021-08-05 00:53:29 -07:00
Jozufozu
6a881b17b3 Bump version - 0.2.2 2021-08-04 22:44:21 -07:00
Jozufozu
0e7a61cfcc Fix #23
- Clamp update divisor
2021-08-04 20:50:37 -07:00
Jozufozu
60c85ec4f6 Fix nullpointer in ModelRenderer
- Somehow managed to only do a check in a subclass
 - Add #empty() helper method to IModel
2021-08-04 14:35:16 -07:00
Jozufozu
e3b1172925 Miscellaneous documentation 2021-08-04 14:35:15 -07:00
Jozufozu
f21566d1fc Merge pull request #22 from 34638a/dev
Patch to stop the java.util.ConcurrentModificationException.
2021-08-04 14:16:47 -07:00
Jozufozu
613640df52 Simplify synchronization
- Use `synchronized` on the queue sets in favor of explicit locks.
 - Updates and additions work the same now
 - Move updates processing to separate function
2021-08-03 02:06:41 -07:00
Jordan Ramsay
bf27108b18 Patch to stop the java.util.ConcurrentModificationException. 2021-08-03 16:52:00 +10:00
Jozufozu
94c5b4455d Switch to MIT Licence 2021-08-02 20:07:49 -07:00
Jozufozu
d21f2c73ee Wrong display value for chunk caching command 2021-08-02 14:22:21 -07:00
Jozufozu
180a480e40 Bump version - 0.2.1 2021-08-02 14:06:51 -07:00
Jozufozu
7f4399c768 Fix chunk caching race condition add toggle
- /flywheel chunkCaching on|off
 - synchronized ftw
2021-08-02 00:06:26 -07:00
Jozufozu
5f7093fa0e Update changelog and remove dead QuaternionTransformStack.java 2021-07-30 14:34:04 -07:00
Jozufozu
e20612cd30 Fix issue with missing banner pattern textures
Fixes #12

What the heck

CrumblingRenderer gets classloaded early because of its event listener.

CrumblingRenderer had an innocent static reference to a member of ModelBakery.

This caused ModelBakery to classload before additional enums could be injected into BannerPattern.

¯\_(ツ)_/¯
2021-07-29 18:50:47 -07:00
Jozufozu
b47bd45510 Model changes
- Buffered models directly consume IModels
 - Document IModel more
 - Move contraption world render spoofing to flywheel
 - Miscellaneous new RenderMaths
 - Added WorldModel, renders many blocks given a world instance
 - Fix broken transparency on contraptions when using Flywheel
2021-07-29 01:37:47 -07:00
Jozufozu
21269e9dd5 Expose ClippingHelper in BeginFrameEvent 2021-07-28 18:13:47 -07:00
Jozufozu
eded055be8 More info in RenderLayerEvent 2021-07-28 14:18:24 -07:00
Jozufozu
7f58d51017 Documentation and organization
- Add a package-info.java to many packages.
 - Annotate the world parameter in Backend#canUseInstancing as nullable.
 - New utility constructor for BlockModel
 - Note that IDynamicInstance#beginFrame and ITickableInstance#tick are run in parallel.
 - Refactor internals of InstancedRenderDispatcher to group things by InstanceWorlds.
 - InstanceWorlds take over most responsibility for dispatching calls.
 - Simplify massive private call chains in InstanceMaterial.
 - Reorganize methods and add some documentation in MaterialManager, MaterialGroup, InstanceMaterial, and Instancer.
 - Remove unused field from MaterialSpec.
 - Remove unused fields from Instancer and InstanceMaterial
 - Document RenderLayer
 - Add RenderLayer field to RenderLayerEvent
2021-07-27 17:31:58 -07:00
Jozufozu
88241c2a58 Merge branch 'dev' into shader-pipeline
# Conflicts:
#	src/main/java/com/jozufozu/flywheel/backend/ShaderSources.java
2021-07-26 21:58:53 -07:00
Jozufozu
e4bf7f715f Update LightVolume to use enum wrapper for glActiveTexture 2021-07-26 16:18:38 -07:00
Jozufozu
6786e11795 Consistent naming for normal debug mode 2021-07-26 13:42:38 -07:00
Jozufozu
d05b105e7e Bump version - 0.2.0 2021-07-23 23:48:02 -07:00
Jozufozu
0cdb0c1ff3 Optimize imports 2021-07-23 23:46:30 -07:00
Jozufozu
fd96df1abe MaterialManager and MaterialGroup refactor
- Material manager builder
 - No more overload render method/IProgramCallback
 - MaterialRenderers accept a Program consumer instead
2021-07-23 23:45:31 -07:00
Jozufozu
38418b2f91 Update forge
- but not to 36.2.0 because gradle hates me
2021-07-23 16:45:38 -07:00
Jozufozu
721b3b8633 Basic model abstraction
- Stop providing a buffered model supplier
 - Instead, provide an IModel supplier
 - IModel exposes basic properties of models
 - IModel exposes a method to copy the model to a VecBuffer
2021-07-23 12:26:32 -07:00
Jozufozu
7ad7512e7e Merge branch 'dev' into vanilla-opt
# Conflicts:
#	src/main/java/com/jozufozu/flywheel/backend/instancing/Instancer.java
2021-07-22 14:09:28 -07:00
Jozufozu
1ca23c514f Instance stealing 2021-07-22 14:07:02 -07:00
Jozufozu
418676a0f0 MaterialGroups and massive refactors
- Move material stuff to its own package
 - The various render functions in the material tree now bind to specific render layers
 - Instancers can choose which layer to use
 - The layers are SOLID, CUTOUT, and TRANSPARENT
 - More layers are likely unnecessary, but we'll see
 - Deprecate functions in MaterialManager in favor of more builderesque ones using MaterialGroups
2021-07-21 20:28:20 -07:00