LoginSignup
0
0

More than 5 years have passed since last update.

glColor4fで図形の色を変える

Last updated at Posted at 2015-04-03

塗りつぶす色の指定方法は、次の関数を利用します。

glColor4f(float r, float g, float b, float a)

例えば
glColor4f(1.0f, 0.0f, 1.0f, 1.0f);
のように書く。

色のメモ:
   (1.0, 0.0, 0.0) 赤

   (0.0, 1.0, 0.0) 緑

   (0.0, 0.0, 1.0) 青

   (0.0, 1.0, 1.0) シアン(CYAN),

   (1.0, 1.0, 0.0) イエロー(YELLOW),

  (1.0, 0.0, 1.0) マゼンタ(MAGENTA),

  (1.0, 1.0, 1.0) 白,

  (0.0, 0.0, 0.0) 黒

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0