-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add Rendering #22
base: master
Are you sure you want to change the base?
Add Rendering #22
Conversation
9cd014b
to
0a03a77
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally needs rewriting.
The code above adds a `StaticRenderer` to this object, then creates a `BlockRenderPipeline` for this object with the texture `blockTexture` provided by `YourMod`. After this is done, the `build()` method is called to finish the creation of the rendering pipeline and return a function for rendering the block. | ||
|
||
## Renderers | ||
The following are all the renderers you can use in nova. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is a renderer? What exactly is it used for?
components.add(new StaticRenderer().onRender(new BlockRenderPipeline(this).withTexture(YourMod.blockTexture).build()); | ||
``` | ||
|
||
The code above adds a `StaticRenderer` to this object, then creates a `BlockRenderPipeline` for this object with the texture `blockTexture` provided by `YourMod`. After this is done, the `build()` method is called to finish the creation of the rendering pipeline and return a function for rendering the block. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Too abrupt into code without establishing the context.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Context has been established.
This is used for rendering providers that redraw the renderer every frame. This renderer should only be reserved for providers which truly need it. | ||
|
||
## Render pipelines | ||
Actual rendering is done using pipelines. You can either provide your own, or use any of these pre-built ones. To finish rendering with a pre-built pipeline, you have to call the `build()` method on the instance. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is a rendering pipeline? Why is it different from a Renderer? There's no context or concepts just classes thrown at the reader. This isn't javadoc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still no details on exactly what the split in responsibility is between renderers and pipelines, and why you need both.
To do: