This commit is contained in:
ikpil 2023-07-27 06:27:38 +09:00
parent dd08fcee70
commit 8681a822ad
1 changed files with 68 additions and 67 deletions

View File

@ -41,12 +41,79 @@ public class DebugDraw
{ {
return openGlDraw; return openGlDraw;
} }
public void Init(float fogDistance)
{
GetOpenGlDraw().Init();
}
public void Clear()
{
GetOpenGlDraw().Clear();
}
public void End()
{
GetOpenGlDraw().End();
}
public void Begin(DebugDrawPrimitives prim) public void Begin(DebugDrawPrimitives prim)
{ {
Begin(prim, 1f); Begin(prim, 1f);
} }
public void Begin(DebugDrawPrimitives prim, float size)
{
GetOpenGlDraw().Begin(prim, size);
}
public void Fog(float start, float end)
{
GetOpenGlDraw().Fog(start, end);
}
public void Fog(bool state)
{
GetOpenGlDraw().Fog(state);
}
public void DepthMask(bool state)
{
GetOpenGlDraw().DepthMask(state);
}
public void Texture(bool state)
{
GetOpenGlDraw().Texture(g_tex, state);
}
public void Vertex(float[] pos, int color)
{
GetOpenGlDraw().Vertex(pos, color);
}
public void Vertex(RcVec3f pos, int color)
{
GetOpenGlDraw().Vertex(pos, color);
}
public void Vertex(float x, float y, float z, int color)
{
GetOpenGlDraw().Vertex(x, y, z, color);
}
public void Vertex(RcVec3f pos, int color, RcVec2f uv)
{
GetOpenGlDraw().Vertex(pos, color, uv);
}
public void Vertex(float x, float y, float z, int color, float u, float v)
{
GetOpenGlDraw().Vertex(x, y, z, color, u, v);
}
public void DebugDrawCylinderWire(float minx, float miny, float minz, float maxx, float maxy, float maxz, int col, public void DebugDrawCylinderWire(float minx, float miny, float minz, float maxx, float maxy, float maxz, int col,
float lineWidth) float lineWidth)
{ {
@ -227,42 +294,6 @@ public class DebugDraw
End(); End();
} }
public void Begin(DebugDrawPrimitives prim, float size)
{
GetOpenGlDraw().Begin(prim, size);
}
public void Vertex(float[] pos, int color)
{
GetOpenGlDraw().Vertex(pos, color);
}
public void Vertex(RcVec3f pos, int color)
{
GetOpenGlDraw().Vertex(pos, color);
}
public void Vertex(float x, float y, float z, int color)
{
GetOpenGlDraw().Vertex(x, y, z, color);
}
public void Vertex(RcVec3f pos, int color, RcVec2f uv)
{
GetOpenGlDraw().Vertex(pos, color, uv);
}
public void Vertex(float x, float y, float z, int color, float u, float v)
{
GetOpenGlDraw().Vertex(x, y, z, color, u, v);
}
public void End()
{
GetOpenGlDraw().End();
}
public void DebugDrawCircle(float x, float y, float z, float r, int col, float lineWidth) public void DebugDrawCircle(float x, float y, float z, float r, int col, float lineWidth)
{ {
Begin(DebugDrawPrimitives.LINES, lineWidth); Begin(DebugDrawPrimitives.LINES, lineWidth);
@ -597,35 +628,6 @@ public class DebugDraw
return (int)(((col >> 1) & 0x007f7f7f) | (col & 0xff000000)); return (int)(((col >> 1) & 0x007f7f7f) | (col & 0xff000000));
} }
public void Fog(float start, float end)
{
GetOpenGlDraw().Fog(start, end);
}
public void Fog(bool state)
{
GetOpenGlDraw().Fog(state);
}
public void DepthMask(bool state)
{
GetOpenGlDraw().DepthMask(state);
}
public void Texture(bool state)
{
GetOpenGlDraw().Texture(g_tex, state);
}
public void Init(float fogDistance)
{
GetOpenGlDraw().Init();
}
public void Clear()
{
GetOpenGlDraw().Clear();
}
public float[] ProjectionMatrix(float fovy, float aspect, float near, float far) public float[] ProjectionMatrix(float fovy, float aspect, float near, float far)
{ {
@ -652,7 +654,6 @@ public class DebugDraw
} }
private readonly float[][] frustumPlanes = private readonly float[][] frustumPlanes =
{ {
new[] { 0f, 0f, 0f, 0f }, new[] { 0f, 0f, 0f, 0f },