ใฏใใใซ
ๆฐดๆ้คจใใใใใชใใงใใ๏ผ๏ผ
ๅใฏๆฐดๆ้คจใๅฅฝใใชใฎใงๅฎๆ็ใซ่กใใใๆฐๆใกใซใชใใพใใ
(ไธ็ทใซ่กใไบบใใใชใใฎใงใใผใฃใกใงใฏ่กใใพใใ)
ใใใฆใตใจๆใใพใใใ
ใใใ
$\huge{๐๐๐ใ้ญใใใ100ไธไฝๆณณใใใ๐๐๐}$
ๅฎๆใชๅฎ่ฃ
# include <Siv3D.hpp>
void Main()
{
// ๐ใ้ญใใใๆณณใใใ๏ฝ๏ฝ๐
Texture tex(Emoji(U"๐"));
auto scaledTex = tex.scaled(0.3);
const auto& texSize = scaledTex.size;
// ๐ 100ไธไฝๆณณใใใ๏ฝ๐
constexpr size_t fishCount = 1000000;
constexpr double sqrtFishCount = 1000.0;
// ๐ ้ฉๅฝใซๅบงๆจ่จ็ฎ๐
Array<Vec2> positions;
positions.reserve(fishCount);
for (size_t count = 0; count < fishCount; ++count) {
positions << static_cast<Vec2>(texSize) * Vec2{
Math::Fmod(count, sqrtFishCount),
count / sqrtFishCount
};
}
while (System::Update())
{
ClearPrint();
Print << texSize;
Print << Profiler::FPS();
// ๐ ใ้ญใใๆ็ป๏ผ๏ผ๐
for (const auto& pos : positions) {
scaledTex.drawAt(pos);
}
}
}
ใๆฐใฅใใงใใใใ๏ผ
FPSใ10ใพใง่ฝใกใฆใ็กไบๆญปไบกใใพใใใ
(ใชใใใชใชใผในใใซใใงใๅๆงใงใใ)
โปๅฎ้ใซใฏใใใฎใใๆนใ ใจใใฆใ็ป้ขๅคใฎใ้ญใใใฏๆ็ปใใชใใใใซใใใชใฉใฎๅฏพๅฟใใใใปใใใใใจๆใใพใ๐
auto screenRect = Scene::Rect();
for (const auto& pos : positions) {
if (!screenRect.intersects(scaledTex.regionAt(pos))) {
// ็ป้ขๅคใฎใใฎใฏ็ก่ฆ
continue;
}
scaledTex.drawAt(pos);
}
ใงใฏใฉใใใใฐใใ้ญใใใ100ไธไฝๆณณใใใใจใใงใใใฎใ
DrawTriangles
ใใใซใใใฏใฏใฉใใใใใใใงใใใใโฆ
ใใใใ100ไธใซใผใใ่ปฝใใฏใชใใจๆใใพใใ
100ไธๅๆ็ปๅฝไปคใใใฆใใใฎใฏใจใฆใ้ใใใงใใ
(1ๅ็ปๅใ็ป้ขใซๅบใใ ใใงใ่ฃใงใฏใใใใใชๅฆ็ใใใฃใฆใใใฎใงใใ)
ใใฎๆฉใฟใ่งฃๆฑบใใฆใใใใฎใใไปๅใ็ดนไปใใใกใฝใใ
๐**s3d::Graphics2D::DrawTriangles(uint32 count)
**๐
ใงใใ
ใใฎ้ขๆฐใฏใ
ๅผๆฐใงๆธกใใๆฐใ ใไธ่งๅฝขใๆ็ปใใ้ขๆฐใงใใ
ใจใ่จใใพใใใๅฎ้ใซใใฎใกใฝใใใๅผใใงใไธ่งๅฝขโณใฏๆ็ปใใใชใใงใใใใ
ไธ่งๅฝขใฎๅบงๆจใใ่ฒใชใฉใฎ้ ็นๆ
ๅ ฑใไฝไธใค่จญๅฎใใฆใใชใใใใงใใ
ใงใฏใใใใใฃใ้ ็นๆ ๅ ฑใใฉใใใฃใฆ่จญๅฎใใใฎใใจใใใจใ้ ็นใทใงใผใใผใไฝฟใใพใใ
(ไฝ่ซใงใใใๆงSiv3Dใซใ้กไผผใฎ้ขๆฐใใใใพใใใใใใฎๆใฏไธ่งๅฝขใฎๆฐใงใฏใชใ้ ็นๆฐใๆธกใใกใฝใใใ ใฃใใฎใงใๅฐใใ ใไฝฟใๆนใๅคใใฃใฆใใพใใ)
# include <Siv3D.hpp>
void Main()
{
// ๐ใ้ญใใใๆณณใใใ๏ฝ๏ฝ๐
Texture tex(Emoji(U"๐"));
// ๐ 100ไธไฝๆณณใใใ๏ฝ๐
constexpr size_t fishCount = 1000000;
// ใทใงใผใใผ
const FilePath shaderPath{ U"osakana_san.hlsl" };
VertexShader vs = HLSL{ shaderPath };
PixelShader ps = HLSL{ shaderPath };
while (System::Update())
{
ClearPrint();
Print << Profiler::FPS();
// ๐ ใ้ญใใๆ็ป๏ผ๏ผ๐
{
// ใทใงใผใใผ่จญๅฎ
ScopedCustomShader2D scopedShder{ vs, ps };
// PSใงไฝฟใใใใซใใฏในใใฃใใปใใ
s3d::Graphics2D::SetPSTexture(0, tex);
// 100ไธ * 2ๅใฎไธ่งๅฝขๆ็ป
// ๅ่งๅฝขใฎๆ็ปใซใฏไธ่งๅฝขใ2ใคใใใฎใง2ๅใซใใฆใ
s3d::Graphics2D::DrawTriangles(fishCount * 2);
}
}
}
ๅ่งๅฝขใฎ็ปๅใๆ็ปใใใใใซใฏไธ่งๅฝขใ2ใคๅฟ ่ฆใชใฎใงใๆ็ปใใใๆฐใซ2ๅใใใใๅฟ ่ฆใใใใพใใ
ใ้ญใใใฎใใฏในใใฃใๅผตใไปใใใใฎใงใใใฏใปใซใทใงใผใใผใไฝฟใฃใฆใใพใใ
โปๆณจๆ๏ผใใฎ่จไบใงใฏHLSLใงใทใงใผใใผใๆธใใพใใใใใฉใใใใฉใผใ ใซๅฟใใฆใฏGLSLใไฝฟ็จใใๅฟ ่ฆใใใใพใใ
้ ็นใทใงใผใใผใง่จ็ฎ
่จ็ฎใใพใใใ(ๅฎ)
Texture2D g_texture0 : register(t0);
SamplerState g_sampler0 : register(s0);
namespace s3d
{
//
// VS Input (nothing)
//
//
// VS Output
//
struct PSInput
{
float4 position : SV_POSITION;
float4 color : COLOR0;
float2 uv : TEXCOORD0;
};
//
// Siv3D Functions
//
float4 Transform2D(float2 pos, float2x4 t)
{
return float4((t._13_14 + (pos.x * t._11_12) + (pos.y * t._21_22)), t._23_24);
}
}
//
// Constant Buffer
//
cbuffer VSConstants2D : register(b0)
{
row_major float2x4 g_transform;
float4 g_colorMul;
}
cbuffer PSConstants2D : register(b0)
{
float4 g_colorAdd;
float4 g_sdfParam;
float4 g_sdfOutlineColor;
float4 g_sdfShadowColor;
float4 g_internal;
}
//-------------------------------------------
// ้ ็นใทใงใผใใผ
float2 toUV(uint mod6)
{
if (mod6 == 0) {
return float2(0, 0);
} else if (mod6 == 1) {
return float2(1, 0);
} else if (mod6 == 2) {
return float2(0, 1);
} else if (mod6 == 3) {
return float2(0, 1);
} else if (mod6 == 4) {
return float2(1, 0);
} else {
return float2(1, 1);
}
}
float2 toQuad(float2 uv, float2 size)
{
float2 halfSize = size / 2.0;
float2 ret = lerp(-halfSize, halfSize, uv);
return ret;
}
s3d::PSInput VS(uint id: SV_VERTEXID)
{
s3d::PSInput result;
// ไธๅนใฎใ้ญใใใซๅฟ
่ฆใช้ ็นใฏ 6
const uint quadId = id / 6;
const uint mod6 = id % 6;
// ๅบงๆจใ้ฉๅฝใซ่จ็ฎ
float2 pos = float2(0, 0);
const uint sqrtFishCount = 1000;
const int xId = (int)(quadId % sqrtFishCount);
const int yId = (int)(quadId / sqrtFishCount);
float2 size = float2(40.8, 38.4);
pos += float2(xId * size.x, yId * size.y);
// uvๅบงๆจใ่จ็ฎ
float2 uv = toUV(mod6);
// ๅ่งๅฝขใซใใ
pos += toQuad(uv, size);
result.position = s3d::Transform2D(pos, g_transform);
result.uv = uv;
result.color = g_colorMul;
return result;
}
//-------------------------------------------
// ใใฏใปใซใทใงใผใใผ
float4 PS(s3d::PSInput input) : SV_TARGET
{
const float4 texColor = g_texture0.Sample(g_sampler0, input.uv);
return (texColor * input.color) + g_colorAdd;
}
โฆ
ใใๅฐใ็ดฐใใ่ฆใฆใใใพใใ
namespace s3d
{
//
// VS Input (nothing)
//
//
// VS Output
//
struct PSInput
{
float4 position : SV_POSITION;
float4 color : COLOR0;
float2 uv : TEXCOORD0;
};
//
// Siv3D Functions
//
float4 Transform2D(float2 pos, float2x4 t)
{
return float4((t._13_14 + (pos.x * t._11_12) + (pos.y * t._21_22)), t._23_24);
}
}
//
// Constant Buffer
//
cbuffer VSConstants2D : register(b0)
{
row_major float2x4 g_transform;
float4 g_colorMul;
}
cbuffer PSConstants2D : register(b0)
{
float4 g_colorAdd;
float4 g_sdfParam;
float4 g_sdfOutlineColor;
float4 g_sdfShadowColor;
float4 g_internal;
}
ใพใใไธใฎใปใใฎใใฎใใใใฎใณใผใใฏใSiv3Dใง2Dๆ็ปใใไธใงๅฟ
่ฆใชๅ
ฅๅใฌใคใขใฆใใๅฎๆฐใใใใกใฎๅๅฎ็พฉใชใฎใงSiv3Dใงใซในใฟใ ใทใงใผใใผใไฝฟใๆใฎใณใใใฎใใใช้จๅใงใใ
(ใจใใใๅบๆฌใฏใณใใใใใปใใใใใงใ)
(PSใไฝฟใใชใๅ ดๅใฏPSConstants2D ใฏไธ่ฆใงใ)
ใใ ใใๆณจ็ฎใในใใจใใใใใใพใใ
ใใใฏVS Input (nothing)
ใจใณใกใณใใใใฆใใใใใซใ
้ ็นใฎๅ
ฅๅๅๅฎ็พฉใใชใใใจใงใใ
ๆฌๆฅTexture.draw
ใชใฉใงๆ็ปใใ้ใซใซในใฟใ ้ ็นใทใงใผใใผใไฝฟใ้ใซใฏ
ๅ้ ็นใฎๅบงๆจใuvใ่ฒๆ
ๅ ฑใ่จญๅฎใใฆๆ็ปใใใใ
ไปฅไธใฎใใใชๅๅฎ็พฉใๅฟ
่ฆใงใใ
struct VSInput
{
float2 position : POSITION;
float2 uv : TEXCOORD0;
float4 color : COLOR0;
};
ใใใใDrawTriangles
ใฏไธๅ้ ็นๆ
ๅ ฑใ่จญๅฎใใใซใใ ใ้ ็นๆฐใ ใ(ไธ่งๅฝขใฎๆฐใ ใ)ๆๅฎใใฆๆ็ปใใ้ขๆฐใ ใฃใใฎใงใใใใงใฏVSInputใไธ่ฆใซใชใใพใใ
ๆฌกใซใใฏใปใซใทใงใผใใผๅดใซ้ขใใใณใผใใงใใ
็นใซ็นๆฎใชใใจใฏไฝใใใฆใใพใใใฎใงใในใซใผใใพใใ
Texture2D g_texture0 : register(t0);
SamplerState g_sampler0 : register(s0);
------------------------
float4 PS(s3d::PSInput input) : SV_TARGET
{
const float4 texColor = g_texture0.Sample(g_sampler0, input.uv);
return (texColor * input.color) + g_colorAdd;
}
่ฃ่ถณ๏ผC++ๅดใงใ้ญใใใฎใใฏในใใฃใ่จญๅฎใใฆใใใฎใงโใฎใจใใใงใขใฏใปในใงใใๆใใงใ
(ใตใณใใฉใผใฏใใจใใจ่จญๅฎใใใฆใใใใฎใงๆงใใชใใฎใง็นใซๆ็คบ็ใซ่จญๅฎใใฆใใพใใใ)
// PSใงไฝฟใใใใซใใฏในใใฃใใปใใ
s3d::Graphics2D::SetPSTexture(0, tex);
ใใฆใใใใใ้ ็นใทใงใผใใผใฎไธญใ่ฆใฆใใใพใใ
s3d::PSInput VS(uint id: SV_VERTEXID)
ใใใฎidใซใๆ็ปใใ้ ็นๆฐใฎๅใ ใๆฐๅคใๅ
ฅใฃใฆใใพใใ
ใคใพใidใฏ
0 ~ DrawTrianglesใซๆธกใใๅผๆฐใฎๆฐ*3 - 1
ใพใงๆฐๅญใๅ
ฅใฃใฆใใพใใ(ไธ่งๅฝขใฎ้ ็นๆฐใฏ3ใชใฎใง*3ใใใพใใ)
// ไธๅนใฎใ้ญใใใซๅฟ
่ฆใช้ ็นใฏ 6
const uint quadId = id / 6;
ๅ่งๅฝขใๆ็ปใใใฎใซ้ ็นใ6ใคๅฟ
่ฆใชใฎใงไธๅนใฎใ้ญใใใ่กจ็พใใใฎใซ6้ ็นไฝฟใใพใใ
ใชใฎใงใใใใง6ใงๅฒใฃใฆใใใใจใงใ้ญใใไธๅนใฎidใซๅคๆใใฆใใพใใ
// ๅบงๆจใ้ฉๅฝใซ่จ็ฎ
float2 pos = float2(0, 0);
const uint sqrtFishCount = 1000;
const int xId = (int)(quadId % sqrtFishCount);
const int yId = (int)(quadId / sqrtFishCount);
float2 size = float2(40.8, 38.4);
pos += float2(xId * size.x, yId * size.y);
ใใฎ่พบใฏๆๅใซๅฎๆใชๅฎ่ฃ ใใๆใจๅใใใใซ้ฉๅฝใซไธฆในใฆใใ ใใงใใใพใง้่ฆใชใจใใใงใฏใชใใงใใ
float2 toUV(uint mod6)
{
if (mod6 == 0) {
return float2(0, 0);
} else if (mod6 == 1) {
return float2(1, 0);
} else if (mod6 == 2) {
return float2(0, 1);
} else if (mod6 == 3) {
return float2(0, 1);
} else if (mod6 == 4) {
return float2(1, 0);
} else {
return float2(1, 1);
}
}
-----
const uint mod6 = id % 6;
// uvๅบงๆจใ่จ็ฎ
float2 uv = toUV(mod6);
ใ้ญใใใฎใใฏในใใฃใๅผตใไปใใใใใซใฏๅ้ ็นใซUVๅบงๆจใ่จญๅฎใใๅฟ
่ฆใใใใพใใ
ใใฎใใใใฎ่จ็ฎใใใใงใใฆใใพใใ
float2 toQuad(float2 uv, float2 size)
{
float2 halfSize = size / 2.0;
float2 ret = lerp(-halfSize, halfSize, uv);
return ret;
}
-------
// ๅ่งๅฝขใซใใ
pos += toQuad(uv, size);
ไธใฎใปใใง้ฉๅฝใซ่จ็ฎใใๅบงๆจใไธญๅฟๅบงๆจใจใชใๅ่งๅฝขใซใชใใใใซ่จ็ฎใใฆใใพใใ
(ใ้ญใใไธๅนใๆไฝใใใใใซ6ใงๅฒใฃใฆๅบงๆจ่จ็ฎใใใฆใใใฎใงใใณใณใๅฟใใใจ6้ ็นๅ
จ้จๅใๅบงๆจใซใชใฃใฆ็นใซใชใฃใฆใใพใใพใใ)
s3d::PSInput result;
result.position = s3d::Transform2D(pos, g_transform);
result.uv = uv;
result.color = g_colorMul;
ๆๅพใซใไปใพใงใใใใ่จ็ฎใใใใฎใใใฏใปใซใทใงใผใใผใๆฑใๅ ฅๅใฎๅฝขใซๅคๆใใฆ็ตใใใงใใ
ใ้ญใใใ100ไธไฝๆณณใใ
๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐
๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐
ๅ
จใ็ป้ขใซๅใพใใใใใชใใฎใงใใใ100ไธไฝๆณณใใงใฆใFPSใ็ถญๆใงใใฆใใใใงใใ
๐**ใใฃใใญ!**๐
ใพใฆใๆณณใใงใชใใใชใใ
ใใใงใใใ้ญใใใใพใ ๆณณใใงใพใใโฆ๏ผ๏ผ
็พ็ถใๅๆญขใใกใใฃใฆใใพใใ
ใฉใใใฃใฆๆณณใใใฎใ โฆ๏ผ๏ผ๐
ๅฎๆฐใใใใก
C++ๅดใใใทใงใผใใผใซใใฉใกใผใฟใ้ใใใใจใใซไฝฟใใใฎใๅฎๆฐใใใใกใงใใ
# include <Siv3D.hpp>
/// ๅฎๆฐใใใใกใฎๅๅฎ็พฉ
struct OsakanaSanParam
{
float time{};
};
void Main()
{
// ๐ใ้ญใใใๆณณใใใ๏ฝ๏ฝ๐
Texture tex(Emoji(U"๐"));
// ๐ 100ไธไฝๆณณใใใ๏ฝ๐
constexpr size_t fishCount = 1000000;
// ใทใงใผใใผ
const FilePath shaderPath{ U"osakana_san.hlsl" };
VertexShader vs = HLSL{ shaderPath };
PixelShader ps = HLSL{ shaderPath };
ConstantBuffer<OsakanaSanParam> cb;
while (System::Update())
{
ClearPrint();
Print << Profiler::FPS();
Print << cb->time;
// ๐ ใ้ญใใๆ็ป๏ผ๏ผ๐
{
// ใทใงใผใใผ่จญๅฎ
ScopedCustomShader2D scopedShder{ vs, ps };
// ๅฎๆฐใใใใกใงๆ้ใ้ใ
cb->time = static_cast<float>(Scene::Time());
s3d::Graphics2D::SetVSConstantBuffer(1, cb);
// PSใงไฝฟใใใใซใใฏในใใฃใใปใใ
s3d::Graphics2D::SetPSTexture(0, tex);
// 100ไธ * 2ๅใฎไธ่งๅฝขๆ็ป
// ๅ่งๅฝขใฎๆ็ปใซใฏไธ่งๅฝขใ2ใคใใใฎใง2ๅใซใใฆใ
s3d::Graphics2D::DrawTriangles(fishCount * 2);
}
}
}
cbuffer OsakanasanParam : register(b1)
{
float g_time;
}
s3d::PSInput VS(uint id: SV_VERTEXID)
{
s3d::PSInput result;
const uint quadId = id / 6;
const uint mod6 = id % 6;
float2 pos = float2(0, 0);
const uint sqrtFishCount = 1000;
const int xId = (int)(quadId % sqrtFishCount);
const int yId = (int)(quadId / sqrtFishCount);
float2 size = float2(40.8, 38.4);
pos += float2(xId * size.x, yId * size.y);
// ๆณณใใ้ญใใ๏ผ
pos += float2(-100, -100) * g_time;
float2 uv = toUV(mod6);
pos += toQuad(uv, size);
result.position = s3d::Transform2D(pos, g_transform);
result.uv = uv;
result.color = g_colorMul;
return result;
}
ใใฎใใใใฎใณใผใใ่ฟฝๅ ใใพใใใ
/// ๅฎๆฐใใใใกใฎๅๅฎ็พฉ
struct OsakanaSanParam
{
float time{};
};
------------
// ๅฎๆฐใใใใกใงๆ้ใ้ใ
cb->time = static_cast<float>(Scene::Time());
s3d::Graphics2D::SetVSConstantBuffer(1, cb);
cbuffer OsakanasanParam : register(b1)
{
float g_time;
}
--------
// ๆณณใใ้ญใใ๏ผ
pos += float2(-100, -100) * g_time;
C++ๅดใฎๅผๆฐ1
ใจใทใงใผใใผๅดใฎb1
ใฎๆฐๅญใๅใใใๅฟ
่ฆใใใใพใใ
ใใฃใใใชใฎใงใใใพใใซใ้ญใใใฎๅใใๅฐใใใใพใใใ
float2 rot(float2 xy, float theta)
{
float cosTheta = cos(theta);
float sinTheta = sin(theta);
return mul(float2x2(cosTheta, -sinTheta, sinTheta, cosTheta), xy);
}
float2 toQuad(float2 uv, float2 size)
{
float2 halfSize = size / 2.0;
float2 ret = lerp(-halfSize, halfSize, uv);
// ๅ่ปข
{
float theta = atan2(100.0, 100.0);
ret = rot(ret, theta);
}
return ret;
}
๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐
๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐
๐**ใ้ญใใๆณณใใ ใ๏ผใใฃใใญ!**๐
โ ๏ธ100ไธไฝๆ็ปใงใใใจใฏ่จใฃใฆใชใ
100ไธไฝใฎใ้ญใใใๆณณใใใใใจใใงใใพใใใใใๅฎใฏใ100ไธไฝใฎใ้ญใใใๆ็ปใงใใใใใงใฏใใใพใใใ
ใใใฏใฏใชใใใณใฐๅฆ็ใซใใใ็ป้ขใซๆ ใใชใใใฎใฏๆจใฆใใใฆใใใใใใงๅฆ็ใ้ซ้ๅใใใฆใใใใใงใใ
่ฉฆใใซ100ไธๅนใในใฆใใชใๅบงๆจใซใใใจ่ชๅใฎ็ฐๅขใงใฏใใกใใใกใๅฆ็่ฝใกใใพใใใ
(ใใใงใๅฎๆใซ100ไธๅๆ็ปๅฝไปคใใใใใฏๅฆ็่ฒ ่ทใๅฐใชใใฃใ)
ใจใฏใใใ100ไธใฏ็ก็ใงใ10ไธๅนใใใใชใๆฎ้ใซๆ็ปใงใใกใใใพใใ!
(10ไธๅๆ็ปๅฝไปคใใๅ ดๅใๅฆ็่ฝใกใฏใใฆใใ)
ใใพใ๏ผ๐็งใฎใ้ญใใใ็ดนไป๐
ไปๅ็ดนไปใใใฝใผในใณใผใใฏใใใกใใใกใ็ถบ้บใซๆดๅใใใ้ญใใใๆทกใ
ใจ็งปๅใใฆใใใ ใใงใใใ
ใใฃใจใใใใๅณไปใใใใฆใใใจใๆฅฝใใๆใใซใชใฃใฆใใใพใใ
็งปๅๅฆ็่ชไฝใใซโใใใใใใซใใใใใใจ็ก้ใซใ้ญใใใๆณณใใงใใใพใใ
(ใใฃใใฎๅฎ่ฃ
ใ ใจๆ้็ต้ใซ้ฃใใฆๅบงๆจใใฉใใฉใๆดๆฐใใใใฎใงใใใคใใ้ญใใใใใชใใชใฃใกใใใใใญ)
โปใชใใใใใใซ100ไธไฝใใใใใใฆใใพใใใ๐
ๅ่
ใซในใฟใ ใทใงใผใใผๅจใใฏOpenSiv3Dใฎใใฅใผใใชใขใซใซใใใใฎใ่ชญใใฎใใใใจๆใใพใใ
-
ใใฅใผใใชใขใซ 35 | 2D ใซในใฟใ ใทใงใผใ
- ใซในใฟใ ใทใงใผใใผๅจใใฎๅบ็ค็ใชไฝฟใๆนใใพใจใพใฃใฆใใพใใ
-
ใตใณใใซ้ | ใใธใฅใขใซ่กจ็พ > GPU ใงใฎ้ ็น็ๆ
- ไธ่จใตใณใใซใฏใไปๅใฎ็จ้ใจใฏๅ จใ้ใฃใใตใณใใซใงใใใๅใใใใซDrawTrianglesใไฝฟใฃใฆ้ ็น่จ็ฎใใฆใใไพใงใใ
ใพใจใ
-
s3d::Graphics2D::DrawTriangles(uint32 count)
ใไฝฟใใจใๅฆ็่ฒ ่ทใใใใใคใคๆฒขๅฑฑใฎ้ ็นใๆฑใใใจใใงใใ- ใใ ใ้ ็นใทใงใผใใผใง่ชๅใซๅ จใฆ่จ็ฎใใๅฟ ่ฆใใใ
- ่ค้ใชๅฝข็ถใๆ็ปใใใ้ใฎ้ ็น่จ็ฎใซไพฟๅฉใงใ
- ไปๅใฎใใใซๅใใใฏในใใฃใชใฉใๅคง้ใซ็ป้ขใซๅบใใใใจใใชใฉใซใฏไฝใณในใใงใใใใๆ็ปใงใใฆไพฟๅฉใงใ
- ใ้ญใใใใใฃใฑใๆณณใใงใฆๅฏๆใ๐
- ๆฐดๆ้คจใซ่กใใใ