Jump to content

[1.15.1] MatrixStack in custom IRenderHandler


Nuparu00

Recommended Posts

Hi. I am updating my dimensions from 1.12.2 to 1.15.1. One of the things that my dimensions have is custom sky renderer (for custom sun/moon textures, etc..). I have taken a look at how vanilla Minecraft renders the sky in WorldRenderer#func_228424_a_(). The code looks mostly the same as in 1.12.2, however, there are definitely some changes (I suppose because of the new rendering engine). One of the arguments the method takes is of type MatrixStack. I suppose it is used to calculate positions and rotations of the horizon and celestial objects. Anyway, the thing is, that I do not know where should I get an instance of MatrixStack. It seems that it is created and passed from inside a method and is not stored in any field. Do you have any tips? Or is this just something that will be solved in the stable release?

Link to comment
Share on other sites

54 minutes ago, Nuparu00 said:

One of the arguments the method takes is of type MatrixStack. I suppose it is used to calculate positions and rotations of the horizon and celestial objects.

All rendering is now deferred (theoretically) so MatrixStack is the replacement for GL calls that modify the matrix like push, pop, rotate, translate and scale.

55 minutes ago, Nuparu00 said:

I do not know where should I get an instance of MatrixStack. It seems that it is created and passed from inside a method and is not stored in any field. Do you have any tips? Or is this just something that will be solved in the stable release?

See https://github.com/MinecraftForge/MinecraftForge/pull/6444

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.