Merge "Enable atspi" into devel/master
[platform/core/uifw/dali-adaptor.git] / automated-tests / src / dali-graphics / utc-Dali-GraphicsGeometry.cpp
1 #include <dali-test-suite-utils.h>
2
3 #include <dali/graphics-api/graphics-controller.h>
4 #include <dali/internal/graphics/gles/egl-graphics-controller.h>
5 #include <test-graphics-application.h>
6 //#include <dali/graphics-api/graphics-api-buffer.h>
7
8 int UtcDaliGraphicsCreateGeometry(void)
9 {
10   // Initialize actual egl graphics controller (without initializing egl!)
11   TestGraphicsApplication app;
12
13   struct Vertex
14   {
15     float x;
16     float y;
17   };
18
19   std::vector<Vertex> someData(100);
20   //Graphics::Controller& graphicsController = app.GetGraphicsController();
21
22   //Graphics::BufferCreateInfo createInfo;
23   //createInfo
24   //    .SetBufferUsageFlags(BufferUsage::VERTEX_BUFFER)
25   //    .SetSize(someData.size();
26
27   //auto buffer = graphicsController->CreateBuffer(createInfo);
28   //std::unique_ptr<Graphics::Memory> memory = graphicsController.MapBufferRange(buffer, 0, someData.size());
29   //uint32_t* memory = memory->Lock();
30   //std::memcpy(memory, &someData[0], someData.size()*sizeof(Vertex));
31   //memory->Unlock();
32
33   //graphicsController.SubmitCommands(emptyCommand);
34
35   // Test that data has been uploaded to GL, e.g. test that GPU buffer has been created
36   //auto& gl              = app.GetGlAbstraction();
37   //auto& bufferDataCalls = gl.GetBufferDataCalls();
38   //DALI_TEST_EQUALS(bufferDataCalls.size(), 1u, TEST_LOCATION);
39   //DALI_TEST_EQUALS(bufferDataCalls[0], someData.size(), TEST_LOCATION);
40   DALI_TEST_CHECK(1);
41   END_TEST;
42 }