「利用者:Jwilkins/VFX/Aspects/Basic」の版間の差分

提供: wiki
移動先: 案内検索
(Created page with "= The Basic Aspect = Header File: <tt>GPU_basic.h</tt> == Switching == Switch to the ''Basic'' drawing aspect by calling <tt>GPU_aspect_begin(GPU_ASPECT_BASIC, NULL)</tt>. Th...")
 
(1版 をインポートしました)
 
(相違点なし)

2018年6月29日 (金) 06:04時点における最新版

The Basic Aspect

Header File: GPU_basic.h

Switching

Switch to the Basic drawing aspect by calling GPU_aspect_begin(GPU_ASPECT_BASIC, NULL).

The Basic aspect is begun by GPU_init and all code that changes the current aspect will change the aspect back to Basic before exiting. This allows drawing code to assume the Basic aspect and only change to other aspects when needed.

Feature Flags

typedef enum GPUBasicOption {
	GPU_BASIC_LIGHTING     = (1<<0), /* do lighting computations                */
	GPU_BASIC_TWO_SIDE     = (1<<1), /* flip back-facing normals towards viewer */
	GPU_BASIC_TEXTURE_2D   = (1<<2), /* use 2D texture to replace diffuse color */
	GPU_BASIC_LOCAL_VIEWER = (1<<3), /* use for orthographic projection         */
	GPU_BASIC_SMOOTH       = (1<<4), /* use smooth shading                      */
	GPU_BASIC_ALPHATEST    = (1<<5), /* use alpha test                          */
} GPUBasicOption;

These options are passed into GPU_aspect_enable(GPU_ASPECT_BASIC, ...) and GPU_aspect_disable(GPU_ASPECT_BASIC, ...)

Normals

bool GPU_basic_needs_normals(void);

This function is used to determine if normals should be sent to the OpenGL for lighting.