• Dear Cerberus X User!

    As we prepare to transition the forum ownership from Mike to Phil (TripleHead GmbH), we need your explicit consent to transfer your user data in accordance with our amended Terms and Rules in order to be compliant with data protection laws.

    Important: If you accept the amended Terms and Rules, you agree to the transfer of your user data to the future forum owner!

    Please read the new Terms and Rules below, check the box to agree, and click "Accept" to continue enjoying your Cerberus X Forum experience. The deadline for consent is April 5, 2024.

    Do not accept the amended Terms and Rules if you do not wish your personal data to be transferred to the future forum owner!

    Accepting ensures:

    - Continued access to your account with a short break for the actual transfer.

    - Retention of your data under the same terms.

    Without consent:

    - You don't have further access to your forum user account.

    - Your account and personal data will be deleted after April 5, 2024.

    - Public posts remain, but usernames indicating real identity will be anonymized. If you disagree with a fictitious name you have the option to contact us so we can find a name that is acceptable to you.

    We hope to keep you in our community and see you on the forum soon!

    All the best

    Your Cerberus X Team

Implemented Additional blendmode in Mojo2

Holzchopf

Well-known member
3rd Party Module Dev
Tutorial Author
Joined
Jul 31, 2017
Messages
500
I'd like to have an additional blendmode. One with
Code:
glBlendFunc GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA
instead of
Code:
glBlendFunc GL_ONE,GL_ONE_MINUS_SRC_ALPHA

The latter is used for Blendmode.Alpha, former is the typical blendfunc one uses when images aren't pre-multiplied (meaning colour channel values multiplied with alpha values when the image is loaded).

I'd like to introduce this into mojo2/graphics.cxs myself. But before I do, I wan't to make sure to use an adequate name for the newly introduced blendmode. Which one would you prefer?

  • FullAlpha (because it's using the full "alpha" capability of glBlendFunc)
  • Alpha2 (there's a Multiply2 already so maybe adding nondescript numbers is the way to go in Mojo2)
  • DirectAlpha (because it's going to be used when the images aren't pre-multiplied but instead the blending is done directly upon drawing)

Looking forward for your feedback ;-)
 
I would say use non descriptive numbers to keep the methology.
 
Oh god, no! NOOOOO! I wrote the description in a way I thought would make clear that I don't approve of it. Multiply2 unfortunately is undocumented and therefore might not even be known. If I wouldn't have mentioned it, no one would contemplate Alpha2. Maybe? My fault! I shouldn't have put that option up at all... :rolleyes:

In my opinion, neither Multiply2 nor Alpha2 are (or would be) well chosen names. If they at least end up in the docs, that would be great. But I can only provide the documentation for Alpha2, since I certainly don't feel like analysing the effect and use case of Multiply2.
 
I'd really love to see some more feedback. We should be happy that we as community can help improving Cerberus and should celebrate this by participating and sharing opinions concerning new ideas ;)
 
I do. But I want people to get involved ;-) Imagine one day, when Cerberus X is really big and well known, you can say "yeah I helped developing it"

(aren't you sold yet? sigh...)
 
I should have added.... don't do it for the fame/money :)

About getting involved... most people just use software as it is and don't care further.

Imagine one day, when Cerberus X is really big

This made me smile. Someone can always dream... and should!
 
Btw. if you want to submit more extensions to CX, please get used to Github and submit your changes through that.
 
Last edited:
Coming back to the topic, just add it and choose a name yourself.
 
I wanted to say, don't forget the documentation. But if it is something small, I can do it too.
 
Ok, your function was implemented then already under the name Opaque2. Sorry. :-/
 
Ok, I have reconstructed @Soap addition from back then. Still need to come up with names for the docs. Any ideas? I have put them there with the glBlendFunc but the description needs to be added.
 
Ok, your function was implemented then already under the name Opaque2. Sorry. :-/

That's OK, Opaque2 isn't even a catastrophic name ;-)

The extra column in the docs makes already quite a good explanation. The descriptions are hard to come up with. Is it possible to add images to the docs?
 
Yes, should be possible, if not, I make it possible. As I need that too. But I have to look into this myself.
 
Just checked: you can add plain html in a .cerberusdoc file. This means, there are plenty of options how to put an image into the docs:
  1. img tag with base64-encoded image data. Pro: doesn't depend on other files to be copied. Contra: Increases .cerberusdoc file drastically.
  2. img tag with src="data/yourfile.png". Pro: doesn't increase docfile. Contra: yourfile.png has to be copied to docs/data
  3. img tag with src="../../modules_ext/module/cerberusdoc/yourfile.png". Pro: you can simply include the graphics in the module you provide, the user doesn't have to copy anything. Contra: User must extract your module to modules OR modules_ext depending on what directory you had in mind.
Edit oh and I will look into the BlendMode docs tomorrow.
 
@Holzchopf I have uploaded a mod to Makedocs to add Markdown image links.

You can now add an image like this:

upload_2018-2-20_14-13-52.png


Which is basically

![Alternative text](image link)

To store them with the docs file and and have the image automatically copied into the html output...

upload_2018-2-20_14-16-56.png


The data folder has to named the same as the cerberusdoc file.
 

Attachments

  • makedocs_winnt_20180220.zip
    534.9 KB · Views: 279
Back
Top Bottom