background_get_texture()


シェーダー

Game Maker Language リファレンス > 組み込み関数 用途別 > 2D グラフィック機能 > テクスチャ・ブレンド機能 > background_get_texture

background_get_texture

指定の背景リソースをテクスチャとして返します

構文

background_get_texture(back);
back
背景のリソース番号

戻り値

Real
テクスチャ番号

説明

この関数は背景のテクスチャのための特別なIDを返します。この値は2Dや3Dの一般的な関数と同様に、シェーダー機能のいくつかで使用することができます

var tex;
tex = background_get_texture(back);
draw_primitive_begin_texture(pr_trianglefan, tex);
draw_vertex_texture(0, 480, 0, 0);
draw_vertex_texture(640, 480, 1, 0);
draw_vertex_texture(640, 480, 1, 1);
draw_vertex_texture(0, 480, 0, 1);
draw_primitive_end();

上記コードはテクスチャを変数"tex"に格納し、4頂点のtrianglefanで描画したポリゴンに貼り付けます

Wiki内検索

#search(): You already view a search box

MENU

ドキュメント

GMLリファレンス

2ch

その他



最新の30件

2024-03-07 2023-08-09 2023-05-21 2023-05-20 2023-05-04 2022-10-13 2022-07-21 2022-07-02 2022-04-06 2021-11-30 2021-11-26 2021-10-03 2021-09-23 2021-08-15 2021-06-02 2021-01-23 2021-01-21 2021-01-19 2021-01-18 2021-01-16 2021-01-15

人気の10件

今日の10件



これまでの訪問者: 1262
今日の訪問者: 1
昨日の訪問者: 0
閲覧者: 2