openframeworks / openframeworks/openFrameworks

ofEnableAlphaBlending() not working correctly on windows

Open
#2,122 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug core section-2D windows
Dominant language
C++
Stars
10.4k
Forks
2.6k
Avg merge
1d 21h
Merged PRs (30d)
9

Description

We have a dual-platform project involving point sprites that consist of a transparent PNG texture. On the Mac we have ofEnableAlphaBlending on, and it performs as expected, pushing around 500fps. If we leave it off, the textures are square and chunky as expected.

On our Windows 7 machine we only got around 30fps so we started to do some investigation. Eventually we came upon not turning on ofEnableAlphaBlending and lo and behold, our frame rate is around 500fps AND everything is still blended nicely together, not chunky.

This leads me to believe there is a bug on the windows side of OF, as that's where the we're getting the unexpected behavior. Feel free to contact me for source files as needed.

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 by reproducing the dual-platform point-sprite case with a transparent PNG and compare behavior with ofEnableAlphaBlending enabled and disabled on Windows and macOS. Trace the ofEnableAlphaBlending entry point and the platform-specific rendering path; the issue is done when Windows matches the expected blending behavior and the discrepancy is covered by a regression check.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
computer-graphics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.