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

Add Rendering #22

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add Rendering #22

wants to merge 1 commit into from

Conversation

ExE-Boss
Copy link
Member

@ExE-Boss ExE-Boss commented Jan 15, 2017

To do:

  • Make the rendering instructions more user friendly

Copy link
Contributor

@RX14 RX14 left a 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.
Copy link
Contributor

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.
Copy link
Contributor

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.

Copy link
Member Author

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.
Copy link
Contributor

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.

Copy link
Contributor

@RX14 RX14 left a 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants