Welcome to collectivesolver - Programming & Software Q&A with code examples. A website with trusted programming answers. All programs are tested and work.

Contact: aviboots(AT)netvision.net.il

Semrush - keyword research tool

Turn ChatGPT, Claude, Gemini, And CoPilot Into Your Personal Assistant, Business Coach, Content Creator, And More

AFFILIATE MARKETING Your all-in-one performance engine Manage affiliates, creators, and customer referrals in one unified platform—turning every partnership into measurable growth
Secure & Reliable Web Hosting, Free Domain, Free SSL, 1-Click WordPress Install, Expert 24/7 Support

Boost your online presence with premium web hosting and servers

Disclosure: My content contains affiliate links.

42,656 questions

55,403 answers

573 users

How to draw a small triangle in the left top corner of the screen with Raylib in C

1 Answer

0 votes
#include "raylib.h"

#define WIDTH 800
#define HEIGHT 600

int main(void)
{
    InitWindow(WIDTH, HEIGHT, "Raylib DrawTriangle() Top Left Corner");

    SetTargetFPS(60);

    // Main game loop
    while (!WindowShouldClose())
    {
        BeginDrawing();

        ClearBackground(BLACK);
                   
        DrawTriangle((Vector2) { 5.0f, 0.0f },
                     (Vector2) { 0.0f, 5.0f },
                     (Vector2) { 10.0f, 5.0f }, GREEN);
   
        EndDrawing();
    }

    CloseWindow(); // Close window and OpenGL context

    return 0;
}



/*
run:


*/

 



answered Jan 28, 2025 by avibootz

Related questions

1 answer 163 views
163 views asked Jan 12, 2025 by avibootz
1 answer 188 views
1 answer 129 views
129 views asked Jan 16, 2025 by avibootz
1 answer 174 views
174 views asked Jan 12, 2025 by avibootz
1 answer 150 views
150 views asked Jan 12, 2025 by avibootz
...