|
|
@ -1,6 +1,5 @@ |
|
|
|
package mightypork.rogue.util; |
|
|
|
package mightypork.rogue.util; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import static org.lwjgl.opengl.GL11.*; |
|
|
|
import static org.lwjgl.opengl.GL11.*; |
|
|
|
import mightypork.rogue.textures.TextureManager; |
|
|
|
import mightypork.rogue.textures.TextureManager; |
|
|
|
import mightypork.rogue.textures.TxQuad; |
|
|
|
import mightypork.rogue.textures.TxQuad; |
|
|
@ -27,8 +26,10 @@ public class RenderUtils { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Render quad 2D |
|
|
|
* Render quad 2D |
|
|
|
* |
|
|
|
* |
|
|
|
* @param min min coord |
|
|
|
* @param min |
|
|
|
* @param max max coord |
|
|
|
* min coord |
|
|
|
|
|
|
|
* @param max |
|
|
|
|
|
|
|
* max coord |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public static void quadCoord(Coord min, Coord max) |
|
|
|
public static void quadCoord(Coord min, Coord max) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -39,10 +40,14 @@ public class RenderUtils { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Render quad with absolute coords (from screen bottom) |
|
|
|
* Render quad with absolute coords (from screen bottom) |
|
|
|
* |
|
|
|
* |
|
|
|
* @param left left x |
|
|
|
* @param left |
|
|
|
* @param bottom bottom y |
|
|
|
* left x |
|
|
|
* @param right right x |
|
|
|
* @param bottom |
|
|
|
* @param top top y |
|
|
|
* bottom y |
|
|
|
|
|
|
|
* @param right |
|
|
|
|
|
|
|
* right x |
|
|
|
|
|
|
|
* @param top |
|
|
|
|
|
|
|
* top y |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public static void quadCoord(double left, double bottom, double right, double top) |
|
|
|
public static void quadCoord(double left, double bottom, double right, double top) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -58,11 +63,16 @@ public class RenderUtils { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Render quad with coloured border |
|
|
|
* Render quad with coloured border |
|
|
|
* |
|
|
|
* |
|
|
|
* @param min min |
|
|
|
* @param min |
|
|
|
* @param max max |
|
|
|
* min |
|
|
|
* @param border border width |
|
|
|
* @param max |
|
|
|
* @param borderColor border color |
|
|
|
* max |
|
|
|
* @param insideColor filling color |
|
|
|
* @param border |
|
|
|
|
|
|
|
* border width |
|
|
|
|
|
|
|
* @param borderColor |
|
|
|
|
|
|
|
* border color |
|
|
|
|
|
|
|
* @param insideColor |
|
|
|
|
|
|
|
* filling color |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public static void quadCoordBorder(Coord min, Coord max, double border, RGB borderColor, RGB insideColor) |
|
|
|
public static void quadCoordBorder(Coord min, Coord max, double border, RGB borderColor, RGB insideColor) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -73,13 +83,20 @@ public class RenderUtils { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Render quad with coloured border |
|
|
|
* Render quad with coloured border |
|
|
|
* |
|
|
|
* |
|
|
|
* @param minX min x |
|
|
|
* @param minX |
|
|
|
* @param minY min y |
|
|
|
* min x |
|
|
|
* @param maxX max x |
|
|
|
* @param minY |
|
|
|
* @param maxY max y |
|
|
|
* min y |
|
|
|
* @param border border width |
|
|
|
* @param maxX |
|
|
|
* @param borderColor border color |
|
|
|
* max x |
|
|
|
* @param insideColor filling color |
|
|
|
* @param maxY |
|
|
|
|
|
|
|
* max y |
|
|
|
|
|
|
|
* @param border |
|
|
|
|
|
|
|
* border width |
|
|
|
|
|
|
|
* @param borderColor |
|
|
|
|
|
|
|
* border color |
|
|
|
|
|
|
|
* @param insideColor |
|
|
|
|
|
|
|
* filling color |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public static void quadCoordBorder(double minX, double minY, double maxX, double maxY, double border, RGB borderColor, RGB insideColor) |
|
|
|
public static void quadCoordBorder(double minX, double minY, double maxX, double maxY, double border, RGB borderColor, RGB insideColor) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -104,10 +121,14 @@ public class RenderUtils { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Render quad 2D with gradient horizontal |
|
|
|
* Render quad 2D with gradient horizontal |
|
|
|
* |
|
|
|
* |
|
|
|
* @param min min coord |
|
|
|
* @param min |
|
|
|
* @param max max coord |
|
|
|
* min coord |
|
|
|
* @param colorLeft color left |
|
|
|
* @param max |
|
|
|
* @param colorRight color right |
|
|
|
* max coord |
|
|
|
|
|
|
|
* @param colorLeft |
|
|
|
|
|
|
|
* color left |
|
|
|
|
|
|
|
* @param colorRight |
|
|
|
|
|
|
|
* color right |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public static void quadCoordGradH(Coord min, Coord max, RGB colorLeft, RGB colorRight) |
|
|
|
public static void quadCoordGradH(Coord min, Coord max, RGB colorLeft, RGB colorRight) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -118,12 +139,18 @@ public class RenderUtils { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Render quad 2D with gradient horizontal |
|
|
|
* Render quad 2D with gradient horizontal |
|
|
|
* |
|
|
|
* |
|
|
|
* @param minX units from left |
|
|
|
* @param minX |
|
|
|
* @param minY units from bottom |
|
|
|
* units from left |
|
|
|
* @param maxX quad width |
|
|
|
* @param minY |
|
|
|
* @param maxY quad height |
|
|
|
* units from bottom |
|
|
|
* @param colorLeft color left |
|
|
|
* @param maxX |
|
|
|
* @param colorRight color right |
|
|
|
* quad width |
|
|
|
|
|
|
|
* @param maxY |
|
|
|
|
|
|
|
* quad height |
|
|
|
|
|
|
|
* @param colorLeft |
|
|
|
|
|
|
|
* color left |
|
|
|
|
|
|
|
* @param colorRight |
|
|
|
|
|
|
|
* color right |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public static void quadCoordGradH(double minX, double minY, double maxX, double maxY, RGB colorLeft, RGB colorRight) |
|
|
|
public static void quadCoordGradH(double minX, double minY, double maxX, double maxY, RGB colorLeft, RGB colorRight) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -144,10 +171,14 @@ public class RenderUtils { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Render quad 2D with gradient horizontal |
|
|
|
* Render quad 2D with gradient horizontal |
|
|
|
* |
|
|
|
* |
|
|
|
* @param min min coord |
|
|
|
* @param min |
|
|
|
* @param max max coord |
|
|
|
* min coord |
|
|
|
* @param colorOuter color outer |
|
|
|
* @param max |
|
|
|
* @param colorMiddle color inner |
|
|
|
* max coord |
|
|
|
|
|
|
|
* @param colorOuter |
|
|
|
|
|
|
|
* color outer |
|
|
|
|
|
|
|
* @param colorMiddle |
|
|
|
|
|
|
|
* color inner |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public static void quadCoordGradHBilinear(Coord min, Coord max, RGB colorOuter, RGB colorMiddle) |
|
|
|
public static void quadCoordGradHBilinear(Coord min, Coord max, RGB colorOuter, RGB colorMiddle) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -158,12 +189,18 @@ public class RenderUtils { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Render quad 2D with gradient horizontal |
|
|
|
* Render quad 2D with gradient horizontal |
|
|
|
* |
|
|
|
* |
|
|
|
* @param minX min x |
|
|
|
* @param minX |
|
|
|
* @param minY min y |
|
|
|
* min x |
|
|
|
* @param maxX max x |
|
|
|
* @param minY |
|
|
|
* @param maxY max y |
|
|
|
* min y |
|
|
|
* @param colorOuter color outer |
|
|
|
* @param maxX |
|
|
|
* @param colorMiddle color inner |
|
|
|
* max x |
|
|
|
|
|
|
|
* @param maxY |
|
|
|
|
|
|
|
* max y |
|
|
|
|
|
|
|
* @param colorOuter |
|
|
|
|
|
|
|
* color outer |
|
|
|
|
|
|
|
* @param colorMiddle |
|
|
|
|
|
|
|
* color inner |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public static void quadCoordGradHBilinear(double minX, double minY, double maxX, double maxY, RGB colorOuter, RGB colorMiddle) |
|
|
|
public static void quadCoordGradHBilinear(double minX, double minY, double maxX, double maxY, RGB colorOuter, RGB colorMiddle) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -194,10 +231,14 @@ public class RenderUtils { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Render quad 2D with gradient vertical |
|
|
|
* Render quad 2D with gradient vertical |
|
|
|
* |
|
|
|
* |
|
|
|
* @param min min coord |
|
|
|
* @param min |
|
|
|
* @param max max coord |
|
|
|
* min coord |
|
|
|
* @param colorTop top color |
|
|
|
* @param max |
|
|
|
* @param colorBottom bottom color |
|
|
|
* max coord |
|
|
|
|
|
|
|
* @param colorTop |
|
|
|
|
|
|
|
* top color |
|
|
|
|
|
|
|
* @param colorBottom |
|
|
|
|
|
|
|
* bottom color |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public static void quadCoordGradV(Coord min, Coord max, RGB colorTop, RGB colorBottom) |
|
|
|
public static void quadCoordGradV(Coord min, Coord max, RGB colorTop, RGB colorBottom) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -208,12 +249,18 @@ public class RenderUtils { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Render quad 2D with gradient vertical |
|
|
|
* Render quad 2D with gradient vertical |
|
|
|
* |
|
|
|
* |
|
|
|
* @param minX min X |
|
|
|
* @param minX |
|
|
|
* @param minY min Y |
|
|
|
* min X |
|
|
|
* @param maxX max X |
|
|
|
* @param minY |
|
|
|
* @param maxY max Y |
|
|
|
* min Y |
|
|
|
* @param colorTop top color |
|
|
|
* @param maxX |
|
|
|
* @param colorBottom bottom color |
|
|
|
* max X |
|
|
|
|
|
|
|
* @param maxY |
|
|
|
|
|
|
|
* max Y |
|
|
|
|
|
|
|
* @param colorTop |
|
|
|
|
|
|
|
* top color |
|
|
|
|
|
|
|
* @param colorBottom |
|
|
|
|
|
|
|
* bottom color |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public static void quadCoordGradV(double minX, double minY, double maxX, double maxY, RGB colorTop, RGB colorBottom) |
|
|
|
public static void quadCoordGradV(double minX, double minY, double maxX, double maxY, RGB colorTop, RGB colorBottom) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -233,10 +280,14 @@ public class RenderUtils { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Render quad 2D with gradient vertical |
|
|
|
* Render quad 2D with gradient vertical |
|
|
|
* |
|
|
|
* |
|
|
|
* @param min min coord |
|
|
|
* @param min |
|
|
|
* @param max max coord |
|
|
|
* min coord |
|
|
|
* @param colorOuter outer color |
|
|
|
* @param max |
|
|
|
* @param colorMiddle middle color |
|
|
|
* max coord |
|
|
|
|
|
|
|
* @param colorOuter |
|
|
|
|
|
|
|
* outer color |
|
|
|
|
|
|
|
* @param colorMiddle |
|
|
|
|
|
|
|
* middle color |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public static void quadCoordGradVBilinear(Coord min, Coord max, RGB colorOuter, RGB colorMiddle) |
|
|
|
public static void quadCoordGradVBilinear(Coord min, Coord max, RGB colorOuter, RGB colorMiddle) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -247,12 +298,18 @@ public class RenderUtils { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Render quad 2D with gradient vertical |
|
|
|
* Render quad 2D with gradient vertical |
|
|
|
* |
|
|
|
* |
|
|
|
* @param minX min X |
|
|
|
* @param minX |
|
|
|
* @param minY min Y |
|
|
|
* min X |
|
|
|
* @param maxX max X |
|
|
|
* @param minY |
|
|
|
* @param maxY max Y |
|
|
|
* min Y |
|
|
|
* @param colorOuter outer color |
|
|
|
* @param maxX |
|
|
|
* @param colorMiddle middle color |
|
|
|
* max X |
|
|
|
|
|
|
|
* @param maxY |
|
|
|
|
|
|
|
* max Y |
|
|
|
|
|
|
|
* @param colorOuter |
|
|
|
|
|
|
|
* outer color |
|
|
|
|
|
|
|
* @param colorMiddle |
|
|
|
|
|
|
|
* middle color |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public static void quadCoordGradVBilinear(double minX, double minY, double maxX, double maxY, RGB colorOuter, RGB colorMiddle) |
|
|
|
public static void quadCoordGradVBilinear(double minX, double minY, double maxX, double maxY, RGB colorOuter, RGB colorMiddle) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -281,11 +338,16 @@ public class RenderUtils { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Render quad with coloured border with outset effect |
|
|
|
* Render quad with coloured border with outset effect |
|
|
|
* |
|
|
|
* |
|
|
|
* @param min min coord |
|
|
|
* @param min |
|
|
|
* @param max max coord |
|
|
|
* min coord |
|
|
|
* @param border border width |
|
|
|
* @param max |
|
|
|
* @param fill fill color |
|
|
|
* max coord |
|
|
|
* @param inset true for inset, false for outset |
|
|
|
* @param border |
|
|
|
|
|
|
|
* border width |
|
|
|
|
|
|
|
* @param fill |
|
|
|
|
|
|
|
* fill color |
|
|
|
|
|
|
|
* @param inset |
|
|
|
|
|
|
|
* true for inset, false for outset |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public static void quadCoordOutset(Coord min, Coord max, double border, RGB fill, boolean inset) |
|
|
|
public static void quadCoordOutset(Coord min, Coord max, double border, RGB fill, boolean inset) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -296,13 +358,20 @@ public class RenderUtils { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Render quad with coloured border with outset effect |
|
|
|
* Render quad with coloured border with outset effect |
|
|
|
* |
|
|
|
* |
|
|
|
* @param minX left X |
|
|
|
* @param minX |
|
|
|
* @param minY bottom Y |
|
|
|
* left X |
|
|
|
* @param maxX right X |
|
|
|
* @param minY |
|
|
|
* @param maxY top Y |
|
|
|
* bottom Y |
|
|
|
* @param border border width |
|
|
|
* @param maxX |
|
|
|
* @param fill fill color |
|
|
|
* right X |
|
|
|
* @param inset true for inset, false for outset |
|
|
|
* @param maxY |
|
|
|
|
|
|
|
* top Y |
|
|
|
|
|
|
|
* @param border |
|
|
|
|
|
|
|
* border width |
|
|
|
|
|
|
|
* @param fill |
|
|
|
|
|
|
|
* fill color |
|
|
|
|
|
|
|
* @param inset |
|
|
|
|
|
|
|
* true for inset, false for outset |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public static void quadCoordOutset(double minX, double minY, double maxX, double maxY, double border, RGB fill, boolean inset) |
|
|
|
public static void quadCoordOutset(double minX, double minY, double maxX, double maxY, double border, RGB fill, boolean inset) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -367,7 +436,8 @@ public class RenderUtils { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Render quad 2D |
|
|
|
* Render quad 2D |
|
|
|
* |
|
|
|
* |
|
|
|
* @param rect rectangle |
|
|
|
* @param rect |
|
|
|
|
|
|
|
* rectangle |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public static void quadRect(Rect rect) |
|
|
|
public static void quadRect(Rect rect) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -378,8 +448,10 @@ public class RenderUtils { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Render quad 2D |
|
|
|
* Render quad 2D |
|
|
|
* |
|
|
|
* |
|
|
|
* @param rect rectangle |
|
|
|
* @param rect |
|
|
|
* @param color draw color |
|
|
|
* rectangle |
|
|
|
|
|
|
|
* @param color |
|
|
|
|
|
|
|
* draw color |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public static void quadRect(Rect rect, RGB color) |
|
|
|
public static void quadRect(Rect rect, RGB color) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -391,10 +463,14 @@ public class RenderUtils { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Render quad with coloured border |
|
|
|
* Render quad with coloured border |
|
|
|
* |
|
|
|
* |
|
|
|
* @param rect rect |
|
|
|
* @param rect |
|
|
|
* @param border border width |
|
|
|
* rect |
|
|
|
* @param borderColor border color |
|
|
|
* @param border |
|
|
|
* @param insideColor filling color |
|
|
|
* border width |
|
|
|
|
|
|
|
* @param borderColor |
|
|
|
|
|
|
|
* border color |
|
|
|
|
|
|
|
* @param insideColor |
|
|
|
|
|
|
|
* filling color |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public static void quadBorder(Rect rect, double border, RGB borderColor, RGB insideColor) |
|
|
|
public static void quadBorder(Rect rect, double border, RGB borderColor, RGB insideColor) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -405,9 +481,12 @@ public class RenderUtils { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Render quad 2D with gradient horizontal |
|
|
|
* Render quad 2D with gradient horizontal |
|
|
|
* |
|
|
|
* |
|
|
|
* @param rect rect |
|
|
|
* @param rect |
|
|
|
* @param colorLeft color left |
|
|
|
* rect |
|
|
|
* @param colorRight color right |
|
|
|
* @param colorLeft |
|
|
|
|
|
|
|
* color left |
|
|
|
|
|
|
|
* @param colorRight |
|
|
|
|
|
|
|
* color right |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public static void quadGradH(Rect rect, RGB colorLeft, RGB colorRight) |
|
|
|
public static void quadGradH(Rect rect, RGB colorLeft, RGB colorRight) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -418,9 +497,12 @@ public class RenderUtils { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Render quad 2D with gradient horizontal |
|
|
|
* Render quad 2D with gradient horizontal |
|
|
|
* |
|
|
|
* |
|
|
|
* @param rect rect |
|
|
|
* @param rect |
|
|
|
* @param colorOuter color outer |
|
|
|
* rect |
|
|
|
* @param colorMiddle color inner |
|
|
|
* @param colorOuter |
|
|
|
|
|
|
|
* color outer |
|
|
|
|
|
|
|
* @param colorMiddle |
|
|
|
|
|
|
|
* color inner |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public static void quadGradHBilinear(Rect rect, RGB colorOuter, RGB colorMiddle) |
|
|
|
public static void quadGradHBilinear(Rect rect, RGB colorOuter, RGB colorMiddle) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -431,9 +513,12 @@ public class RenderUtils { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Render quad 2D with gradient vertical |
|
|
|
* Render quad 2D with gradient vertical |
|
|
|
* |
|
|
|
* |
|
|
|
* @param rect rect |
|
|
|
* @param rect |
|
|
|
* @param colorTop top color |
|
|
|
* rect |
|
|
|
* @param colorBottom bottom color |
|
|
|
* @param colorTop |
|
|
|
|
|
|
|
* top color |
|
|
|
|
|
|
|
* @param colorBottom |
|
|
|
|
|
|
|
* bottom color |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public static void quadGradV(Rect rect, RGB colorTop, RGB colorBottom) |
|
|
|
public static void quadGradV(Rect rect, RGB colorTop, RGB colorBottom) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -444,9 +529,12 @@ public class RenderUtils { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Render quad 2D with gradient vertical |
|
|
|
* Render quad 2D with gradient vertical |
|
|
|
* |
|
|
|
* |
|
|
|
* @param rect rect |
|
|
|
* @param rect |
|
|
|
* @param colorOuter outer color |
|
|
|
* rect |
|
|
|
* @param colorMiddle middle color |
|
|
|
* @param colorOuter |
|
|
|
|
|
|
|
* outer color |
|
|
|
|
|
|
|
* @param colorMiddle |
|
|
|
|
|
|
|
* middle color |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public static void quadGradVBilinear(Rect rect, RGB colorOuter, RGB colorMiddle) |
|
|
|
public static void quadGradVBilinear(Rect rect, RGB colorOuter, RGB colorMiddle) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -457,10 +545,14 @@ public class RenderUtils { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Render quad with coloured border with outset effect |
|
|
|
* Render quad with coloured border with outset effect |
|
|
|
* |
|
|
|
* |
|
|
|
* @param rect rectangle |
|
|
|
* @param rect |
|
|
|
* @param border border width |
|
|
|
* rectangle |
|
|
|
* @param fill fill color |
|
|
|
* @param border |
|
|
|
* @param inset true for inset, false for outset |
|
|
|
* border width |
|
|
|
|
|
|
|
* @param fill |
|
|
|
|
|
|
|
* fill color |
|
|
|
|
|
|
|
* @param inset |
|
|
|
|
|
|
|
* true for inset, false for outset |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public static void quadRectOutset(Rect rect, double border, RGB fill, boolean inset) |
|
|
|
public static void quadRectOutset(Rect rect, double border, RGB fill, boolean inset) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -471,8 +563,10 @@ public class RenderUtils { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Render textured rect (texture must be binded already) |
|
|
|
* Render textured rect (texture must be binded already) |
|
|
|
* |
|
|
|
* |
|
|
|
* @param quad rectangle (px) |
|
|
|
* @param quad |
|
|
|
* @param textureCoords texture coords (0-1) |
|
|
|
* rectangle (px) |
|
|
|
|
|
|
|
* @param textureCoords |
|
|
|
|
|
|
|
* texture coords (0-1) |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public static void quadTexturedAbs(Rect quad, Rect textureCoords) |
|
|
|
public static void quadTexturedAbs(Rect quad, Rect textureCoords) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -502,9 +596,12 @@ public class RenderUtils { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Render textured rect |
|
|
|
* Render textured rect |
|
|
|
* |
|
|
|
* |
|
|
|
* @param quad rectangle (px) |
|
|
|
* @param quad |
|
|
|
* @param txCoords texture coords rectangle (px) |
|
|
|
* rectangle (px) |
|
|
|
* @param texture texture instance |
|
|
|
* @param txCoords |
|
|
|
|
|
|
|
* texture coords rectangle (px) |
|
|
|
|
|
|
|
* @param texture |
|
|
|
|
|
|
|
* texture instance |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public static void quadTextured(Rect quad, Rect txCoords, Texture texture) |
|
|
|
public static void quadTextured(Rect quad, Rect txCoords, Texture texture) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -515,10 +612,14 @@ public class RenderUtils { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Render textured rect |
|
|
|
* Render textured rect |
|
|
|
* |
|
|
|
* |
|
|
|
* @param quad rectangle (px) |
|
|
|
* @param quad |
|
|
|
* @param txCoords texture coords rectangle (px) |
|
|
|
* rectangle (px) |
|
|
|
* @param texture texture instance |
|
|
|
* @param txCoords |
|
|
|
* @param tint color tint |
|
|
|
* texture coords rectangle (px) |
|
|
|
|
|
|
|
* @param texture |
|
|
|
|
|
|
|
* texture instance |
|
|
|
|
|
|
|
* @param tint |
|
|
|
|
|
|
|
* color tint |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public static void quadTextured(Rect quad, Rect txCoords, Texture texture, RGB tint) |
|
|
|
public static void quadTextured(Rect quad, Rect txCoords, Texture texture, RGB tint) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -536,8 +637,10 @@ public class RenderUtils { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Render textured rect |
|
|
|
* Render textured rect |
|
|
|
* |
|
|
|
* |
|
|
|
* @param quad rectangle (px) |
|
|
|
* @param quad |
|
|
|
* @param txquad texture quad |
|
|
|
* rectangle (px) |
|
|
|
|
|
|
|
* @param txquad |
|
|
|
|
|
|
|
* texture quad |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public static void quadTextured(Rect quad, TxQuad txquad) |
|
|
|
public static void quadTextured(Rect quad, TxQuad txquad) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -548,9 +651,12 @@ public class RenderUtils { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Render textured rect |
|
|
|
* Render textured rect |
|
|
|
* |
|
|
|
* |
|
|
|
* @param quad rectangle (px) |
|
|
|
* @param quad |
|
|
|
* @param txquad texture instance |
|
|
|
* rectangle (px) |
|
|
|
* @param tint color tint |
|
|
|
* @param txquad |
|
|
|
|
|
|
|
* texture instance |
|
|
|
|
|
|
|
* @param tint |
|
|
|
|
|
|
|
* color tint |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public static void quadTextured(Rect quad, TxQuad txquad, RGB tint) |
|
|
|
public static void quadTextured(Rect quad, TxQuad txquad, RGB tint) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -561,10 +667,14 @@ public class RenderUtils { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Render textured frame with borders |
|
|
|
* Render textured frame with borders |
|
|
|
* |
|
|
|
* |
|
|
|
* @param quadRect drawn rectangle (px) |
|
|
|
* @param quadRect |
|
|
|
* @param textureRect rectangle in texture with the basic frame (px) |
|
|
|
* drawn rectangle (px) |
|
|
|
* @param yOffsetTimes offset count (move frame down n times) |
|
|
|
* @param textureRect |
|
|
|
* @param texture the texture |
|
|
|
* rectangle in texture with the basic frame (px) |
|
|
|
|
|
|
|
* @param yOffsetTimes |
|
|
|
|
|
|
|
* offset count (move frame down n times) |
|
|
|
|
|
|
|
* @param texture |
|
|
|
|
|
|
|
* the texture |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public static void quadTexturedFrame(Rect quadRect, Rect textureRect, int yOffsetTimes, Texture texture) |
|
|
|
public static void quadTexturedFrame(Rect quadRect, Rect textureRect, int yOffsetTimes, Texture texture) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -575,11 +685,16 @@ public class RenderUtils { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Render textured frame with borders |
|
|
|
* Render textured frame with borders |
|
|
|
* |
|
|
|
* |
|
|
|
* @param quadRect drawn rectangle (px) |
|
|
|
* @param quadRect |
|
|
|
* @param textureRect rectangle in texture with the basic frame (px) |
|
|
|
* drawn rectangle (px) |
|
|
|
* @param yOffsetTimes offset count (move frame down n times) |
|
|
|
* @param textureRect |
|
|
|
* @param texture the texture |
|
|
|
* rectangle in texture with the basic frame (px) |
|
|
|
* @param tint color tint |
|
|
|
* @param yOffsetTimes |
|
|
|
|
|
|
|
* offset count (move frame down n times) |
|
|
|
|
|
|
|
* @param texture |
|
|
|
|
|
|
|
* the texture |
|
|
|
|
|
|
|
* @param tint |
|
|
|
|
|
|
|
* color tint |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public static void quadTexturedFrame(Rect quadRect, Rect textureRect, int yOffsetTimes, Texture texture, RGB tint) |
|
|
|
public static void quadTexturedFrame(Rect quadRect, Rect textureRect, int yOffsetTimes, Texture texture, RGB tint) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -640,9 +755,12 @@ public class RenderUtils { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Render textured frame with borders |
|
|
|
* Render textured frame with borders |
|
|
|
* |
|
|
|
* |
|
|
|
* @param quadRect drawn rectangle (px) |
|
|
|
* @param quadRect |
|
|
|
* @param textureRect rectangle in texture with the basic frame (px) |
|
|
|
* drawn rectangle (px) |
|
|
|
* @param texture the texture |
|
|
|
* @param textureRect |
|
|
|
|
|
|
|
* rectangle in texture with the basic frame (px) |
|
|
|
|
|
|
|
* @param texture |
|
|
|
|
|
|
|
* the texture |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public static void quadTexturedFrame(Rect quadRect, Rect textureRect, Texture texture) |
|
|
|
public static void quadTexturedFrame(Rect quadRect, Rect textureRect, Texture texture) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -653,8 +771,10 @@ public class RenderUtils { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Render textured frame with borders |
|
|
|
* Render textured frame with borders |
|
|
|
* |
|
|
|
* |
|
|
|
* @param quadRect drawn rectangle (px) |
|
|
|
* @param quadRect |
|
|
|
* @param txquad texture quad |
|
|
|
* drawn rectangle (px) |
|
|
|
|
|
|
|
* @param txquad |
|
|
|
|
|
|
|
* texture quad |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public static void quadTexturedFrame(Rect quadRect, TxQuad txquad) |
|
|
|
public static void quadTexturedFrame(Rect quadRect, TxQuad txquad) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -665,9 +785,12 @@ public class RenderUtils { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Render textured frame with borders |
|
|
|
* Render textured frame with borders |
|
|
|
* |
|
|
|
* |
|
|
|
* @param quadRect drawn rectangle (px) |
|
|
|
* @param quadRect |
|
|
|
* @param txquad texture quad |
|
|
|
* drawn rectangle (px) |
|
|
|
* @param yOffsetTimes offset count (move frame down n times) |
|
|
|
* @param txquad |
|
|
|
|
|
|
|
* texture quad |
|
|
|
|
|
|
|
* @param yOffsetTimes |
|
|
|
|
|
|
|
* offset count (move frame down n times) |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public static void quadTexturedFrame(Rect quadRect, TxQuad txquad, int yOffsetTimes) |
|
|
|
public static void quadTexturedFrame(Rect quadRect, TxQuad txquad, int yOffsetTimes) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -678,10 +801,14 @@ public class RenderUtils { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Render textured frame with borders |
|
|
|
* Render textured frame with borders |
|
|
|
* |
|
|
|
* |
|
|
|
* @param quadRect drawn rectangle (px) |
|
|
|
* @param quadRect |
|
|
|
* @param txquad texture quad |
|
|
|
* drawn rectangle (px) |
|
|
|
* @param yOffsetTimes offset count (move frame down n times) |
|
|
|
* @param txquad |
|
|
|
* @param tint color tint |
|
|
|
* texture quad |
|
|
|
|
|
|
|
* @param yOffsetTimes |
|
|
|
|
|
|
|
* offset count (move frame down n times) |
|
|
|
|
|
|
|
* @param tint |
|
|
|
|
|
|
|
* color tint |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public static void quadTexturedFrame(Rect quadRect, TxQuad txquad, int yOffsetTimes, RGB tint) |
|
|
|
public static void quadTexturedFrame(Rect quadRect, TxQuad txquad, int yOffsetTimes, RGB tint) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -693,10 +820,14 @@ public class RenderUtils { |
|
|
|
* Render textured frame stretching horizontally (rect height = texture rect |
|
|
|
* Render textured frame stretching horizontally (rect height = texture rect |
|
|
|
* height) |
|
|
|
* height) |
|
|
|
* |
|
|
|
* |
|
|
|
* @param quadRect drawn rectangle (px) |
|
|
|
* @param quadRect |
|
|
|
* @param textureRect rectangle in texture with the basic frame (px) |
|
|
|
* drawn rectangle (px) |
|
|
|
* @param borderSize size of the unstretched horizontal border |
|
|
|
* @param textureRect |
|
|
|
* @param texture the texture |
|
|
|
* rectangle in texture with the basic frame (px) |
|
|
|
|
|
|
|
* @param borderSize |
|
|
|
|
|
|
|
* size of the unstretched horizontal border |
|
|
|
|
|
|
|
* @param texture |
|
|
|
|
|
|
|
* the texture |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public static void quadTexturedStretchH(Rect quadRect, Rect textureRect, int borderSize, Texture texture) |
|
|
|
public static void quadTexturedStretchH(Rect quadRect, Rect textureRect, int borderSize, Texture texture) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -708,11 +839,16 @@ public class RenderUtils { |
|
|
|
* Render textured frame stretching horizontally (rect height = texture rect |
|
|
|
* Render textured frame stretching horizontally (rect height = texture rect |
|
|
|
* height) |
|
|
|
* height) |
|
|
|
* |
|
|
|
* |
|
|
|
* @param quadRect drawn rectangle (px) |
|
|
|
* @param quadRect |
|
|
|
* @param textureRect rectangle in texture with the basic frame (px) |
|
|
|
* drawn rectangle (px) |
|
|
|
* @param borderSize size of the unstretched horizontal border |
|
|
|
* @param textureRect |
|
|
|
* @param texture the texture |
|
|
|
* rectangle in texture with the basic frame (px) |
|
|
|
* @param tint color tint |
|
|
|
* @param borderSize |
|
|
|
|
|
|
|
* size of the unstretched horizontal border |
|
|
|
|
|
|
|
* @param texture |
|
|
|
|
|
|
|
* the texture |
|
|
|
|
|
|
|
* @param tint |
|
|
|
|
|
|
|
* color tint |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public static void quadTexturedStretchH(Rect quadRect, Rect textureRect, int borderSize, Texture texture, RGB tint) |
|
|
|
public static void quadTexturedStretchH(Rect quadRect, Rect textureRect, int borderSize, Texture texture, RGB tint) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -753,9 +889,12 @@ public class RenderUtils { |
|
|
|
* Render textured frame stretching horizontally (rect height = texture rect |
|
|
|
* Render textured frame stretching horizontally (rect height = texture rect |
|
|
|
* height) |
|
|
|
* height) |
|
|
|
* |
|
|
|
* |
|
|
|
* @param quadRect drawn rectangle (px) |
|
|
|
* @param quadRect |
|
|
|
* @param txquad texture quad |
|
|
|
* drawn rectangle (px) |
|
|
|
* @param borderSize size of the unstretched horizontal border |
|
|
|
* @param txquad |
|
|
|
|
|
|
|
* texture quad |
|
|
|
|
|
|
|
* @param borderSize |
|
|
|
|
|
|
|
* size of the unstretched horizontal border |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public static void quadTexturedStretchH(Rect quadRect, TxQuad txquad, int borderSize) |
|
|
|
public static void quadTexturedStretchH(Rect quadRect, TxQuad txquad, int borderSize) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -767,10 +906,14 @@ public class RenderUtils { |
|
|
|
* Render textured frame stretching horizontally (rect height = texture rect |
|
|
|
* Render textured frame stretching horizontally (rect height = texture rect |
|
|
|
* height) |
|
|
|
* height) |
|
|
|
* |
|
|
|
* |
|
|
|
* @param quadRect drawn rectangle (px) |
|
|
|
* @param quadRect |
|
|
|
* @param txquad texture quad |
|
|
|
* drawn rectangle (px) |
|
|
|
* @param borderSize size of the unstretched horizontal border |
|
|
|
* @param txquad |
|
|
|
* @param tint color tint |
|
|
|
* texture quad |
|
|
|
|
|
|
|
* @param borderSize |
|
|
|
|
|
|
|
* size of the unstretched horizontal border |
|
|
|
|
|
|
|
* @param tint |
|
|
|
|
|
|
|
* color tint |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public static void quadTexturedStretchH(Rect quadRect, TxQuad txquad, int borderSize, RGB tint) |
|
|
|
public static void quadTexturedStretchH(Rect quadRect, TxQuad txquad, int borderSize, RGB tint) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -782,10 +925,14 @@ public class RenderUtils { |
|
|
|
* Render textured frame stretching vertically (rect width = texture rect |
|
|
|
* Render textured frame stretching vertically (rect width = texture rect |
|
|
|
* width) |
|
|
|
* width) |
|
|
|
* |
|
|
|
* |
|
|
|
* @param quadRect drawn rectangle (px) |
|
|
|
* @param quadRect |
|
|
|
* @param textureRect rectangle in texture with the basic frame (px) |
|
|
|
* drawn rectangle (px) |
|
|
|
* @param borderSize size of the unstretched horizontal border |
|
|
|
* @param textureRect |
|
|
|
* @param texture the texture |
|
|
|
* rectangle in texture with the basic frame (px) |
|
|
|
|
|
|
|
* @param borderSize |
|
|
|
|
|
|
|
* size of the unstretched horizontal border |
|
|
|
|
|
|
|
* @param texture |
|
|
|
|
|
|
|
* the texture |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public static void quadTexturedStretchV(Rect quadRect, Rect textureRect, int borderSize, Texture texture) |
|
|
|
public static void quadTexturedStretchV(Rect quadRect, Rect textureRect, int borderSize, Texture texture) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -797,11 +944,16 @@ public class RenderUtils { |
|
|
|
* Render textured frame stretching vertically (rect width = texture rect |
|
|
|
* Render textured frame stretching vertically (rect width = texture rect |
|
|
|
* width) |
|
|
|
* width) |
|
|
|
* |
|
|
|
* |
|
|
|
* @param quadRect drawn rectangle (px) |
|
|
|
* @param quadRect |
|
|
|
* @param textureRect rectangle in texture with the basic frame (px) |
|
|
|
* drawn rectangle (px) |
|
|
|
* @param borderSize size of the unstretched horizontal border |
|
|
|
* @param textureRect |
|
|
|
* @param texture the texture |
|
|
|
* rectangle in texture with the basic frame (px) |
|
|
|
* @param tint color tint |
|
|
|
* @param borderSize |
|
|
|
|
|
|
|
* size of the unstretched horizontal border |
|
|
|
|
|
|
|
* @param texture |
|
|
|
|
|
|
|
* the texture |
|
|
|
|
|
|
|
* @param tint |
|
|
|
|
|
|
|
* color tint |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public static void quadTexturedStretchV(Rect quadRect, Rect textureRect, int borderSize, Texture texture, RGB tint) |
|
|
|
public static void quadTexturedStretchV(Rect quadRect, Rect textureRect, int borderSize, Texture texture, RGB tint) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -844,9 +996,12 @@ public class RenderUtils { |
|
|
|
* Render textured frame stretching vertically (rect width = texture rect |
|
|
|
* Render textured frame stretching vertically (rect width = texture rect |
|
|
|
* width) |
|
|
|
* width) |
|
|
|
* |
|
|
|
* |
|
|
|
* @param quadRect drawn rectangle (px) |
|
|
|
* @param quadRect |
|
|
|
* @param txquad texture quad |
|
|
|
* drawn rectangle (px) |
|
|
|
* @param borderSize size of the unstretched horizontal border |
|
|
|
* @param txquad |
|
|
|
|
|
|
|
* texture quad |
|
|
|
|
|
|
|
* @param borderSize |
|
|
|
|
|
|
|
* size of the unstretched horizontal border |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public static void quadTexturedStretchV(Rect quadRect, TxQuad txquad, int borderSize) |
|
|
|
public static void quadTexturedStretchV(Rect quadRect, TxQuad txquad, int borderSize) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -858,10 +1013,14 @@ public class RenderUtils { |
|
|
|
* Render textured frame stretching vertically (rect width = texture rect |
|
|
|
* Render textured frame stretching vertically (rect width = texture rect |
|
|
|
* width) |
|
|
|
* width) |
|
|
|
* |
|
|
|
* |
|
|
|
* @param quadRect drawn rectangle (px) |
|
|
|
* @param quadRect |
|
|
|
* @param txquad texture quad |
|
|
|
* drawn rectangle (px) |
|
|
|
* @param borderSize size of the unstretched horizontal border |
|
|
|
* @param txquad |
|
|
|
* @param tint color tint |
|
|
|
* texture quad |
|
|
|
|
|
|
|
* @param borderSize |
|
|
|
|
|
|
|
* size of the unstretched horizontal border |
|
|
|
|
|
|
|
* @param tint |
|
|
|
|
|
|
|
* color tint |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public static void quadTexturedStretchV(Rect quadRect, TxQuad txquad, int borderSize, RGB tint) |
|
|
|
public static void quadTexturedStretchV(Rect quadRect, TxQuad txquad, int borderSize, RGB tint) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -873,10 +1032,14 @@ public class RenderUtils { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Render quad 2D |
|
|
|
* Render quad 2D |
|
|
|
* |
|
|
|
* |
|
|
|
* @param left units from left |
|
|
|
* @param left |
|
|
|
* @param bottom units from bottom |
|
|
|
* units from left |
|
|
|
* @param width quad width |
|
|
|
* @param bottom |
|
|
|
* @param height quad height |
|
|
|
* units from bottom |
|
|
|
|
|
|
|
* @param width |
|
|
|
|
|
|
|
* quad width |
|
|
|
|
|
|
|
* @param height |
|
|
|
|
|
|
|
* quad height |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public static void quadSize(double left, double bottom, double width, double height) |
|
|
|
public static void quadSize(double left, double bottom, double width, double height) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -892,7 +1055,8 @@ public class RenderUtils { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Bind GL color |
|
|
|
* Bind GL color |
|
|
|
* |
|
|
|
* |
|
|
|
* @param color RGB color |
|
|
|
* @param color |
|
|
|
|
|
|
|
* RGB color |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public static void setColor(RGB color) |
|
|
|
public static void setColor(RGB color) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -903,8 +1067,10 @@ public class RenderUtils { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Bind GL color |
|
|
|
* Bind GL color |
|
|
|
* |
|
|
|
* |
|
|
|
* @param color RGB color |
|
|
|
* @param color |
|
|
|
* @param alpha alpha multiplier |
|
|
|
* RGB color |
|
|
|
|
|
|
|
* @param alpha |
|
|
|
|
|
|
|
* alpha multiplier |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public static void setColor(RGB color, double alpha) |
|
|
|
public static void setColor(RGB color, double alpha) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -915,7 +1081,8 @@ public class RenderUtils { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Translate with coord |
|
|
|
* Translate with coord |
|
|
|
* |
|
|
|
* |
|
|
|
* @param coord coord |
|
|
|
* @param coord |
|
|
|
|
|
|
|
* coord |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public static void translate(Coord coord) |
|
|
|
public static void translate(Coord coord) |
|
|
|
{ |
|
|
|
{ |
|
|
|