3 * Copyright (c) 2017 Samsung Electronics Co., Ltd.
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
20 #include <dali-toolkit-test-suite-utils.h>
21 #include <toolkit-timer.h>
22 #include <toolkit-event-thread-callback.h>
23 #include <dali-toolkit/dali-toolkit.h>
24 #include <dali-toolkit/devel-api/visual-factory/visual-factory.h>
25 #include <dali-toolkit/devel-api/controls/control-devel.h>
26 #include "dummy-control.h"
29 using namespace Dali::Toolkit;
31 void dali_animated_image_visual_startup(void)
33 test_return_value = TET_UNDEF;
36 void dali_animated_image_visual_cleanup(void)
38 test_return_value = TET_PASS;
43 const char* TEST_IMAGE_FILE_NAME = TEST_RESOURCE_DIR "/application-icon-%02d.png";
44 const char* TEST_GIF_FILE_NAME = TEST_RESOURCE_DIR "/anim.gif";
48 void CopyUrlsIntoArray( Property::Array& urls, int startIndex=0 )
50 for( int i=20+startIndex;i<=30;++i)
53 if(asprintf(&url, TEST_IMAGE_FILE_NAME, i) > 0)
55 Property::Value value(url);
62 int UtcDaliAnimatedImageVisualGetPropertyMap01(void)
64 ToolkitTestApplication application;
65 tet_infoline( "UtcDaliAnimatedImageVisualGetPropertyMap" );
67 // request AnimatedImageVisual with a property map
68 VisualFactory factory = VisualFactory::Get();
69 Visual::Base animatedImageVisual = factory.CreateVisual(
71 .Add( Toolkit::Visual::Property::TYPE, Visual::ANIMATED_IMAGE )
72 .Add( ImageVisual::Property::URL, TEST_GIF_FILE_NAME )
73 .Add( ImageVisual::Property::PIXEL_AREA, Vector4() )
74 .Add( ImageVisual::Property::WRAP_MODE_U, WrapMode::REPEAT )
75 .Add( ImageVisual::Property::WRAP_MODE_V, WrapMode::DEFAULT ));
77 Property::Map resultMap;
78 animatedImageVisual.CreatePropertyMap( resultMap );
79 // check the property values from the returned map from a visual
80 Property::Value* value = resultMap.Find( Toolkit::Visual::Property::TYPE, Property::INTEGER );
81 DALI_TEST_CHECK( value );
82 DALI_TEST_CHECK( value->Get<int>() == Visual::ANIMATED_IMAGE );
84 value = resultMap.Find( ImageVisual::Property::URL, Property::STRING );
85 DALI_TEST_CHECK( value );
86 DALI_TEST_CHECK( value->Get<std::string>() == TEST_GIF_FILE_NAME );
88 // request AnimatedImageVisual with an URL
89 Visual::Base animatedImageVisual2 = factory.CreateVisual( TEST_GIF_FILE_NAME, ImageDimensions() );
91 animatedImageVisual2.CreatePropertyMap( resultMap );
92 // check the property values from the returned map from a visual
93 value = resultMap.Find( Toolkit::Visual::Property::TYPE, Property::INTEGER );
94 DALI_TEST_CHECK( value );
95 DALI_TEST_CHECK( value->Get<int>() == Visual::ANIMATED_IMAGE );
97 value = resultMap.Find( ImageVisual::Property::URL, Property::STRING );
98 DALI_TEST_CHECK( value );
99 DALI_TEST_CHECK( value->Get<std::string>() == TEST_GIF_FILE_NAME );
105 int UtcDaliAnimatedImageVisualGetPropertyMap02(void)
107 ToolkitTestApplication application;
108 tet_infoline( "UtcDaliAnimatedImageVisualGetPropertyMap for multi image" );
110 // request AnimatedImageVisual with a property map
111 VisualFactory factory = VisualFactory::Get();
112 Property::Array urls;
113 CopyUrlsIntoArray( urls );
115 Visual::Base animatedImageVisual = factory.CreateVisual(
117 .Add( Toolkit::Visual::Property::TYPE, Visual::ANIMATED_IMAGE )
119 .Add( "batchSize", 4 )
120 .Add( "cacheSize", 8 )
121 .Add( "frameDelay", 200 )
122 .Add( "pixelArea", Vector4() )
123 .Add( "wrapModeU", WrapMode::REPEAT )
124 .Add( "wrapModeV", WrapMode::DEFAULT ));
126 Property::Map resultMap;
127 animatedImageVisual.CreatePropertyMap( resultMap );
128 // check the property values from the returned map from a visual
129 Property::Value* value = resultMap.Find( Toolkit::Visual::Property::TYPE, Property::INTEGER );
130 DALI_TEST_CHECK( value );
131 DALI_TEST_CHECK( value->Get<int>() == Visual::ANIMATED_IMAGE );
133 value = resultMap.Find( ImageVisual::Property::URL, "url" );
134 DALI_TEST_CHECK( value );
135 Property::Array* resultUrls = value->GetArray();
136 DALI_TEST_CHECK( resultUrls );
137 DALI_TEST_EQUALS( resultUrls->Count(), urls.Count(), TEST_LOCATION );
139 value = resultMap.Find( ImageVisual::Property::BATCH_SIZE, "batchSize" );
140 DALI_TEST_CHECK( value );
141 DALI_TEST_EQUALS( value->Get<int>(), 4, TEST_LOCATION );
143 value = resultMap.Find( ImageVisual::Property::CACHE_SIZE, "cacheSize" );
144 DALI_TEST_CHECK( value );
145 DALI_TEST_EQUALS( value->Get<int>(), 8, TEST_LOCATION );
147 value = resultMap.Find( ImageVisual::Property::FRAME_DELAY, "frameDelay" );
148 DALI_TEST_CHECK( value );
149 DALI_TEST_EQUALS( value->Get<int>(), 200, TEST_LOCATION );
157 int UtcDaliAnimatedImageVisualMultiImage01(void)
159 ToolkitTestApplication application;
160 TestGlAbstraction& gl = application.GetGlAbstraction();
162 Property::Array urls;
163 CopyUrlsIntoArray( urls );
166 Property::Map propertyMap;
167 propertyMap.Insert(Visual::Property::TYPE, Visual::IMAGE );
168 propertyMap.Insert( ImageVisual::Property::URL, Property::Value(urls) );
169 propertyMap.Insert( ImageVisual::Property::BATCH_SIZE, 4);
170 propertyMap.Insert( ImageVisual::Property::CACHE_SIZE, 8);
171 propertyMap.Insert( ImageVisual::Property::FRAME_DELAY, 100);
173 VisualFactory factory = VisualFactory::Get();
174 Visual::Base visual = factory.CreateVisual( propertyMap );
176 // Expect that a batch of 4 textures has been requested. These will be serially loaded
179 DummyControl dummyControl = DummyControl::New(true);
180 Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(dummyControl.GetImplementation());
181 dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
183 dummyControl.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
184 Stage::GetCurrent().Add( dummyControl );
185 application.SendNotification();
186 application.Render(16);
188 tet_infoline( "Ready the visual after the visual is on stage" );
189 DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 4 ), true, TEST_LOCATION );
191 tet_infoline( "Test that a timer has been started" );
192 DALI_TEST_EQUALS( Test::GetTimerCount(), 1, TEST_LOCATION );
194 TraceCallStack& textureTrace = gl.GetTextureTrace();
195 textureTrace.Enable(true);
197 application.SendNotification();
198 application.Render(16);
200 DALI_TEST_EQUALS( gl.GetLastGenTextureId(), 4, TEST_LOCATION );
201 DALI_TEST_EQUALS( textureTrace.FindMethod("BindTexture"), true, TEST_LOCATION );
203 tet_infoline( "Test that after 1 tick, and file loads completed, that we have 7 textures" );
204 Test::EmitGlobalTimerSignal();
206 // Expect the second batch has been requested
207 DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 4 ), true, TEST_LOCATION );
209 application.SendNotification();
210 application.Render(16);
211 DALI_TEST_EQUALS( gl.GetNumGeneratedTextures(), 7, TEST_LOCATION );
214 tet_infoline( "Test that after 2 ticks that we have 6 textures" );
216 Test::EmitGlobalTimerSignal();
217 application.SendNotification();
218 application.Render(16);
219 DALI_TEST_EQUALS( gl.GetNumGeneratedTextures(), 6, TEST_LOCATION );
221 tet_infoline("And that at least 2 textures were requested");
222 DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 2 ), true, TEST_LOCATION );
223 application.SendNotification();
224 application.Render(16);
225 DALI_TEST_EQUALS( gl.GetNumGeneratedTextures(), 8, TEST_LOCATION );
228 tet_infoline( "Test that after 3rd tick that we have 7 textures and 1 request" );
229 Test::EmitGlobalTimerSignal();
230 application.SendNotification();
231 application.Render(16);
232 DALI_TEST_EQUALS( gl.GetNumGeneratedTextures(), 7, TEST_LOCATION );
234 DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
235 application.SendNotification();
236 application.Render(16);
237 DALI_TEST_EQUALS( gl.GetNumGeneratedTextures(), 8, TEST_LOCATION );
239 dummyControl.Unparent();
241 tet_infoline("Test that removing the visual from stage deletes all textures");
242 application.SendNotification();
243 application.Render(16);
244 DALI_TEST_EQUALS( gl.GetNumGeneratedTextures(), 0, TEST_LOCATION );
249 int UtcDaliAnimatedImageVisualMultiImage02(void)
251 ToolkitTestApplication application;
252 TestGlAbstraction& gl = application.GetGlAbstraction();
254 tet_infoline( "Test that the animated visual still works with zero sized cache" );
257 Property::Array urls;
258 CopyUrlsIntoArray( urls );
260 Property::Map propertyMap;
261 propertyMap.Insert(Visual::Property::TYPE, Visual::IMAGE );
262 propertyMap.Insert( ImageVisual::Property::URL, Property::Value(urls) );
263 propertyMap.Insert( ImageVisual::Property::BATCH_SIZE, 0);
264 propertyMap.Insert( ImageVisual::Property::CACHE_SIZE, 0);
265 propertyMap.Insert( ImageVisual::Property::FRAME_DELAY, 100);
267 VisualFactory factory = VisualFactory::Get();
268 Visual::Base visual = factory.CreateVisual( propertyMap ); // TexMgr::Request load tId:0
270 // Expect that each image is loaded each tick
272 DummyControl dummyControl = DummyControl::New(true);
273 Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(dummyControl.GetImplementation());
274 dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
276 dummyControl.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
277 Stage::GetCurrent().Add( dummyControl );
278 application.SendNotification();
279 application.Render(16);
281 tet_infoline( "Ready the visual after the visual is on stage" );
282 DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
283 application.SendNotification();
284 application.Render(16);//glGenTextures 1
285 DALI_TEST_EQUALS( gl.GetNumGeneratedTextures(), 1, TEST_LOCATION );
287 tet_infoline( "Test that each tick, a new image is requested" );
288 Test::EmitGlobalTimerSignal(); // TexMgr::Remove tId:0
289 application.SendNotification();
290 application.Render(16);
291 DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1, 10 ), true, TEST_LOCATION );
292 application.SendNotification();
293 application.Render(16);//glGenTextures 2
294 DALI_TEST_EQUALS( gl.GetNumGeneratedTextures(), 1, TEST_LOCATION );
296 tet_infoline( "Test that each tick, a new image is requested" );
297 Test::EmitGlobalTimerSignal(); // Internal::~TextureSet()
298 application.SendNotification();
299 application.Render(16);//glDeleteTextures 2
300 DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1, 10 ), true, TEST_LOCATION );
301 application.SendNotification();
302 application.Render(16);//glGenTextures 3
303 DALI_TEST_EQUALS( gl.GetNumGeneratedTextures(), 1, TEST_LOCATION );
305 tet_infoline( "Test that each tick, a new image is requested" );
306 Test::EmitGlobalTimerSignal();
307 application.SendNotification();
308 application.Render(16);//glDeleteTextures 3
309 DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1, 10 ), true, TEST_LOCATION );
310 application.SendNotification();
311 application.Render(16);//Gen4
312 DALI_TEST_EQUALS( gl.GetNumGeneratedTextures(), 1, TEST_LOCATION );
313 dummyControl.Unparent();
315 tet_infoline("Test that removing the visual from stage deletes all textures");
316 application.SendNotification();
317 application.Render(16);
318 DALI_TEST_EQUALS( gl.GetNumGeneratedTextures(), 0, TEST_LOCATION );
323 int UtcDaliAnimatedImageVisualMultiImage03(void)
325 ToolkitTestApplication application;
326 TestGlAbstraction& gl = application.GetGlAbstraction();
329 Property::Array urls1, urls2;
330 CopyUrlsIntoArray( urls1 );
331 CopyUrlsIntoArray( urls2 );
333 Property::Map animatedImageMap1;
334 animatedImageMap1.Insert(Visual::Property::TYPE, Visual::IMAGE );
335 animatedImageMap1.Insert( ImageVisual::Property::URL, Property::Value(urls1) );
336 animatedImageMap1.Insert( ImageVisual::Property::BATCH_SIZE, 3);
337 animatedImageMap1.Insert( ImageVisual::Property::CACHE_SIZE, 3);
338 animatedImageMap1.Insert( ImageVisual::Property::FRAME_DELAY, 100);
340 Property::Map animatedImageMap2;
341 animatedImageMap2.Insert(Visual::Property::TYPE, Visual::IMAGE );
342 animatedImageMap2.Insert( ImageVisual::Property::URL, Property::Value(urls2) );
343 animatedImageMap2.Insert( ImageVisual::Property::BATCH_SIZE, 2);
344 animatedImageMap2.Insert( ImageVisual::Property::CACHE_SIZE, 2);
345 animatedImageMap2.Insert( ImageVisual::Property::FRAME_DELAY, 100);
347 VisualFactory factory = VisualFactory::Get();
348 Visual::Base animatedImageVisual1 = factory.CreateVisual( animatedImageMap1 );
350 tet_infoline( "Create two image views with the same URLs, offset by 1 frame.");
352 DummyControl dummyControl1 = DummyControl::New(true);
353 Impl::DummyControl& dummyImpl1 = static_cast<Impl::DummyControl&>(dummyControl1.GetImplementation());
354 dummyImpl1.RegisterVisual( DummyControl::Property::TEST_VISUAL, animatedImageVisual1 );
355 dummyControl1.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
356 Stage::GetCurrent().Add( dummyControl1 );
358 application.SendNotification();
359 application.Render(16);
361 tet_infoline( "Ready the requested image after the first visual is on stage" );
362 DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 3 ), true, TEST_LOCATION );
363 application.SendNotification();
364 application.Render(16);
365 DALI_TEST_EQUALS( gl.GetNumGeneratedTextures(), 3, TEST_LOCATION );
367 Visual::Base animatedImageVisual2 = factory.CreateVisual( animatedImageMap2 );
368 DummyControl dummyControl2 = DummyControl::New(true);
369 Impl::DummyControl& dummyImpl2 = static_cast<Impl::DummyControl&>(dummyControl2.GetImplementation());
370 dummyImpl2.RegisterVisual( DummyControl::Property::TEST_VISUAL, animatedImageVisual2 );
371 dummyControl2.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
372 Stage::GetCurrent().Add( dummyControl2 );
373 application.SendNotification();
374 application.Render(16);
376 tet_infoline( "The texture cache should be holding the requested images; check that the renderer has a texture" );
377 TextureSet ts = dummyControl2.GetRendererAt(0).GetTextures();
378 Texture t1 = ts.GetTexture( 0 );
379 DALI_TEST_EQUALS( ts.GetTextureCount(), 1, TEST_LOCATION );
381 tet_infoline( "Test that on the first tick, 1 new image is requested" );
382 Test::EmitGlobalTimerSignal(); // Both visuals should tick
384 DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
385 DALI_TEST_EQUALS( gl.GetNumGeneratedTextures(), 3, TEST_LOCATION );
387 ts = dummyControl2.GetRendererAt(0).GetTextures();
388 Texture t2 = ts.GetTexture( 0 );
389 DALI_TEST_CHECK( t1 != t2 );
391 dummyControl1.Unparent();
392 dummyControl2.Unparent();
394 tet_infoline("Test that removing the visual from stage deletes all textures");
395 application.SendNotification();
396 application.Render(16);
397 DALI_TEST_EQUALS( gl.GetNumGeneratedTextures(), 0, TEST_LOCATION );
403 int UtcDaliAnimatedImageVisualMultiImage04(void)
405 ToolkitTestApplication application;
406 TestGlAbstraction& gl = application.GetGlAbstraction();
407 TraceCallStack& textureTrace = gl.GetTextureTrace();
408 textureTrace.Enable(true);
410 tet_infoline( "Test that if the cache size is the same as the number of urls, that once the cache is full, no new images are loaded" );
412 Property::Array urls;
413 CopyUrlsIntoArray( urls );
416 Property::Map propertyMap;
417 propertyMap.Insert(Visual::Property::TYPE, Visual::IMAGE );
418 propertyMap.Insert( ImageVisual::Property::URL, Property::Value(urls) );
419 propertyMap.Insert( ImageVisual::Property::BATCH_SIZE, 6);
420 propertyMap.Insert( ImageVisual::Property::CACHE_SIZE, 11);
421 propertyMap.Insert( ImageVisual::Property::FRAME_DELAY, 100);
423 VisualFactory factory = VisualFactory::Get();
424 Visual::Base visual = factory.CreateVisual( propertyMap );
426 tet_infoline( "Expect that a batch of 7 textures has been requested." );
428 DummyControl dummyControl = DummyControl::New(true);
429 Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(dummyControl.GetImplementation());
430 dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
432 dummyControl.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
433 Stage::GetCurrent().Add( dummyControl );
434 application.SendNotification();
435 application.Render(16);
437 tet_infoline( "Wait for the first batch to complete" );
438 DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 6 ), true, TEST_LOCATION );
440 tet_infoline( "Test that a timer has been started" );
441 DALI_TEST_EQUALS( Test::GetTimerCount(), 1, TEST_LOCATION );
443 application.SendNotification();
444 application.Render(16);
446 DALI_TEST_EQUALS( gl.GetLastGenTextureId(), 6, TEST_LOCATION );
447 tet_infoline( "Test that after 1 tick, and 5 file loads completed, that we have 11 textures" );
448 Test::EmitGlobalTimerSignal();
449 application.SendNotification();
450 application.Render(16);
452 // Expect the second batch has been requested
453 DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 5 ), true, TEST_LOCATION );
455 application.SendNotification();
456 application.Render(16);
457 DALI_TEST_EQUALS( gl.GetNumGeneratedTextures(), 11, TEST_LOCATION );
459 tet_infoline( "Test that after 2 ticks that we have 11 textures and no requests" );
461 Test::EmitGlobalTimerSignal();
462 application.SendNotification();
463 application.Render(16);
464 DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1, 5 ), false, TEST_LOCATION );
465 application.SendNotification();
466 application.Render(16);
467 DALI_TEST_EQUALS( gl.GetNumGeneratedTextures(), 11, TEST_LOCATION );
469 tet_infoline( "Test that after 3rd tick that we have 11 textures and no requests" );
470 Test::EmitGlobalTimerSignal();
471 application.SendNotification();
472 application.Render(16);
474 DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1, 5 ), false, TEST_LOCATION );
475 application.SendNotification();
476 application.Render(16);
477 DALI_TEST_EQUALS( gl.GetNumGeneratedTextures(), 11, TEST_LOCATION );
479 dummyControl.Unparent();
482 tet_infoline("Test that removing the visual from stage deletes all textures");
483 application.SendNotification();
484 application.Render(16);
485 DALI_TEST_EQUALS( gl.GetNumGeneratedTextures(), 0, TEST_LOCATION );
491 int UtcDaliAnimatedImageVisualMultiImage05(void)
493 ToolkitTestApplication application;
494 TestGlAbstraction& gl = application.GetGlAbstraction();
496 tet_infoline( "Test that if the cache size is the same as the number of urls, that removing a partially loaded visual removes all textures" );
498 Property::Array urls;
499 CopyUrlsIntoArray( urls );
502 Property::Map propertyMap;
503 propertyMap.Insert(Visual::Property::TYPE, Visual::IMAGE );
504 propertyMap.Insert( ImageVisual::Property::URL, Property::Value(urls) );
505 propertyMap.Insert( ImageVisual::Property::BATCH_SIZE, 4);
506 propertyMap.Insert( ImageVisual::Property::CACHE_SIZE, 11);
507 propertyMap.Insert( ImageVisual::Property::FRAME_DELAY, 100);
509 VisualFactory factory = VisualFactory::Get();
510 Visual::Base visual = factory.CreateVisual( propertyMap );
512 tet_infoline( "Expect that a batch of 4 textures has been requested." );
514 DummyControl dummyControl = DummyControl::New(true);
515 Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(dummyControl.GetImplementation());
516 dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
518 dummyControl.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
519 Stage::GetCurrent().Add( dummyControl );
520 application.SendNotification();
521 application.Render(16);
523 tet_infoline( "Wait for the first batch to complete" );
524 DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 4 ), true, TEST_LOCATION );
526 tet_infoline( "Test that a timer has been started" );
527 DALI_TEST_EQUALS( Test::GetTimerCount(), 1, TEST_LOCATION );
529 application.SendNotification();
530 application.Render(16);
532 tet_infoline( "Test that a timer has been started" );
533 Test::EmitGlobalTimerSignal();
534 application.SendNotification();
535 application.Render(16);
537 dummyControl.Unparent();
540 application.SendNotification();
541 application.Render(16);
542 DALI_TEST_EQUALS( gl.GetNumGeneratedTextures(), 0, TEST_LOCATION );
544 tet_infoline( "Test that pending batch of image loads are cancelled instead of uploaded");
545 DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 4 ), true, TEST_LOCATION );
546 application.SendNotification();
547 application.Render(16);
548 DALI_TEST_EQUALS( gl.GetNumGeneratedTextures(), 0, TEST_LOCATION );