ARTICLE DETAIL

资讯详情

深耕网站建设、视觉设计与SEO优化的一线实战洞察。

Raylib贴图

Raylib贴图

贴图

主要函数:

RLAPI Texture2D LoadTexture(const char *fileName);
RLAPI Image LoadImage(const char *fileName);
RLAPI Textrue2D LoadTextureFromImage(Image image);
RLAPI void DrawTexure(Texture2D texture,int posX,int posY,Color tint);

简单贴图小代码

#include <stdio.h>
#include <raylib.h>
#include <time.h>
#include <stdlib.h>
void test_database()
{Vector2 p;p.x = 11;p.y = 2;Vector3 o;o.x = 10;o.y = 11;o.z = 10;
}
int main()
{InitWindow(200, 200, "Alaso_shuang");Texture t = LoadTexture("C:/Users/Alaso/Desktop/little.png");while (!WindowShouldClose()){BeginDrawing();Vector2 v = { 10,10 };DrawTexture(t, 0, 0, WHITE);EndDrawing();}UnloadTexture(t);CloseWindow();return 0;
}
返回列表