Skip to content

Commit

Permalink
updated documentation and readme
Browse files Browse the repository at this point in the history
  • Loading branch information
PaoloMazzon committed Jul 19, 2024
1 parent 422ea93 commit 1e4f21f
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 104 deletions.
15 changes: 4 additions & 11 deletions Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,12 @@ EXCLUDE = VulkanMemoryAllocator/ \
VK2D/Validation.h \
VK2D/Util.h

HTML_HEADER = header.html
#HTML_HEADER = header.html
HTML_EXTRA_STYLESHEET = doxygen-awesome-css/doxygen-awesome.css \
doxygen-awesome-css/doxygen-custom/custom.css \
doxygen-awesome-css/doxygen-awesome-sidebar-only.css \
doxygen-awesome-css/doxygen-awesome-sidebar-only-darkmode-toggle.css \
doxygen-awesome-css/doxygen-custom/custom-alternative.css
HTML_EXTRA_FILES = doxygen-awesome-css/doxygen-awesome-darkmode-toggle.js \
doxygen-awesome-css/doxygen-awesome-fragment-copy-button.js \
doxygen-awesome-css/doxygen-awesome-paragraph-link.js \
doxygen-awesome-css/doxygen-custom/toggle-alternative-theme.js \
doxygen-awesome-css/doxygen-awesome-interactive-toc.js \
doxygen-awesome-css/doxygen-awesome-tabs.js
HTML_COLORSTYLE = LIGHT
doxygen-awesome-css/doxygen-awesome-sidebar-only.css
#HTML_EXTRA_FILES =
HTML_COLORSTYLE = LIGHT
GENERATE_TREEVIEW = YES
DISABLE_INDEX = NO
FULL_SIDEBAR = NO
Expand Down
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@

Vulkan2D
========
Vulkan2D is a 2D renderer using Vulkan and SDL2 primarily for C games. VK2D aims for an extremely
[Vulkan2D](https://github.com/PaoloMazzon/Vulkan2D) is a 2D renderer using Vulkan and SDL2 primarily for C games. VK2D aims for an extremely
simple API, requiring no Vulkan experience to use. [Astro](https://github.com/PaoloMazzon/Astro)
and more recently [Bedlam](https://github.com/PaoloMazzon/Bedlam) internally use Vulkan2D for
rendering. My other projects [Spacelink](https://github.com/PaoloMazzon/Spacelink) and
and more recently [Sea of Clouds](https://devplo.itch.io/sea-of-clouds) internally use Vulkan2D for
rendering. My other projects [Bedlam](https://github.com/PaoloMazzon/Bedlam),
[Spacelink](https://github.com/PaoloMazzon/Spacelink), and
[Peace & Liberty](https://github.com/PaoloMazzon/PeacenLiberty) also used Vulkan2D, although
a much older version of it. Check out the [quick-start](docs/QuickStart.md) guide.

Expand All @@ -29,9 +30,7 @@ Features

Documentation
=============
Every file in VK2D is properly documented for doxygen, run `doxygen` in `Vulkan2D/` or check
the header files. Additionally, there is a few miscellaneous pieces of documentation,
[quick-start](docs/QuickStart.md) and [cameras](docs/Cameras.md). As a general overview,
Check out the [documentation website](https://paolomazzon.github.io/Vulkan2D/index.html).

Usage
=====
Expand Down
13 changes: 5 additions & 8 deletions VK2D/Renderer.h
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ VK2DRendererLimits vk2dRendererGetLimits();
/// \param r Rotation of the rectangle
/// \param ox X origin of rotation of the rectangle (in percentage)
/// \param oy Y origin of rotation of the rectangle (in percentage)
/// \warning This will do nothing unless the VK2D_UNIT_GENERATION option is enabled
void vk2dRendererDrawRectangle(float x, float y, float w, float h, float r, float ox, float oy);

/// \brief Draws a rectangle using the current rendering colour
Expand All @@ -161,22 +160,19 @@ void vk2dRendererDrawRectangle(float x, float y, float w, float h, float r, floa
/// \param ox X origin of rotation of the rectangle (in percentage)
/// \param oy Y origin of rotation of the rectangle (in percentage)
/// \param lineWidth Width of the outline
/// \warning This will do nothing unless the VK2D_UNIT_GENERATION option is enabled
void vk2dRendererDrawRectangleOutline(float x, float y, float w, float h, float r, float ox, float oy, float lineWidth);

/// \brief Draws a circle using the current rendering colour
/// \param x X position of the circle's center
/// \param y Y position of the circle's center
/// \param r Radius in pixels of the circle
/// \warning This will do nothing unless the VK2D_UNIT_GENERATION option is enabled
void vk2dRendererDrawCircle(float x, float y, float r);

/// \brief Draws a circle using the current rendering colour
/// \param x X position of the circle's center
/// \param y Y position of the circle's center
/// \param r Radius in pixels of the circle
/// \param lineWidth Width of the outline
/// \warning This will do nothing unless the VK2D_UNIT_GENERATION option is enabled
void vk2dRendererDrawCircleOutline(float x, float y, float r, float lineWidth);

/// \brief Draws a line using the current rendering colour
Expand Down Expand Up @@ -262,6 +258,9 @@ void vk2dRendererDrawPolygon(VK2DPolygon polygon, float x, float y, bool filled,
/// \param originX X origin for rotation (in pixels)
/// \param originY Y origin for rotation (in pixels)
/// \warning If filled is true the polygon must be triangulated.
///
/// This function works by putting the geometry into a vram page before drawing,
/// which means its limited by vk2dRendererGetLimits().maxGeometryVertices.
void vk2dRendererDrawGeometry(VK2DVertexColour *vertices, int count, float x, float y, bool filled, float lineWidth, float xscale, float yscale, float rot, float originX, float originY);

/// \brief Draws a shadow environment
Expand Down Expand Up @@ -474,10 +473,8 @@ void vk2dAssetsSetShaderMemory(VK2DAssetLoad *array, int index, void *vertexBuff
/// \brief Combines busy loops and SDL_Delay for a more accurate sleep function
/// \param seconds Time in seconds to sleep - values equal or less than 0 do nothing
///
/// In the worst case (the closer this is to a whole millisecond; i.e. 0.008005s will
/// have a significantly higher error than 0.0085s), this can have upwards of 6% error.
/// For games and most other use cases this more than accurate enough and less taxing
/// on the CPU than a busy loop.
/// This is a much more accurate sleep function that something like SDL_Delay without taxing
/// the CPU as much as a simple busy loop.
void vk2dSleep(double seconds);

/************************* Shorthand for simpler drawing at no performance cost *************************/
Expand Down
2 changes: 1 addition & 1 deletion doxygen-awesome-css/doxygen-awesome.css
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ html {
}
}

@media (prefers-color-scheme: dark) {
@media (prefers-color-scheme: light) {
html:not(.light-mode) {
color-scheme: dark;

Expand Down
78 changes: 0 additions & 78 deletions header.html

This file was deleted.

0 comments on commit 1e4f21f

Please sign in to comment.