Подведи собственные итоги года совместно с YOUGAME и забери ценные призы! Перейти

Вопрос Из-за чего это может рисоватся

Эксперт
Эксперт
Статус
Оффлайн
Регистрация
30 Дек 2019
Сообщения
1,965
Реакции
958
1603527305367.png

Если вы не поняли то объясню, от всех 3-х кругов рисуются треугольники к другим кругам, хз из-за чего, в симле всё правильно работает, перенёс на вив и тут такое
 

Вложения

  • 1603527308369.png
    1603527308369.png
    2.2 MB · Просмотры: 9
Код:
Expand Collapse Copy
void RenderFilled3DCircle(Vector2D point_one, Vector2D point_two, Vector2D point_three, color_t color)
{

    Vertex_t verts[3] = {
        Vertex_t(point_one),
        Vertex_t(point_two),
        Vertex_t(point_three)
    };

    

    static int texture = interfaces.surfaces->CreateNewTextureID(true);
    unsigned char buffer[4] = { 255, 255, 255, 255 };

    interfaces.surfaces->DrawSetTextureRGBA(texture, buffer, 1, 1);
    interfaces.surfaces->DrawSetcolor_t(color.get_red(), color.get_green(), color.get_blue(), color.get_alpha());
    interfaces.surfaces->DrawSetTexture(texture);

    interfaces.surfaces->DrawTexturedPolygon(3, verts);
}
 
Код:
Expand Collapse Copy
void RenderFilled3DCircle(Vector2D point_one, Vector2D point_two, Vector2D point_three, color_t color)
{

    Vertex_t verts[3] = {
        Vertex_t(point_one),
        Vertex_t(point_two),
        Vertex_t(point_three)
    };

   

    static int texture = interfaces.surfaces->CreateNewTextureID(true);
    unsigned char buffer[4] = { 255, 255, 255, 255 };

    interfaces.surfaces->DrawSetTextureRGBA(texture, buffer, 1, 1);
    interfaces.surfaces->DrawSetcolor_t(color.get_red(), color.get_green(), color.get_blue(), color.get_alpha());
    interfaces.surfaces->DrawSetTexture(texture);

    interfaces.surfaces->DrawTexturedPolygon(3, verts);
}
RenderFilled3DCircle

А функция отрисовки треугольника
:roflanEbalo:
 
Назад
Сверху Снизу