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

Create your online store today with Shopify

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

Disclosure: My content contains affiliate links.

43,121 questions

55,995 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 185 views
185 views asked Jan 12, 2025 by avibootz
1 answer 206 views
1 answer 153 views
153 views asked Jan 16, 2025 by avibootz
1 answer 198 views
198 views asked Jan 12, 2025 by avibootz
1 answer 179 views
179 views asked Jan 12, 2025 by avibootz
...