Skip to content

Instantly share code, notes, and snippets.

@stoyannk
Last active December 10, 2016 09:37
Show Gist options
  • Select an option

  • Save stoyannk/74f4f47efcce5eab5bc69f66f24fa96d to your computer and use it in GitHub Desktop.

Select an option

Save stoyannk/74f4f47efcce5eab5bc69f66f24fa96d to your computer and use it in GitHub Desktop.
Sample of the blend modes unoptimal function
inline BlendingState BlendingMode2State(BlendModes mode)
{
static BlendingState states[] = {
{ /* Clear */
true,
BC_Zero,
BC_Zero,
BLOP_Add,
BC_Zero,
BC_Zero,
BLOP_Add,
},
// .. Many more states defined here
};
return states[mode];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment