Skip to content

Commit

Permalink
now using glEnablei/glDisablei for BlendModes. (Mac ARM64 only atm)
Browse files Browse the repository at this point in the history
  • Loading branch information
krauthaufen committed Feb 21, 2025
1 parent 83f3da2 commit fbbd6e9
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
3 changes: 3 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
### 5.5.16
- now using `glEnablei/glDisablei` for BlendModes.

### 5.5.15
- updated package FSharp.Data.Adaptive 1.2.19
- Improved error reporting for buffer creation and updating
Expand Down
Binary file modified lib/Native/Aardvark.Rendering.GL/mac/ARM64/glvm.dylib
Binary file not shown.
12 changes: 8 additions & 4 deletions src/GLVM/glvm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1156,12 +1156,16 @@ DllExport(void) hglSetBlendModes(int count, BlendMode** ptr)
}
else
{
glEnable(GL_BLEND);

for (int i = 0; i < count; i++)
{
glBlendFuncSeparatei(i, modes[i].SourceFactor, modes[i].DestFactor, modes[i].SourceFactorAlpha, modes[i].DestFactorAlpha);
glBlendEquationSeparatei(i, modes[i].Operation, modes[i].OperationAlpha);
if(modes[i].Enabled) {
glEnablei(GL_BLEND, i);
glBlendFuncSeparatei(i, modes[i].SourceFactor, modes[i].DestFactor, modes[i].SourceFactorAlpha, modes[i].DestFactorAlpha);
glBlendEquationSeparatei(i, modes[i].Operation, modes[i].OperationAlpha);
}
else {
glDisablei(GL_BLEND, i);
}
}
}
endtrace("a")
Expand Down

0 comments on commit fbbd6e9

Please sign in to comment.