# 2D Vector Graphics in Minecraft

When it comes to 2D rendering libraries for UI purposes, there are two common choices:

* **NanoVG**: An antialiased 2D vector drawing library built on top of OpenGL, primarily used for simple UI and visualizations.
* **Skia**: A comprehensive 2D graphics library for rendering text, shapes, and images, often used in more complex applications.

## Key Differences

While both libraries serve a similar purpose—helping you render graphics on the screen—there are a few important differences:

1. **Lightweight vs. Feature** :
   * **NanoVG** is a lightweight, minimalistic option that’s ideal for simple UI needs. It offers basic drawing operations and is easy to integrate if you're just starting out.
   * **Skia**, on the other hand, is packed with advanced features, making it a great choice for users who need more complex capabilities. It includes built-in support for shadows, shaders, text rendering, and more.
2. **Performance**:
   * Due to its simplicity, **NanoVG** tends to be faster, especially for basic rendering tasks. It avoids complex operations, which helps in maintaining performance.
   * **Skia** might be a bit slower in comparison because it includes more complex rendering features. For instance, shadows and shaders are natively supported in Skia, whereas in NanoVG, you’d need to implement these effects manually.

## Recommendation

If you're just starting out, **NanoVG** is a great place to learn the basics of 2D rendering. Once you're comfortable and need more advanced features, you can transition to **Skia** for its richer set of tools.

In the upcoming documents, we’ll dive deeper into each library, exploring their features, use cases, and implementation details.

## Setup Tutorials

{% content-ref url="rendering-libraries/nanovg" %}
[nanovg](https://wiki.lunasa.dev/rendering-libraries/nanovg)
{% endcontent-ref %}

There's no setup tutorial for Skia right now, but expect one soon!


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://wiki.lunasa.dev/2d-vector-graphics-in-minecraft.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
