Commit 20b3a7a628b704a4e5c41c2a1d1611eb795aa576

Authored by Kimmo Hoikka
Committed by Gerrit Code Review
2 parents c6636698 3c57c117

Merge "Added precision to shader variables." into tizen

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