apply diffuse texture to a model raylib c#

I’m trying to apply a texture to the material of a Model but I could not figure out how to do it:

so I made a direct translation of the c code taken from examples:

(original from “Raylib (shaders) example – postprocessing shader” line 77)

model.materials(0).maps(MAP_DIFFUSE).texture = texture;

(my c# translation)

m_LP_SpookyTree = LP_SpookyTree.GetModel;
m_LP_SpookyTree.materials(0).maps(MaterialMapType.MAP_ALBEDO).texture = Raylib.LoadTexture("Ressource/Textures/PlaceHolders/mossy_rock_diff_1k.png");

According to the cs file on the repo, the “materials” definition is an Int pointer.
The problem comes from the Intptr, how could I get the material array from it?

thanks for your time.

PS: I’ve created an issue on Raylib.cs GitHub repo so if I get an answer on one before the other, I’ll update accordingly


EDIT 1:

I’ve tried to change every IntPtr to the object it should actually point to regarding the comments in the source file, compile the lib, and imported it. unfortunately, it broke. so I don’t think it’s possible.

pathfinder 1e – Does losing Dex to AC also apply to CMD?

Relevant rules:

CMD:

…Any penalties to a creature’s AC also apply to its CMD. A flat-footed creature does not add its Dexterity bonus to its CMD…

blind:

…The creature cannot see. It takes a –2 penalty to Armor Class, loses its Dexterity bonus to AC (if any)…

penalty:

Penalties are numerical values that are subtracted from a check or statistical score. Penalties do not have a type and most penalties stack with one another…

Invisible:

…Invisible creatures are visually undetectable. An invisible creature gains a +2 bonus on attack rolls against sighted opponents, and ignores its opponents’ Dexterity bonuses to AC (if any) …

Bonus:

…Bonuses are numerical values that are added to checks and statistical scores. Most bonuses have a type, and as a general rule, bonuses of the same type are not cumulative (do not “stack”)—only the greater bonus granted applies…

The question is: Does losing your Dex bonus to AC mean you lose your Dex modifier which is factored into the CMD?

And as a side question:
Does losing your Dex bonus to AC mean you lose all dodge bonuses (not only the one from the Dodge feat, which explicitly states that you lose the benefits of that feat if you lose your Dex bonus to AC)?

My GM has the opinion that blinded creatures do not lose their Dex-bonus on CMD, because it is no penalty. He said:

…If it would apply in this case why are there multiple special rules
which explicitly address the case where you lose your Dodge bonus to
AC and in addition something applies which should be the normal rule
in your interpretation.

For instance flat footed which explicitly mentions Dex bonus to CMD
and the Dodge Feet which explicitly mentions that you lose the
benefits from the Feat (1 Dodge bonus) when you lose Dex to AC.

Not the way I see it, penalties are clearly described as penalties in
all descriptions ( –2 penalty to Armor Class), in addition the removal
of a bonus is not a penalty in my opinion, it means a recalculation
(without the called bonus)…

Is my GM right?

air travel – Do Articles 8 and 9 of EC261 not apply to flight cancellations announced 2+ weeks in advance?

Regarding the EC261 regulation, I know Article 7 (compensation) doesn’t apply if the flight is cancelled more than two weeks in advance. However, it’s always been my understanding that Article 8 (right to a choice between a refund and re-routing “at the earliest opportunity”) and Article 9 (right to care) apply regardless, the latter provided I haven’t opted for a refund.

However, the Irish national enforcement body just told me Article 8 and 9 don’t apply either if the flight was cancelled two weeks or more in advance, and that I can only get a refund and am on my own in terms of getting home.

Is this really the case? Some clarification would be appreciated.

Magento2 Expand Apply Coupon Code on Luma Checkout page

on Magento 2.3 I have edited the Apply Coupon text box to be expanded by default which works on the view cart page. However when I go to the checkout page (I am using default Luma child theme) the Apply Discount code box is not expanded by default like it is on the view cart page.

What is the path to the file that controls this on the actual checkout page?

dnd 5e – How does Arcane Armor’s removal of Strength requirements apply at a table using the Encumbrance variant?

The Armorer Artificer’s Arcane Armor feature says:

If the armor normally has a Strength requirement, the arcane armor lacks this requirement for you.

This is in reference to the following regarding certain heavy armors:

If the Armor table shows “Str 13” or “Str 15” in the Strength column for an armor type, the armor reduces the wearer’s speed by 10 feet unless the wearer has a Strength score equal to or higher than the listed score. [PHB, pg 144]

However, the Encumbrance variant says, in part:

When you use this variant, ignore the Strength column of the Armor table in chapter 5.

If you carry weight in excess of 5 times your Strength score, you are encumbered, which means your speed drops by 10 feet. [PHB, pg 176]

Is there guidance for how to apply the Arcane Armor feature at a table that uses the Encumbrance variant?

customs and immigration – Can I apply for a UK visitor visa while I am on ICT visa in the UK?

I am currently on an ICT work visa in the UK which is ending soon, but I want to spend some more time with my boyfriend in the UK before going back to my home country, India.

Can I apply for a visit or tourist visa within the UK while on an ICT visa or I would have to travel back to India and apply from there?

java – How can I apply an Optional in which I want to call a method?

I have this piece of code:

final ResultDO response = transformJsonToResponseDO(rawDataResponse, ResultDO.class);

return Optional.ofNullable(response)
            .map(results -> createPOIs(Collections.singletonList(response), providerResponse))
            .orElse(Collections.emptyList());

The important part is that: response is an object of type ResultDO. Within an Optional I want to call that method createPois(). Methot createPois wants a list of ResultDO, but there I will always have it only element because of that I wrapped in a Collections.singletonList().

As I wrote it, is it the right way, with that .map() ?

I don’t want to use if(response != null) …

Maybe it is worth to mention that createPois() return a list of some other types. A list of Points.

customs and immigration – Can i apply UK visit visa while I am on ICT visa in the UK

Stack Exchange Network


Stack Exchange network consists of 176 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

sharepoint online – Set-SOPSite does not apply sharing setting

I’m trying to set the Sharing setting of a site in a provisioning script. After creating a Team site (classic experience) site, I want to set the sharing to new and existing users we have set in the Sharing settings of the admin center. The tenant is set to disabled, not sure if this has an impact, we want external sharing to be off except for a few limited sites at this point.

After creating the site via PowerShell, I try executing
Set-SPOSite -Identity $siteURL -SharingCapability ExternalUserSharingOnly. It doesn’t throw any errors, but it doesn’t set the appropriate value, still reads disabled in PowerShell and is disbaled in the admin center.

What is happening?

usa – US travel restrictions on arrivals – does this apply to stopovers?

I see that there is a Presidential Proclamation that restrictions aliens from entering the United States if they have been physically present in Ireland (along with some other countries) any time over the past 14 days. Now, I am looking at a flight to the US that has a technical stopover in Dublin, where I do not have to deplane. I know even transiting through an airport is restricted, but what about this situation?

The airline has told me that a stopover is not an issue and that they have had passengers who have entered the US with no issue. However, I guess I’m just paranoid and don’t want to be sent back at the border.