Open matshou opened 4 years ago
@JTK222 provided two implementation samples on MMD:
AbstractGui.blit
method:
blit(double x0, double y0, int destWidth, int destHeight, float u0, float v0, int srcWidth, int srcHeight, int texWidth, int texHeight)
RenderSystem
:
RenderSystem.pushMatrix(); //Push current transformation matrix to the stack
RenderSystem.translate(0, 50, 0); //Ofset the matrix by 50 on the y axis.
//Everything rendered here will be offset 50 pixels downwards when in a gui
RenderSystem.popMatrix(); //Reset the matrix to the state of the last pushMatrix
Reference to mapped blit
parameters:
https://gist.github.com/gigaherz/f61fe604f38e27afad4d1553bc6cf311
Custom GUI elements should be scalable.