aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--samples/mip_map_2d/MipMap2D.cpp2
-rw-r--r--samples/multi_texture/MultiTexture.cpp2
-rw-r--r--samples/multi_window/MultiWindow.cpp2
-rw-r--r--samples/multiple_draw_buffers/MultipleDrawBuffers.cpp3
-rw-r--r--samples/particle_system/ParticleSystem.cpp2
-rw-r--r--samples/post_sub_buffer/PostSubBuffer.cpp4
-rw-r--r--samples/samples.gyp358
-rw-r--r--samples/simple_instancing/SimpleInstancing.cpp3
-rw-r--r--samples/simple_texture_2d/SimpleTexture2D.cpp2
-rw-r--r--samples/simple_texture_cubemap/SimpleTextureCubemap.cpp2
-rw-r--r--samples/simple_vertex_shader/SimpleVertexShader.cpp4
-rw-r--r--samples/stencil_operations/StencilOperations.cpp2
-rw-r--r--samples/tex_redef_microbench/TexRedefMicroBench.cpp7
-rw-r--r--samples/texture_wrap/TextureWrap.cpp2
-rw-r--r--samples/tri_fan_microbench/TriFanMicroBench.cpp7
15 files changed, 199 insertions, 203 deletions
diff --git a/samples/mip_map_2d/MipMap2D.cpp b/samples/mip_map_2d/MipMap2D.cpp
index 478d9da184..8703ca3684 100644
--- a/samples/mip_map_2d/MipMap2D.cpp
+++ b/samples/mip_map_2d/MipMap2D.cpp
@@ -20,7 +20,7 @@
class MipMap2DSample : public SampleApplication
{
public:
- MipMap2DSample::MipMap2DSample()
+ MipMap2DSample()
: SampleApplication("MipMap2D", 1280, 720)
{
}
diff --git a/samples/multi_texture/MultiTexture.cpp b/samples/multi_texture/MultiTexture.cpp
index 8052a85903..97c4d436be 100644
--- a/samples/multi_texture/MultiTexture.cpp
+++ b/samples/multi_texture/MultiTexture.cpp
@@ -21,7 +21,7 @@
class MultiTextureSample : public SampleApplication
{
public:
- MultiTextureSample::MultiTextureSample()
+ MultiTextureSample()
: SampleApplication("MultiTexture", 1280, 720)
{
}
diff --git a/samples/multi_window/MultiWindow.cpp b/samples/multi_window/MultiWindow.cpp
index 7bf7b6f2b6..352bf31a40 100644
--- a/samples/multi_window/MultiWindow.cpp
+++ b/samples/multi_window/MultiWindow.cpp
@@ -15,7 +15,7 @@
class MultiWindowSample : public SampleApplication
{
public:
- MultiWindowSample::MultiWindowSample()
+ MultiWindowSample()
: SampleApplication("MultiWindow", 256, 256)
{
}
diff --git a/samples/multiple_draw_buffers/MultipleDrawBuffers.cpp b/samples/multiple_draw_buffers/MultipleDrawBuffers.cpp
index 3826eaa9b3..3735de8d7a 100644
--- a/samples/multiple_draw_buffers/MultipleDrawBuffers.cpp
+++ b/samples/multiple_draw_buffers/MultipleDrawBuffers.cpp
@@ -18,12 +18,13 @@
#include "path_utils.h"
#include "texture_utils.h"
+#include <cstring>
#include <iostream>
class MultipleDrawBuffersSample : public SampleApplication
{
public:
- MultipleDrawBuffersSample::MultipleDrawBuffersSample()
+ MultipleDrawBuffersSample()
: SampleApplication("MultipleDrawBuffers", 1280, 720)
{
}
diff --git a/samples/particle_system/ParticleSystem.cpp b/samples/particle_system/ParticleSystem.cpp
index 5c0ae7c76a..1c0159e323 100644
--- a/samples/particle_system/ParticleSystem.cpp
+++ b/samples/particle_system/ParticleSystem.cpp
@@ -26,7 +26,7 @@
class ParticleSystemSample : public SampleApplication
{
public:
- ParticleSystemSample::ParticleSystemSample()
+ ParticleSystemSample()
: SampleApplication("ParticleSystem", 1280, 720)
{
}
diff --git a/samples/post_sub_buffer/PostSubBuffer.cpp b/samples/post_sub_buffer/PostSubBuffer.cpp
index e5cd10f7d4..8080392079 100644
--- a/samples/post_sub_buffer/PostSubBuffer.cpp
+++ b/samples/post_sub_buffer/PostSubBuffer.cpp
@@ -19,12 +19,14 @@
#include "geometry_utils.h"
#include "Vector.h"
#include "Matrix.h"
+
+#include <cmath>
#include <iostream>
class PostSubBufferSample : public SampleApplication
{
public:
- PostSubBufferSample::PostSubBufferSample()
+ PostSubBufferSample()
: SampleApplication("PostSubBuffer", 1280, 720)
{
}
diff --git a/samples/samples.gyp b/samples/samples.gyp
index 614ca58287..059cc117c8 100644
--- a/samples/samples.gyp
+++ b/samples/samples.gyp
@@ -13,212 +13,200 @@
'include_dirs': [ '../include', ],
'sources': [ 'shader_translator/shader_translator.cpp' ],
},
- ],
- 'conditions':
- [
- ['OS=="win"',
{
- 'targets':
+ 'target_name': 'sample_util',
+ 'type': 'static_library',
+ 'includes': [ '../build/common_defines.gypi', ],
+ 'dependencies':
+ [
+ '<(angle_path)/src/angle.gyp:libEGL',
+ '<(angle_path)/src/angle.gyp:libGLESv2',
+ '<(angle_path)/util/util.gyp:angle_util',
+ ],
+ 'export_dependent_settings':
+ [
+ '<(angle_path)/util/util.gyp:angle_util',
+ ],
+ 'include_dirs':
[
+ '<(angle_path)/include',
+ 'sample_util',
+ ],
+ 'sources':
+ [
+ 'sample_util/Matrix.cpp',
+ 'sample_util/Matrix.h',
+ 'sample_util/SampleApplication.cpp',
+ 'sample_util/SampleApplication.h',
+ 'sample_util/Vector.cpp',
+ 'sample_util/Vector.h',
+ 'sample_util/geometry_utils.cpp',
+ 'sample_util/geometry_utils.h',
+ 'sample_util/texture_utils.cpp',
+ 'sample_util/texture_utils.h',
+ 'sample_util/tga_utils.cpp',
+ 'sample_util/tga_utils.h',
+ ],
+ 'conditions':
+ [
+ ['OS=="linux"',
{
- 'target_name': 'sample_util',
- 'type': 'static_library',
- 'includes': [ '../build/common_defines.gypi', ],
- 'dependencies':
- [
- '<(angle_path)/src/angle.gyp:libEGL',
- '<(angle_path)/src/angle.gyp:libGLESv2',
- '<(angle_path)/util/util.gyp:angle_util',
- ],
- 'export_dependent_settings':
- [
- '<(angle_path)/util/util.gyp:angle_util',
- ],
- 'include_dirs':
+ 'ldflags':
[
- '<(angle_path)/include',
- 'sample_util',
+ '-lX11'
],
- 'sources':
- [
- 'sample_util/Matrix.cpp',
- 'sample_util/Matrix.h',
- 'sample_util/SampleApplication.cpp',
- 'sample_util/SampleApplication.h',
- 'sample_util/Vector.cpp',
- 'sample_util/Vector.h',
- 'sample_util/geometry_utils.cpp',
- 'sample_util/geometry_utils.h',
- 'sample_util/texture_utils.cpp',
- 'sample_util/texture_utils.h',
- 'sample_util/tga_utils.cpp',
- 'sample_util/tga_utils.h',
- ],
- 'msvs_disabled_warnings': [ 4201 ],
- 'direct_dependent_settings':
- {
- 'msvs_disabled_warnings': [ 4201 ],
- 'include_dirs':
- [
- 'sample_util',
- ],
- },
- },
-
- {
- 'target_name': 'hello_triangle',
- 'type': 'executable',
- 'dependencies': [ 'sample_util' ],
- 'includes': [ '../build/common_defines.gypi', ],
- 'sources': [ 'hello_triangle/HelloTriangle.cpp', ],
- },
-
- {
- 'target_name': 'mip_map_2d',
- 'type': 'executable',
- 'dependencies': [ 'sample_util' ],
- 'includes': [ '../build/common_defines.gypi', ],
- 'sources': [ 'mip_map_2d/MipMap2D.cpp', ],
- },
-
+ }],
+ ],
+ 'msvs_disabled_warnings': [ 4201 ],
+ 'direct_dependent_settings':
+ {
+ 'msvs_disabled_warnings': [ 4201 ],
+ 'include_dirs':
+ [
+ 'sample_util',
+ ],
+ },
+ },
+ {
+ 'target_name': 'hello_triangle',
+ 'type': 'executable',
+ 'dependencies': [ 'sample_util' ],
+ 'includes': [ '../build/common_defines.gypi', ],
+ 'sources': [ 'hello_triangle/HelloTriangle.cpp', ],
+ },
+ {
+ 'target_name': 'mip_map_2d',
+ 'type': 'executable',
+ 'dependencies': [ 'sample_util' ],
+ 'includes': [ '../build/common_defines.gypi', ],
+ 'sources': [ 'mip_map_2d/MipMap2D.cpp', ],
+ },
+ {
+ 'target_name': 'multi_texture',
+ 'type': 'executable',
+ 'dependencies': [ 'sample_util' ],
+ 'includes': [ '../build/common_defines.gypi', ],
+ 'sources': [ 'multi_texture/MultiTexture.cpp', ],
+ 'copies':
+ [
{
- 'target_name': 'multi_texture',
- 'type': 'executable',
- 'dependencies': [ 'sample_util' ],
- 'includes': [ '../build/common_defines.gypi', ],
- 'sources': [ 'multi_texture/MultiTexture.cpp', ],
- 'copies':
+ 'destination': '<(PRODUCT_DIR)',
+ 'files':
[
- {
- 'destination': '<(PRODUCT_DIR)',
- 'files':
- [
- 'multi_texture/basemap.tga',
- 'multi_texture/lightmap.tga',
- ],
- },
- ]
+ 'multi_texture/basemap.tga',
+ 'multi_texture/lightmap.tga',
+ ],
},
+ ]
+ },
- {
- 'target_name': 'multi_window',
- 'type': 'executable',
- 'dependencies': [ 'sample_util' ],
- 'includes': [ '../build/common_defines.gypi', ],
- 'sources': [ 'multi_window/MultiWindow.cpp', ],
- },
+ {
+ 'target_name': 'multi_window',
+ 'type': 'executable',
+ 'dependencies': [ 'sample_util' ],
+ 'includes': [ '../build/common_defines.gypi', ],
+ 'sources': [ 'multi_window/MultiWindow.cpp', ],
+ },
+ {
+ 'target_name': 'multiple_draw_buffers',
+ 'type': 'executable',
+ 'dependencies': [ 'sample_util' ],
+ 'includes': [ '../build/common_defines.gypi', ],
+ 'sources': [ 'multiple_draw_buffers/MultipleDrawBuffers.cpp', ],
+ 'copies':
+ [
{
- 'target_name': 'multiple_draw_buffers',
- 'type': 'executable',
- 'dependencies': [ 'sample_util' ],
- 'includes': [ '../build/common_defines.gypi', ],
- 'sources': [ 'multiple_draw_buffers/MultipleDrawBuffers.cpp', ],
- 'copies':
+ 'destination': '<(PRODUCT_DIR)',
+ 'files':
[
- {
- 'destination': '<(PRODUCT_DIR)',
- 'files':
- [
- 'multiple_draw_buffers/multiple_draw_buffers_copy_fs.glsl',
- 'multiple_draw_buffers/multiple_draw_buffers_fs.glsl',
- 'multiple_draw_buffers/multiple_draw_buffers_vs.glsl',
- ],
- }
- ]
- },
+ 'multiple_draw_buffers/multiple_draw_buffers_copy_fs.glsl',
+ 'multiple_draw_buffers/multiple_draw_buffers_fs.glsl',
+ 'multiple_draw_buffers/multiple_draw_buffers_vs.glsl',
+ ],
+ }
+ ]
+ },
+ {
+ 'target_name': 'particle_system',
+ 'type': 'executable',
+ 'dependencies': [ 'sample_util' ],
+ 'includes': [ '../build/common_defines.gypi', ],
+ 'sources': [ 'particle_system/ParticleSystem.cpp', ],
+ 'copies':
+ [
{
- 'target_name': 'particle_system',
- 'type': 'executable',
- 'dependencies': [ 'sample_util' ],
- 'includes': [ '../build/common_defines.gypi', ],
- 'sources': [ 'particle_system/ParticleSystem.cpp', ],
- 'copies':
+ 'destination': '<(PRODUCT_DIR)',
+ 'files':
[
- {
- 'destination': '<(PRODUCT_DIR)',
- 'files':
- [
- 'particle_system/smoke.tga',
- ],
- }
- ]
- },
-
- {
- 'target_name': 'post_sub_buffer',
- 'type': 'executable',
- 'dependencies': [ 'sample_util' ],
- 'includes': [ '../build/common_defines.gypi', ],
- 'sources': [ 'post_sub_buffer/PostSubBuffer.cpp', ],
- },
-
- {
- 'target_name': 'simple_instancing',
- 'type': 'executable',
- 'dependencies': [ 'sample_util' ],
- 'includes': [ '../build/common_defines.gypi', ],
- 'sources': [ 'simple_instancing/SimpleInstancing.cpp', ],
- },
+ 'particle_system/smoke.tga',
+ ],
+ }
+ ]
+ },
+ {
+ 'target_name': 'post_sub_buffer',
+ 'type': 'executable',
+ 'dependencies': [ 'sample_util' ],
+ 'includes': [ '../build/common_defines.gypi', ],
+ 'sources': [ 'post_sub_buffer/PostSubBuffer.cpp', ],
+ },
- {
- 'target_name': 'simple_texture_2d',
- 'type': 'executable',
- 'dependencies': [ 'sample_util' ],
- 'includes': [ '../build/common_defines.gypi', ],
- 'sources': [ 'simple_texture_2d/SimpleTexture2D.cpp', ],
- },
+ {
+ 'target_name': 'simple_instancing',
+ 'type': 'executable',
+ 'dependencies': [ 'sample_util' ],
+ 'includes': [ '../build/common_defines.gypi', ],
+ 'sources': [ 'simple_instancing/SimpleInstancing.cpp', ],
+ },
- {
- 'target_name': 'simple_texture_cubemap',
- 'type': 'executable',
- 'dependencies': [ 'sample_util' ],
- 'includes': [ '../build/common_defines.gypi', ],
- 'sources': [ 'simple_texture_cubemap/SimpleTextureCubemap.cpp', ],
- },
+ {
+ 'target_name': 'simple_texture_2d',
+ 'type': 'executable',
+ 'dependencies': [ 'sample_util' ],
+ 'includes': [ '../build/common_defines.gypi', ],
+ 'sources': [ 'simple_texture_2d/SimpleTexture2D.cpp', ],
+ },
- {
- 'target_name': 'simple_vertex_shader',
- 'type': 'executable',
- 'dependencies': [ 'sample_util' ],
- 'includes': [ '../build/common_defines.gypi', ],
- 'sources': [ 'simple_vertex_shader/SimpleVertexShader.cpp', ],
- },
+ {
+ 'target_name': 'simple_texture_cubemap',
+ 'type': 'executable',
+ 'dependencies': [ 'sample_util' ],
+ 'includes': [ '../build/common_defines.gypi', ],
+ 'sources': [ 'simple_texture_cubemap/SimpleTextureCubemap.cpp', ],
+ },
- {
- 'target_name': 'stencil_operations',
- 'type': 'executable',
- 'dependencies': [ 'sample_util' ],
- 'includes': [ '../build/common_defines.gypi', ],
- 'sources': [ 'stencil_operations/StencilOperations.cpp', ],
- },
+ {
+ 'target_name': 'stencil_operations',
+ 'type': 'executable',
+ 'dependencies': [ 'sample_util' ],
+ 'includes': [ '../build/common_defines.gypi', ],
+ 'sources': [ 'stencil_operations/StencilOperations.cpp', ],
+ },
- {
- 'target_name': 'tex_redef_microbench',
- 'type': 'executable',
- 'dependencies': [ 'sample_util' ],
- 'includes': [ '../build/common_defines.gypi', ],
- 'sources': [ 'tex_redef_microbench/TexRedefMicroBench.cpp', ],
- },
+ {
+ 'target_name': 'tex_redef_microbench',
+ 'type': 'executable',
+ 'dependencies': [ 'sample_util' ],
+ 'includes': [ '../build/common_defines.gypi', ],
+ 'sources': [ 'tex_redef_microbench/TexRedefMicroBench.cpp', ],
+ },
- {
- 'target_name': 'texture_wrap',
- 'type': 'executable',
- 'dependencies': [ 'sample_util' ],
- 'includes': [ '../build/common_defines.gypi', ],
- 'sources': [ 'texture_wrap/TextureWrap.cpp', ],
- },
+ {
+ 'target_name': 'texture_wrap',
+ 'type': 'executable',
+ 'dependencies': [ 'sample_util' ],
+ 'includes': [ '../build/common_defines.gypi', ],
+ 'sources': [ 'texture_wrap/TextureWrap.cpp', ],
+ },
- {
- 'target_name': 'tri_fan_microbench',
- 'type': 'executable',
- 'dependencies': [ 'sample_util' ],
- 'includes': [ '../build/common_defines.gypi', ],
- 'sources': [ 'tri_fan_microbench/TriFanMicroBench.cpp', ],
- },
- ],
- }
- ],
+ {
+ 'target_name': 'tri_fan_microbench',
+ 'type': 'executable',
+ 'dependencies': [ 'sample_util' ],
+ 'includes': [ '../build/common_defines.gypi', ],
+ 'sources': [ 'tri_fan_microbench/TriFanMicroBench.cpp', ],
+ },
],
}
diff --git a/samples/simple_instancing/SimpleInstancing.cpp b/samples/simple_instancing/SimpleInstancing.cpp
index bdefef252d..a1b70513f1 100644
--- a/samples/simple_instancing/SimpleInstancing.cpp
+++ b/samples/simple_instancing/SimpleInstancing.cpp
@@ -18,13 +18,14 @@
#include "shader_utils.h"
#include "texture_utils.h"
+#include <cstring>
#include <iostream>
#include <vector>
class SimpleInstancingSample : public SampleApplication
{
public:
- SimpleInstancingSample::SimpleInstancingSample()
+ SimpleInstancingSample()
: SampleApplication("SimpleInstancing", 1280, 720)
{
}
diff --git a/samples/simple_texture_2d/SimpleTexture2D.cpp b/samples/simple_texture_2d/SimpleTexture2D.cpp
index 33b00062af..4d38fe6461 100644
--- a/samples/simple_texture_2d/SimpleTexture2D.cpp
+++ b/samples/simple_texture_2d/SimpleTexture2D.cpp
@@ -20,7 +20,7 @@
class SimpleTexture2DSample : public SampleApplication
{
public:
- SimpleTexture2DSample::SimpleTexture2DSample()
+ SimpleTexture2DSample()
: SampleApplication("SimpleTexture2D", 1280, 720)
{
}
diff --git a/samples/simple_texture_cubemap/SimpleTextureCubemap.cpp b/samples/simple_texture_cubemap/SimpleTextureCubemap.cpp
index 5094bbb80f..aa6e9e05e2 100644
--- a/samples/simple_texture_cubemap/SimpleTextureCubemap.cpp
+++ b/samples/simple_texture_cubemap/SimpleTextureCubemap.cpp
@@ -22,7 +22,7 @@
class SimpleTextureCubemapSample : public SampleApplication
{
public:
- SimpleTextureCubemapSample::SimpleTextureCubemapSample()
+ SimpleTextureCubemapSample()
: SampleApplication("SimpleTextureCubemap", 1280, 720)
{
}
diff --git a/samples/simple_vertex_shader/SimpleVertexShader.cpp b/samples/simple_vertex_shader/SimpleVertexShader.cpp
index 3962a66ce0..284b8fb2c1 100644
--- a/samples/simple_vertex_shader/SimpleVertexShader.cpp
+++ b/samples/simple_vertex_shader/SimpleVertexShader.cpp
@@ -20,10 +20,12 @@
#include "Vector.h"
#include "Matrix.h"
+#include <cmath>
+
class SimpleVertexShaderSample : public SampleApplication
{
public:
- SimpleVertexShaderSample::SimpleVertexShaderSample()
+ SimpleVertexShaderSample()
: SampleApplication("SimpleVertexShader", 1280, 720)
{
}
diff --git a/samples/stencil_operations/StencilOperations.cpp b/samples/stencil_operations/StencilOperations.cpp
index aa2f56fca4..9c6239f9e6 100644
--- a/samples/stencil_operations/StencilOperations.cpp
+++ b/samples/stencil_operations/StencilOperations.cpp
@@ -19,7 +19,7 @@
class StencilOperationsSample : public SampleApplication
{
public:
- StencilOperationsSample::StencilOperationsSample()
+ StencilOperationsSample()
: SampleApplication("StencilOperations", 1280, 720)
{
}
diff --git a/samples/tex_redef_microbench/TexRedefMicroBench.cpp b/samples/tex_redef_microbench/TexRedefMicroBench.cpp
index f4bf77abd6..a35262e38a 100644
--- a/samples/tex_redef_microbench/TexRedefMicroBench.cpp
+++ b/samples/tex_redef_microbench/TexRedefMicroBench.cpp
@@ -13,12 +13,13 @@
// URLs: http://safari.informit.com/9780321563835
// http://www.opengles-book.com
-#include <iostream>
-
#include "SampleApplication.h"
#include "shader_utils.h"
#include "texture_utils.h"
+#include <cstring>
+#include <iostream>
+
// This sample demonstrates the differences in rendering efficiency when
// drawing with already-created textures whose dimensions have been altered
// versus drawing with newly created textures.
@@ -45,7 +46,7 @@
class TexRedefBenchSample : public SampleApplication
{
public:
- TexRedefBenchSample::TexRedefBenchSample()
+ TexRedefBenchSample()
: SampleApplication("Microbench", 1280, 1280),
mFrameCount(0), mPixelsResize(NULL), mPixelsNewTex(NULL), mTimeFrame(false)
{
diff --git a/samples/texture_wrap/TextureWrap.cpp b/samples/texture_wrap/TextureWrap.cpp
index 7d5605923a..92bb31bc00 100644
--- a/samples/texture_wrap/TextureWrap.cpp
+++ b/samples/texture_wrap/TextureWrap.cpp
@@ -20,7 +20,7 @@
class TextureWrapSample : public SampleApplication
{
public:
- TextureWrapSample::TextureWrapSample()
+ TextureWrapSample()
: SampleApplication("TextureWrap", 1280, 720)
{
}
diff --git a/samples/tri_fan_microbench/TriFanMicroBench.cpp b/samples/tri_fan_microbench/TriFanMicroBench.cpp
index 0009dca0d7..043a6100b9 100644
--- a/samples/tri_fan_microbench/TriFanMicroBench.cpp
+++ b/samples/tri_fan_microbench/TriFanMicroBench.cpp
@@ -13,11 +13,12 @@
// URLs: http://safari.informit.com/9780321563835
// http://www.opengles-book.com
-#include <iostream>
-
#include "SampleApplication.h"
#include "shader_utils.h"
+#include <cstring>
+#include <iostream>
+
// This small sample compares the per-frame render time for a series of
// squares drawn with TRIANGLE_FANS versus squares drawn with TRIANGLES.
// To exacerbate differences between the two, we use a large collection
@@ -26,7 +27,7 @@
class TriangleFanBenchSample : public SampleApplication
{
public:
- TriangleFanBenchSample::TriangleFanBenchSample()
+ TriangleFanBenchSample()
: SampleApplication("Microbench", 1280, 1280),
mFrameCount(0)
{