Commit 3c57c11765182a683f272a0c6179d30fc6d2f66d

Authored by David Steele
1 parent a64aa950

Added precision to shader variables.

Change-Id: I6a60c432fac7a1da6c2f478c81bec18efdf29c94
Signed-off-by: David Steele <david.steele@partner.samsung.com>
examples/new-window/new-window-example.cpp
@@ -24,7 +24,7 @@ class NewWindowController; @@ -24,7 +24,7 @@ class NewWindowController;
24 24
25 namespace 25 namespace
26 { 26 {
27 -const char * gModelFile = DALI_MODEL_DIR "AlbumCute.dae"; 27 +const char * gModelFile = DALI_MODEL_DIR "AlbumCute.dali-bin";
28 const char * const BACKGROUND_IMAGE( DALI_IMAGE_DIR "background-2.jpg" ); 28 const char * const BACKGROUND_IMAGE( DALI_IMAGE_DIR "background-2.jpg" );
29 const char * const TOOLBAR_IMAGE( DALI_IMAGE_DIR "top-bar.png" ); 29 const char * const TOOLBAR_IMAGE( DALI_IMAGE_DIR "top-bar.png" );
30 const char * const LOSE_CONTEXT_IMAGE( DALI_IMAGE_DIR "icon-cluster-wobble.png" ); 30 const char * const LOSE_CONTEXT_IMAGE( DALI_IMAGE_DIR "icon-cluster-wobble.png" );
@@ -39,12 +39,12 @@ Application gApplication; @@ -39,12 +39,12 @@ Application gApplication;
39 NewWindowController* gNewWindowController(NULL); 39 NewWindowController* gNewWindowController(NULL);
40 40
41 const char*const FRAG_SHADER= 41 const char*const FRAG_SHADER=
42 - "uniform float alpha;\n" 42 + "uniform mediump float alpha;\n"
43 "\n" 43 "\n"
44 "void main()\n" 44 "void main()\n"
45 "{\n" 45 "{\n"
46 - " vec4 fragColor = texture2D(sTexture, vTexCoord);\n"  
47 - " vec4 fxColor = texture2D(sEffect, vTexCoord);\n" 46 + " mediump vec4 fragColor = texture2D(sTexture, vTexCoord);\n"
  47 + " mediump vec4 fxColor = texture2D(sEffect, vTexCoord);\n"
48 " gl_FragColor = mix(fragColor,fxColor, alpha);\n" 48 " gl_FragColor = mix(fragColor,fxColor, alpha);\n"
49 "}\n"; 49 "}\n";
50 50
@@ -449,7 +449,7 @@ void NewWindowController::OnModelLoaded( Model model ) @@ -449,7 +449,7 @@ void NewWindowController::OnModelLoaded( Model model )
449 { 449 {
450 if( model.GetLoadingState() == ResourceLoadingSucceeded ) 450 if( model.GetLoadingState() == ResourceLoadingSucceeded )
451 { 451 {
452 - std::cout << "Succeeded loading collada model" << std::endl; 452 + std::cout << "Succeeded loading model" << std::endl;
453 mModelActor = ModelActorFactory::BuildActorTree(mModel, ""); // Gets root actor 453 mModelActor = ModelActorFactory::BuildActorTree(mModel, ""); // Gets root actor
454 mModelActor.SetSize(250.0f, 250.0f); 454 mModelActor.SetSize(250.0f, 250.0f);
455 mModelActor.SetPosition(0.0f, 200.0f, 70.0f); 455 mModelActor.SetPosition(0.0f, 200.0f, 70.0f);
@@ -468,7 +468,7 @@ void NewWindowController::OnModelLoaded( Model model ) @@ -468,7 +468,7 @@ void NewWindowController::OnModelLoaded( Model model )
468 } 468 }
469 else 469 else
470 { 470 {
471 - std::cout << "Failed loading collada model" << std::endl; 471 + std::cout << "Failed loading model" << std::endl;
472 mApplication.Quit(); 472 mApplication.Quit();
473 } 473 }
474 } 474 }