Dali 3D User Interface Engine
Classes | Namespaces | Macros
Dali_core_shader_effects
Collaboration diagram for Dali_core_shader_effects:

Classes

class  Dali::ShaderEffect
 .47 More...
 

Namespaces

namespace  Dali::DALI_INTERNAL
 

Macros

#define DALI_COMPOSE_SHADER(STR)   #STR
 .47 More...
 

Detailed Description

Macro Definition Documentation

#define DALI_COMPOSE_SHADER (   STR)    #STR

.47

DALI_COMPOSE_SHADER macro provides a convenient way to write shader source code.

We normally use double quotation marks to write a string such as "Hello World". However many symbols are needed to add multiple lines of string. We don't need to write quotation marks using this macro at every line.

[An example of double quotation marks usage] const string FRAGMENT_SHADER_SOURCE = \ " void main()\n" " {\n" " gl_FragColor = texture2D( sTexture, vTexCoord ) * uColor;\n" " }\n";

[An example of DALI_COMPOSE_SHADER usage] const string VERTEX_SHADER_SOURCE = DALI_COMPOSE_SHADER ( void main() { gl_Position = uMvpMatrix * vec4(aPosition, 1.0); vTexCoord = mix( sTextureRect.xy, sTextureRect.zw, aTexCoord) ); } ); .0

Definition at line 57 of file shader-effect.h.

Dali Docs Home
Read more about Dali