Immediate-Mode-UI / Immediate-Mode-UI/Nuklear

It is not possible to flip images using nk_image and nk_subimage

Open
#766 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
11.4k
Forks
686
Avg merge
4d 1h
Merged PRs (30d)
3

Description

Hello,
nk_subimage_id is casting the specified region components to nk_ushort which makes it impossible to use negative sizes on images.
Using opengl, framebuffer textures have their origin on the bottom left, which requires me flip the y axis when rendering them in the ui, which is not possible currently.
This seemed like an oversight to me, but if it is done on purpose, ignore me.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at nk_subimage_id and inspect how the specified region components are converted before reaching nk_image or nk_subimage. Confirm how negative sizes should represent a flipped image, then verify that normal subimage behavior remains unchanged and that vertically flipped images render correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
computer-graphics
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.