I'm having trouble displaying a triangle with Raylib's DrawTriangle()
function.
Minimum Reproducible Example
#include <raylib.h>
#include <stdlib.h>
int main(int argc, char** argv)
{
const unsigned int screenWidth = 1000;
const unsigned int screenWidth = 1000;
InitializeWindow(screenWidth, screenHeight, "Amazing Window");
// game loop
while(! WindowShouldClose())
{
BeginDrawing();
DrawTriangle(
// triangle vertices
{100, 10},
{10, 100},
{10, 10},
// triangle color
BLUE
);
EndDrawing();
}
}
Note
An example from Raylib's website worked fine, so the arguments to DrawTriangle
are probably to blame.
Passing the arguments in counterclockwise did the trick: