跳轉到內容

GLBasic 程式設計/BASIC/影像匯入

來自華夏公益教科書,開放世界開放書籍

要匯入圖片,將圖片放到程式資料夾中,然後直接複製並貼上到視窗中

CLEARSCREEN RGB(255, 0, 0) //The color of the background will be red
LOADSPRITE "../GLBasic_Logo.png", 0 //First the name of the file, then the ID
PRINT "Look at this:", 100, 100 //Print some text on x100, y100
DRAWSPRITE 0, 100, 200 //Draw the sprite with ID 0 on x100, y200
SHOWSCREEN //Show the screen
KEYWAIT //Wait for a key to be pressed
END //End the program

它提供了

上一個:BASIC/子例程和函式 索引 下一個:OpenGL/第一個程式
華夏公益教科書