Alles anzeigenAlles anzeigenI have the same issue with him, I tried to get more infos about the FreeType rendering and he just use the n2 as a base. So, he even did not know about graphics and rendering, and just copied the one from N2 about glyph and rendering. He just deleted me in the discord, after I said its from n2 and he just copied their rendering and atlas generation and configured it for m2 code.
His code:
Bitte melden Sie sich an, um dieses Bild zu sehen.
N2-Code:
Alles anzeigenCode
- if (m_isOutline)
- {
- for (const auto &ch : m_chars)
- {
- const auto pCurCharInfo = ch.info;
- if (!ch.info) // skip undrawable chars
- continue;
- if (ch.emoji)
- continue;
- const Vector2 size(pCurCharInfo->_width, pCurCharInfo->_height);
- const Vector2 start(ch.x + pCurCharInfo->_bearingX,
- ch.y + fontInfo.ascender + pCurCharInfo->_bearingY);
- const Vector2 end = start + size;
- // Don't even bother sending those to the driver...
- if (clip && LiesEntirelyOutsideRect(*clip, start, end))
- continue;
- const auto tex = ch.info->_tex;
- auto &batchVertices = verticesMap[tex];
- vertices[0].texCoord.x = pCurCharInfo->_left;
- vertices[0].texCoord.y = pCurCharInfo->_top;
- vertices[1].texCoord.x = pCurCharInfo->_left;
- vertices[1].texCoord.y = pCurCharInfo->_bottom;
- vertices[2].texCoord.x = pCurCharInfo->_right;
- vertices[2].texCoord.y = pCurCharInfo->_top;
- vertices[3].texCoord.x = pCurCharInfo->_right;
- vertices[3].texCoord.y = pCurCharInfo->_bottom;
- vertices[3].diffuse = m_dwOutLineColor;
- vertices[2].diffuse = m_dwOutLineColor;
- vertices[1].diffuse = m_dwOutLineColor;
- vertices[0].diffuse = m_dwOutLineColor;
- vertices[0].position.y = pos.y + start.y - texelOfset;
- vertices[1].position.y = pos.y + end.y - texelOfset;
- vertices[2].position.y = pos.y + start.y - texelOfset;
- vertices[3].position.y = pos.y + end.y - texelOfset;
- // 왼
- vertices[0].position.x = pos.x + start.x - texelOfset;
- vertices[1].position.x = pos.x + start.x - texelOfset;
- vertices[2].position.x = pos.x + end.x - texelOfset;
- vertices[3].position.x = pos.x + end.x - texelOfset;
- batchVertices.push_back(vertices[0]);
- batchVertices.push_back(vertices[1]);
- batchVertices.push_back(vertices[2]);
- batchVertices.push_back(vertices[1]); //[1]
- batchVertices.push_back(vertices[2]);
- batchVertices.push_back(vertices[3]);
- vertices[0].position.y = pos.y + start.y - texelOfset;
- vertices[1].position.y = pos.y + end.y - texelOfset;
- vertices[2].position.y = pos.y + start.y - texelOfset;
- vertices[3].position.y = pos.y + end.y - texelOfset;
- // 왼
- vertices[0].position.x = pos.x + start.x - fFontHalfWeight - texelOfset;
- vertices[1].position.x = pos.x + start.x - fFontHalfWeight - texelOfset;
- vertices[2].position.x = pos.x + end.x - fFontHalfWeight - texelOfset;
- vertices[3].position.x = pos.x + end.x - fFontHalfWeight - texelOfset;
- batchVertices.push_back(vertices[0]);
- batchVertices.push_back(vertices[1]);
- batchVertices.push_back(vertices[2]);
- batchVertices.push_back(vertices[1]); //[1]
- batchVertices.push_back(vertices[2]);
- batchVertices.push_back(vertices[3]);
- // 오른
- vertices[0].position.x = pos.x + start.x + fFontHalfWeight - texelOfset;
- vertices[1].position.x = pos.x + start.x + fFontHalfWeight - texelOfset;
- vertices[2].position.x = pos.x + end.x + fFontHalfWeight - texelOfset;
- vertices[3].position.x = pos.x + end.x + fFontHalfWeight - texelOfset;
- batchVertices.push_back(vertices[0]);
- batchVertices.push_back(vertices[1]);
- batchVertices.push_back(vertices[2]);
- batchVertices.push_back(vertices[1]); //[1]
- batchVertices.push_back(vertices[2]);
- batchVertices.push_back(vertices[3]);
- vertices[0].position.x = pos.x + start.x - texelOfset;
- vertices[1].position.x = pos.x + start.x - texelOfset;
- vertices[2].position.x = pos.x + end.x - texelOfset;
- vertices[3].position.x = pos.x + end.x - texelOfset;
- // 위
- vertices[0].position.y = pos.y + start.y - fFontHalfWeight - texelOfset;
- vertices[1].position.y = pos.y + end.y - fFontHalfWeight - texelOfset;
- vertices[2].position.y = pos.y + start.y - fFontHalfWeight - texelOfset;
- vertices[3].position.y = pos.y + end.y - fFontHalfWeight - texelOfset;
- batchVertices.push_back(vertices[0]);
- batchVertices.push_back(vertices[1]);
- batchVertices.push_back(vertices[2]);
- batchVertices.push_back(vertices[1]); //[1]
- batchVertices.push_back(vertices[2]);
- batchVertices.push_back(vertices[3]);
- // 아래
- vertices[0].position.y = pos.y + start.y + fFontHalfWeight - texelOfset;
- vertices[1].position.y = pos.y + end.y + fFontHalfWeight - texelOfset;
- vertices[2].position.y = pos.y + start.y + fFontHalfWeight - texelOfset;
- vertices[3].position.y = pos.y + end.y + fFontHalfWeight - texelOfset;
- batchVertices.push_back(vertices[0]);
- batchVertices.push_back(vertices[1]);
- batchVertices.push_back(vertices[2]);
- batchVertices.push_back(vertices[1]); //[1]
- batchVertices.push_back(vertices[2]);
- batchVertices.push_back(vertices[3]);
- }
- }
Honestly you don't even know what I have used as base so please don't bullshit here. Thank you
Bitte melden Sie sich an, um diesen Anhang zu sehen.
N2:
Yours:
Bitte melden Sie sich an, um diesen Anhang zu sehen.
You deleted me after that. Why are you so offensive If I say that to you? So, yep, you used the one from n2, and the n2 render uses the same render as u 1:1. Don't be so mad. Just be honest.