From ca1050e0475680dc5162db99777ed2ff6199eb87 Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Fri, 31 Aug 2012 11:54:23 +0000 Subject: [PATCH] debug: get rid of quad.cpp, it's become useless. --- .gitignore | 1 - build/vs2010/Lol.sln | 24 - src/Makefile.am | 3 +- src/debug/quad.cpp | 1121 ----------------------------------- src/debug/quad.h | 46 -- src/lolcore.vcxproj | 2 - src/lolcore.vcxproj.filters | 8 +- src/loldebug.h | 1 - test/Makefile.am | 7 +- test/debug/quad.cpp | 34 -- test/debug/quad.vcxproj | 65 -- 11 files changed, 3 insertions(+), 1309 deletions(-) delete mode 100644 src/debug/quad.cpp delete mode 100644 src/debug/quad.h delete mode 100644 test/debug/quad.cpp delete mode 100644 test/debug/quad.vcxproj diff --git a/.gitignore b/.gitignore index 73fa7cfc..d5a8d091 100644 --- a/.gitignore +++ b/.gitignore @@ -63,7 +63,6 @@ build/vs2010/*.XGD # Our binaries test/benchsuite test/btphystest -test/quad test/testsuite test/sandbox/sample test/math/pi diff --git a/build/vs2010/Lol.sln b/build/vs2010/Lol.sln index 48572f3e..62b00e6f 100644 --- a/build/vs2010/Lol.sln +++ b/build/vs2010/Lol.sln @@ -24,11 +24,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lolcore", "..\..\src\lolcor EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Test", "Test", "{E0491194-35E3-4513-9D31-608EA3165ECF}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "quad", "..\..\test\debug\quad.vcxproj", "{53D9D96F-55C0-4044-BDB1-4A5E8EDBDF0E}" - ProjectSection(ProjectDependencies) = postProject - {9E62F2FE-3408-4EAE-8238-FD84238CEEDA} = {9E62F2FE-3408-4EAE-8238-FD84238CEEDA} - EndProjectSection -EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "benchsuite", "..\..\test\benchsuite.vcxproj", "{B1E10086-A1DA-401A-834D-969C9DBB5CC1}" ProjectSection(ProjectDependencies) = postProject {9E62F2FE-3408-4EAE-8238-FD84238CEEDA} = {9E62F2FE-3408-4EAE-8238-FD84238CEEDA} @@ -183,24 +178,6 @@ Global {9E62F2FE-3408-4EAE-8238-FD84238CEEDA}.Release|Xbox 360.ActiveCfg = Release|Xbox 360 {9E62F2FE-3408-4EAE-8238-FD84238CEEDA}.Release|Xbox 360.Build.0 = Release|Xbox 360 {9E62F2FE-3408-4EAE-8238-FD84238CEEDA}.Release|Xbox 360.Deploy.0 = Release|Xbox 360 - {53D9D96F-55C0-4044-BDB1-4A5E8EDBDF0E}.Debug|PS3.ActiveCfg = Debug|PS3 - {53D9D96F-55C0-4044-BDB1-4A5E8EDBDF0E}.Debug|PS3.Build.0 = Debug|PS3 - {53D9D96F-55C0-4044-BDB1-4A5E8EDBDF0E}.Debug|Win32.ActiveCfg = Debug|Win32 - {53D9D96F-55C0-4044-BDB1-4A5E8EDBDF0E}.Debug|Win32.Build.0 = Debug|Win32 - {53D9D96F-55C0-4044-BDB1-4A5E8EDBDF0E}.Debug|x64.ActiveCfg = Debug|x64 - {53D9D96F-55C0-4044-BDB1-4A5E8EDBDF0E}.Debug|x64.Build.0 = Debug|x64 - {53D9D96F-55C0-4044-BDB1-4A5E8EDBDF0E}.Debug|Xbox 360.ActiveCfg = Debug|Xbox 360 - {53D9D96F-55C0-4044-BDB1-4A5E8EDBDF0E}.Debug|Xbox 360.Build.0 = Debug|Xbox 360 - {53D9D96F-55C0-4044-BDB1-4A5E8EDBDF0E}.Debug|Xbox 360.Deploy.0 = Debug|Xbox 360 - {53D9D96F-55C0-4044-BDB1-4A5E8EDBDF0E}.Release|PS3.ActiveCfg = Release|PS3 - {53D9D96F-55C0-4044-BDB1-4A5E8EDBDF0E}.Release|PS3.Build.0 = Release|PS3 - {53D9D96F-55C0-4044-BDB1-4A5E8EDBDF0E}.Release|Win32.ActiveCfg = Release|Win32 - {53D9D96F-55C0-4044-BDB1-4A5E8EDBDF0E}.Release|Win32.Build.0 = Release|Win32 - {53D9D96F-55C0-4044-BDB1-4A5E8EDBDF0E}.Release|x64.ActiveCfg = Release|x64 - {53D9D96F-55C0-4044-BDB1-4A5E8EDBDF0E}.Release|x64.Build.0 = Release|x64 - {53D9D96F-55C0-4044-BDB1-4A5E8EDBDF0E}.Release|Xbox 360.ActiveCfg = Release|Xbox 360 - {53D9D96F-55C0-4044-BDB1-4A5E8EDBDF0E}.Release|Xbox 360.Build.0 = Release|Xbox 360 - {53D9D96F-55C0-4044-BDB1-4A5E8EDBDF0E}.Release|Xbox 360.Deploy.0 = Release|Xbox 360 {B1E10086-A1DA-401A-834D-969C9DBB5CC1}.Debug|PS3.ActiveCfg = Debug|PS3 {B1E10086-A1DA-401A-834D-969C9DBB5CC1}.Debug|PS3.Build.0 = Debug|PS3 {B1E10086-A1DA-401A-834D-969C9DBB5CC1}.Debug|Win32.ActiveCfg = Debug|Win32 @@ -482,7 +459,6 @@ Global {EF1A4E80-63FA-4EB0-B834-12B6C500F31C} = {08C6A854-533D-4A1E-924E-C4A62281869F} {17F0F184-4436-4D08-B8AA-16572EA238DB} = {2F87CEAB-4818-443C-A5E3-6C34E7D967EC} {9E62F2FE-3408-4EAE-8238-FD84238CEEDA} = {1AFD580B-98B8-4689-B661-38C41132C60E} - {53D9D96F-55C0-4044-BDB1-4A5E8EDBDF0E} = {E0491194-35E3-4513-9D31-608EA3165ECF} {B1E10086-A1DA-401A-834D-969C9DBB5CC1} = {E0491194-35E3-4513-9D31-608EA3165ECF} {80F81C11-8DA2-4990-91CB-9807783BA46E} = {E0491194-35E3-4513-9D31-608EA3165ECF} {EE203B88-44CF-4859-9D42-7A1F43FECB52} = {E0491194-35E3-4513-9D31-608EA3165ECF} diff --git a/src/Makefile.am b/src/Makefile.am index 41154e58..9e6f8d1c 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -65,8 +65,7 @@ liblol_a_SOURCES = \ \ loldebug.h \ debug/fps.cpp debug/fps.h debug/sphere.cpp debug/sphere.h \ - debug/record.cpp debug/record.h debug/stats.cpp debug/stats.h \ - debug/quad.cpp debug/quad.h + debug/record.cpp debug/record.h debug/stats.cpp debug/stats.h liblol_a_CPPFLAGS = @LOL_CFLAGS@ -Ibullet SUFFIXES = .lolfx diff --git a/src/debug/quad.cpp b/src/debug/quad.cpp deleted file mode 100644 index 226dc5ba..00000000 --- a/src/debug/quad.cpp +++ /dev/null @@ -1,1121 +0,0 @@ -// -// Lol Engine -// -// Copyright: (c) 2010-2012 Sam Hocevar -// This program is free software; you can redistribute it and/or -// modify it under the terms of the Do What The Fuck You Want To -// Public License, Version 2, as published by Sam Hocevar. See -// http://sam.zoy.org/projects/COPYING.WTFPL for more details. -// - -#if defined HAVE_CONFIG_H -# include "config.h" -#endif - -#if 0 - -#if defined WIN32 && !_XBOX -# define _USE_MATH_DEFINES /* for M_PI */ -# define WIN32_LEAN_AND_MEAN -# include -#endif - -#include -#include - -#include "core.h" -#include "lolgl.h" -#include "loldebug.h" - -using namespace std; - -namespace lol -{ - -/* - * OpenGL Feature list: - * - * Android and iOS don't have GL_VERTEX_ARRAY. - * - * iOS does vertex buffers using glVertexAttribPointer(), and does not - * support glVertexPointer(). - * - * PSGL (on the PS3) does vertex buffers using glVertexPointer(), and - * does not support glVertexAttribPointer(). - */ - -/* - * DebugQuad implementation class - */ - -static int const NUM_ARRAYS = 10; -static int const NUM_BUFFERS = 20; -static int const NUM_ATTRS = 20; -static int const NUM_UNIFORMS = 20; -static int const NUM_SHADERS = 20; -static int const NUM_TEXTURES = 10; - -static int const TEX_SIZE = 32; - -class DebugQuadData -{ - friend class DebugQuad; - -private: - vec2 orig, step, aa, bb; - - int initialised; - float time; -#if !defined __CELLOS_LV2__ && !defined __ANDROID__ - GLuint array[NUM_ARRAYS]; -#endif - GLuint buffer[NUM_BUFFERS]; - Shader *shader[NUM_SHADERS]; - GLuint attr[NUM_ATTRS]; - ShaderUniform uni[NUM_UNIFORMS]; - GLuint texture[NUM_TEXTURES]; - uint8_t image[1][TEX_SIZE * TEX_SIZE * 4]; - - /* Cache a list of points for a quad at the proper coordinates. */ - GLfloat const *GetVertexArray() - { - GLfloat tmp[18] = { aa.x, bb.y, 0, bb.x, bb.y, 0, bb.x, aa.y, 0, - bb.x, aa.y, 0, aa.x, aa.y, 0, aa.x, bb.y, 0 }; - memcpy(vertices, tmp, sizeof(tmp)); - return vertices; - } - GLfloat vertices[18]; - - /* Cache a list of points for a sine wave, ensuring constant spacing - * between consecutive points. */ - static int const SINE_SIZE = 256; - GLfloat const *GetSineArray() - { - static float const SINE_SPACE = 0.01f; - float x = 0.0f; - for (npoints = 0; npoints < SINE_SIZE && x <= 1.0f; npoints++) - { - float y = 0.5f + 0.5f * lol_sin(x * 2.0f * M_PI + time * 5.f); - points[npoints * 2] = aa.x + (bb.x - aa.x) * x; - points[npoints * 2 + 1] = aa.y + (bb.y - aa.y) * y; - - float dy = M_PI * lol_cos(x * 2.0f * M_PI + time * 5.f); - float dx = SINE_SPACE / sqrtf(1.0f + dy * dy); - x += dx; - } - return points; - - } - GLfloat points[2 * SINE_SIZE]; - int npoints; -}; - -/* - * Public DebugQuad class - */ - -DebugQuad::DebugQuad() - : data(new DebugQuadData()) -{ - data->initialised = 0; - data->time = RandF(10.0f); - - m_drawgroup = DRAWGROUP_HUD; -} - -DebugQuad::~DebugQuad() -{ - delete data; -} - -void DebugQuad::Advance() -{ - data->aa.x += 4.0f * data->step.x; - data->bb.x += 4.0f * data->step.x; - if (data->bb.x > 1.0f) - { - data->aa.x = data->orig.x; - data->bb.x = data->orig.x + 3.0f * data->step.x; - data->aa.y += 4.0f * data->step.y; - data->bb.y += 4.0f * data->step.y; - } -} - -void DebugQuad::TickGame(float seconds) -{ - Entity::TickGame(seconds); - - data->time += seconds; -} - -void DebugQuad::TickDraw(float seconds) -{ - Entity::TickDraw(seconds); - - if (!data->initialised && !IsDestroying()) - { -#if !defined __CELLOS_LV2__ && !defined __ANDROID__ && !defined __APPLE__ && !defined __native_client__ - glGenVertexArrays(NUM_ARRAYS, data->array); -#endif - glGenBuffers(NUM_BUFFERS, data->buffer); - glGenTextures(NUM_TEXTURES, data->texture); - for (int i = 0; i < NUM_SHADERS; i++) - data->shader[i] = NULL; - - /* Checkerboard texture */ -#if !defined HAVE_GLES_2X - glEnable(GL_TEXTURE_2D); -#endif - glBindTexture(GL_TEXTURE_2D, data->texture[0]); - for (int j = 0; j < TEX_SIZE; j++) - for (int i = 0; i < TEX_SIZE; i++) - { - uint8_t wb = (((i / 2) ^ (j / 2)) & 1) * 0xff; - data->image[0][(j * TEX_SIZE + i) * 4 + 0] = wb; - data->image[0][(j * TEX_SIZE + i) * 4 + 1] = wb; - data->image[0][(j * TEX_SIZE + i) * 4 + 2] = wb; - data->image[0][(j * TEX_SIZE + i) * 4 + 3] = 0xff; - } - /* Use GL_RGBA instead of 4 for the internal format (Android) */ - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, TEX_SIZE, TEX_SIZE, 0, - GL_RGBA, GL_UNSIGNED_BYTE, data->image[0]); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - - data->initialised = 1; - } - else if (data->initialised && IsDestroying()) - { -#if !defined __CELLOS_LV2__ && !defined __ANDROID__ && !defined __APPLE__ && !defined __native_client__ - glDeleteVertexArrays(NUM_ARRAYS, data->array); -#endif - glDeleteBuffers(NUM_BUFFERS, data->buffer); - glDeleteTextures(NUM_TEXTURES, data->texture); - - for (int i = 0; i < NUM_SHADERS; i++) - if (data->shader[i]) - Shader::Destroy(data->shader[i]); - - data->initialised = 0; - } - - /* Prepare our quad coordinates */ - ivec2 const layout(7, 5); - data->step = vec2(2.0f, -2.0f) / vec2(4 * layout + ivec2(1)); - data->orig = vec2(-1.0f, 1.0f) + data->step; - data->aa = data->orig; - data->bb = data->orig + 3.0f * data->step; - - /* These points form a [0,1][0,1] square */ - GLfloat points[12] = { 1.0f, 1.0f, 0.0f, 1.0f, 0.0f, 0.0f, - 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f }; - - GLfloat texcoords[12]; - mat4 t1 = mat4::translate(0.5f, 0.5f, 0.0f) - * mat4::rotate(25.4f * data->time, 0.0f, 0.0f, 1.0f) - * mat4::translate(-0.5f, -0.5f, 0.0f); - for (int i = 0; i < 6; i++) - { - vec4 p = t1 * vec4(points[i * 2], points[i * 2 + 1], 0.0f, 1.0f); - texcoords[i * 2] = p.x; - texcoords[i * 2 + 1] = p.y; - } - - GLfloat colors[18]; - mat4 t2 = mat4::translate(0.5f, 0.5f, 0.5f) - * mat4::rotate(15.4f * data->time, 0.0f, 0.0f, 1.0f) - * mat4::rotate(21.1f * data->time, 0.0f, 1.0f, 0.0f) - * mat4::rotate(26.7f * data->time, 1.0f, 0.0f, 0.0f) - * mat4::translate(-0.5f, -0.5f, 0.0f); - for (int i = 0; i < 6; i++) - { - vec4 p = t2 * vec4(points[i * 2], points[i * 2 + 1], 0.0f, 1.0f); - colors[i * 3] = p.x; - colors[i * 3 + 1] = p.y; - colors[i * 3 + 2] = p.z; - } - - /* Our default quad color */ - vec4 orange(0.8f, 0.5f, 0.2f, 1.0f); - - /* Cheap iterators */ -#if !defined __CELLOS_LV2__ && !defined __ANDROID__ - GLuint *array = data->array; -#endif - GLuint *buffer = data->buffer; - Shader **shader = data->shader; - GLuint *attr = data->attr; - ShaderUniform *uni = data->uni; - - /* These may be shared across calls */ - GLfloat const *sine; - - ResetState(); - - /* - * Test #1: simple glBegin + GL_TRIANGLES code - * - * Renders an orange square. - */ -#if defined HAVE_GLBEGIN || defined USE_GLEW - glColor3f(orange.x, orange.y, orange.z); - glBegin(GL_TRIANGLES); - glVertex3f(data->aa.x, data->bb.y, 0.0f); - glVertex3f(data->bb.x, data->bb.y, 0.0f); - glVertex3f(data->bb.x, data->aa.y, 0.0f); - - glVertex3f(data->bb.x, data->aa.y, 0.0f); - glVertex3f(data->aa.x, data->aa.y, 0.0f); - glVertex3f(data->aa.x, data->bb.y, 0.0f); - glEnd(); -#endif - - Advance(); - ResetState(); - - /* - * Test #2: glBegin + per-vertex coloring - * - * Renders a multicoloured square with varying colors. - */ -#if defined HAVE_GLBEGIN || defined USE_GLEW - glBegin(GL_TRIANGLES); - glColor3f(colors[0], colors[1], colors[2]); - glVertex3f(data->aa.x, data->bb.y, 0.0f); - glColor3f(colors[3], colors[4], colors[5]); - glVertex3f(data->bb.x, data->bb.y, 0.0f); - glColor3f(colors[6], colors[7], colors[8]); - glVertex3f(data->bb.x, data->aa.y, 0.0f); - - glColor3f(colors[9], colors[10], colors[11]); - glVertex3f(data->bb.x, data->aa.y, 0.0f); - glColor3f(colors[12], colors[13], colors[14]); - glVertex3f(data->aa.x, data->aa.y, 0.0f); - glColor3f(colors[15], colors[16], colors[17]); - glVertex3f(data->aa.x, data->bb.y, 0.0f); - glEnd(); -#endif - - Advance(); - ResetState(); - - /* - * Test #3: glBegin + texture - * - * Renders a multicoloured square with varying colors multiplied with an - * animated distorted checkerboard. - */ -#if defined HAVE_GLBEGIN || defined USE_GLEW -#if !defined HAVE_GLES_2X - glEnable(GL_TEXTURE_2D); -#endif - glBindTexture(GL_TEXTURE_2D, data->texture[0]); - glColor3f(1.0f, 1.0f, 1.0f); - glBegin(GL_TRIANGLES); - glColor3f(colors[0], colors[1], colors[2]); - glTexCoord2f(texcoords[0], texcoords[1]); - glVertex3f(data->aa.x, data->bb.y, 0.0f); - glColor3f(colors[3], colors[4], colors[5]); - glTexCoord2f(texcoords[2], texcoords[3]); - glVertex3f(data->bb.x, data->bb.y, 0.0f); - glColor3f(colors[6], colors[7], colors[8]); - glTexCoord2f(texcoords[4], texcoords[5]); - glVertex3f(data->bb.x, data->aa.y, 0.0f); - - glColor3f(colors[9], colors[10], colors[11]); - glTexCoord2f(texcoords[6], texcoords[7]); - glVertex3f(data->bb.x, data->aa.y, 0.0f); - glColor3f(colors[12], colors[13], colors[14]); - glTexCoord2f(texcoords[8], texcoords[9]); - glVertex3f(data->aa.x, data->aa.y, 0.0f); - glColor3f(colors[15], colors[16], colors[17]); - glTexCoord2f(texcoords[10], texcoords[11]); - glVertex3f(data->aa.x, data->bb.y, 0.0f); - glEnd(); -#if !defined HAVE_GLES_2X - glDisable(GL_TEXTURE_2D); -#endif -#endif - - Advance(); - ResetState(); - - /* - * Test #4: glBegin + color in fragment shader - * - * Renders a static, coloured and tiled pattern. - */ -#if defined HAVE_GLBEGIN || defined USE_GLEW - if (!shader[0]) - shader[0] = Shader::Create( - "#version 110\n" - "void main()" - "{" - " gl_Position = gl_Vertex;" - "}", - - "#version 110\n" - "void main()" - "{" - " float dx = mod(gl_FragCoord.x * gl_FragCoord.y, 2.0);" - " float dy = mod(gl_FragCoord.x * 0.125, 1.0);" - " float dz = mod(gl_FragCoord.y * 0.125, 1.0);" - " gl_FragColor = vec4(dx, dy, dz, 1.0);" - "}"); - shader[0]->Bind(); - shader++; - glColor3f(0.0f, 1.0f, 1.0f); - glBegin(GL_TRIANGLES); - glVertex3f(data->aa.x, data->bb.y, 0.0f); - glVertex3f(data->bb.x, data->bb.y, 0.0f); - glVertex3f(data->bb.x, data->aa.y, 0.0f); - - glVertex3f(data->bb.x, data->aa.y, 0.0f); - glVertex3f(data->aa.x, data->aa.y, 0.0f); - glVertex3f(data->aa.x, data->bb.y, 0.0f); - glEnd(); -#endif - - Advance(); - ResetState(); - - /* - * Test #5: glBegin + pass vertex coord from vertex shader to fragment - * shader for use as color information. - * - * Renders a multicoloured square with varying colors. - */ -#if defined HAVE_GLBEGIN || defined USE_GLEW - if (!shader[0]) - shader[0] = Shader::Create( - "#version 110\n" - "varying vec4 pass_Color;" - "void main()" - "{" - " float r = gl_MultiTexCoord0.x;" - " float g = gl_MultiTexCoord0.y;" - " float b = gl_MultiTexCoord0.z;" - " pass_Color = vec4(r, g, b, 1.0);" - " gl_Position = gl_Vertex;" - "}", - - "#version 110\n" - "varying vec4 pass_Color;" - "void main()" - "{" - " gl_FragColor = pass_Color;" - "}"); - shader[0]->Bind(); - shader++; - glColor3f(0.0f, 1.0f, 1.0f); - glBegin(GL_TRIANGLES); - glTexCoord3f(colors[0], colors[1], colors[2]); - glVertex3f(data->aa.x, data->bb.y, 0.0f); - glTexCoord3f(colors[3], colors[4], colors[5]); - glVertex3f(data->bb.x, data->bb.y, 0.0f); - glTexCoord3f(colors[6], colors[7], colors[8]); - glVertex3f(data->bb.x, data->aa.y, 0.0f); - - glTexCoord3f(colors[9], colors[10], colors[11]); - glVertex3f(data->bb.x, data->aa.y, 0.0f); - glTexCoord3f(colors[12], colors[13], colors[14]); - glVertex3f(data->aa.x, data->aa.y, 0.0f); - glTexCoord3f(colors[15], colors[16], colors[17]); - glVertex3f(data->aa.x, data->bb.y, 0.0f); - glEnd(); -#endif - - Advance(); - ResetState(); - - /* - * Test #6: glBegin + apply texture in fragment shader - * - * Renders an animated black-and-white distorted checkerboard with a - * zoom ratio twice the one in test #3. - * - * Note: there is no need to glEnable(GL_TEXTURE_2D) when the - * texture lookup is done in a shader. - */ -#if defined HAVE_GLBEGIN || defined USE_GLEW - if (!shader[0]) - shader[0] = Shader::Create( - "#version 110\n" - "void main()" - "{" - " gl_TexCoord[0] = gl_MultiTexCoord0;" - " gl_Position = gl_Vertex;" - "}", - - "#version 110\n" - "uniform sampler2D tex;" - "void main()" - "{" - " gl_FragColor = texture2D(tex, gl_TexCoord[0].xy * 0.25);" - "}"); - shader[0]->Bind(); - shader++; - glColor3f(0.0f, 1.0f, 1.0f); - glBindTexture(GL_TEXTURE_2D, data->texture[0]); - glBegin(GL_TRIANGLES); - glTexCoord2f(texcoords[0], texcoords[1]); - glVertex3f(data->aa.x, data->bb.y, 0.0f); - glTexCoord2f(texcoords[2], texcoords[3]); - glVertex3f(data->bb.x, data->bb.y, 0.0f); - glTexCoord2f(texcoords[4], texcoords[5]); - glVertex3f(data->bb.x, data->aa.y, 0.0f); - - glTexCoord2f(texcoords[6], texcoords[7]); - glVertex3f(data->bb.x, data->aa.y, 0.0f); - glTexCoord2f(texcoords[8], texcoords[9]); - glVertex3f(data->aa.x, data->aa.y, 0.0f); - glTexCoord2f(texcoords[10], texcoords[11]); - glVertex3f(data->aa.x, data->bb.y, 0.0f); - glEnd(); -#endif - - Advance(); - ResetState(); - - /* - * Test #7: glBegin + GL_POINTS - * - * Renders a green sine wave made of 1-pixel points. - */ -#if defined HAVE_GLBEGIN || defined USE_GLEW - glColor3f(0.0f, 1.0f, 0.0f); - glPointSize(1.0f); - - sine = data->GetSineArray(); - glBegin(GL_POINTS); - for (int i = 0; i < data->npoints; i++) - glVertex3f(sine[i * 2], sine[i * 2 + 1], 0.0f); - glEnd(); -#endif - - Advance(); - ResetState(); - - /* - * Test #8: simple vertex buffer - * - * Renders an orange square. - */ -#if !defined __ANDROID__ && !defined __APPLE__ && !defined __native_client__ - glColor4f(orange.x, orange.y, orange.z, orange.w); - glEnableClientState(GL_VERTEX_ARRAY); - - glVertexPointer(3, GL_FLOAT, 0, data->GetVertexArray()); - glDrawArrays(GL_TRIANGLES, 0, 6); - - glDisableClientState(GL_VERTEX_ARRAY); -#endif - - Advance(); - ResetState(); - - /* - * Test #9: simple point buffer - * - * Renders a green sine wave made of 1-pixel points. - */ -#if !defined __ANDROID__ && !defined __APPLE__ && !defined __native_client__ - glColor4f(0.0f, 1.0f, 0.0f, 1.0f); - glPointSize(1.0f); - glEnableClientState(GL_VERTEX_ARRAY); - - glVertexPointer(2, GL_FLOAT, 0, data->GetSineArray()); - glDrawArrays(GL_POINTS, 0, data->npoints); - - glDisableClientState(GL_VERTEX_ARRAY); -#endif - - Advance(); - ResetState(); - - /* - * Test #10: vertex buffer + per-vertex coloring - * - * Renders a multicoloured square with varying colors. - */ -#if !defined __ANDROID__ && !defined __APPLE__ && !defined __native_client__ - glEnableClientState(GL_VERTEX_ARRAY); - glEnableClientState(GL_COLOR_ARRAY); - - glVertexPointer(3, GL_FLOAT, 0, data->GetVertexArray()); - glColorPointer(3, GL_FLOAT, 0, colors); - glDrawArrays(GL_TRIANGLES, 0, 6); - - glDisableClientState(GL_VERTEX_ARRAY); - glDisableClientState(GL_COLOR_ARRAY); -#endif - - Advance(); - ResetState(); - - /* - * Test #11: vertex buffer + per-vertex coloring + texture - * - * Renders a multicoloured square with varying colors multiplied with an - * animated distorted checkerboard. - */ -#if !defined __ANDROID__ && !defined __APPLE__ && !defined __native_client__ - glEnable(GL_TEXTURE_2D); - glBindTexture(GL_TEXTURE_2D, data->texture[0]); - glEnableClientState(GL_VERTEX_ARRAY); - glEnableClientState(GL_COLOR_ARRAY); - glEnableClientState(GL_TEXTURE_COORD_ARRAY); - - glVertexPointer(3, GL_FLOAT, 0, data->GetVertexArray()); - glColorPointer(3, GL_FLOAT, 0, colors); - glTexCoordPointer(2, GL_FLOAT, 0, texcoords); - - glDrawArrays(GL_TRIANGLES, 0, 6); - - glDisableClientState(GL_VERTEX_ARRAY); - glDisableClientState(GL_COLOR_ARRAY); - glDisableClientState(GL_TEXTURE_COORD_ARRAY); - glDisable(GL_TEXTURE_2D); -#endif - - Advance(); - ResetState(); - - /* - * Test #12: vertex buffer + hardcoded color in 1.10 fragment shader - * (GLSL) or in Cg fragment shader (PS3) - * - * Renders an orange square. - */ -#if !defined __ANDROID__ && !defined __APPLE__ && !defined __native_client__ - if (!shader[0]) -#if !defined __CELLOS_LV2__ - shader[0] = Shader::Create( - "#version 110\n" - "void main()" - "{" - " gl_Position = gl_Vertex;" - "}", - - "#version 110\n" - "void main()" - "{" - " gl_FragColor = vec4(0.8, 0.5, 0.2, 1.0);" - "}"); -#else - shader[0] = Shader::Create( - "void main(float4 in_Position : POSITION," - " out float4 out_Position : POSITION)" - "{" - " out_Position = in_Position;" - "}", - - "void main(out float4 out_FragColor : COLOR)" - "{" - " out_FragColor = float4(0.8, 0.5, 0.2, 1.0);" - "}"); -#endif - shader[0]->Bind(); - shader++; - - glEnableClientState(GL_VERTEX_ARRAY); - glVertexPointer(3, GL_FLOAT, 0, data->GetVertexArray()); - glDrawArrays(GL_TRIANGLES, 0, 6); - glDisableClientState(GL_VERTEX_ARRAY); -#endif - - Advance(); - ResetState(); - - /* - * Test #13: vertex buffer + uniform color in 1.10 fragment shader - * (GLSL) or in Cg fragment shader (PS3) - * - * Renders an orange square. - */ -#if !defined __ANDROID__ && !defined __APPLE__ && !defined __native_client__ - if (!shader[0]) - { -#if !defined __CELLOS_LV2__ - shader[0] = Shader::Create( - "#version 110\n" - "void main()" - "{" - " gl_Position = gl_Vertex;" - "}", - - "#version 110\n" - "uniform vec4 in_Color;" - "void main()" - "{" - " gl_FragColor = in_Color;" - "}"); -#else - shader[0] = Shader::Create( - "void main(float4 in_Position : POSITION," - " out float4 out_Position : POSITION)" - "{" - " out_Position = in_Position;" - "}", - - "uniform float4 in_Color;" - "void main(out float4 out_FragColor : COLOR)" - "{" - " out_FragColor = in_Color;" - "}"); -#endif - uni[0] = shader[0]->GetUniformLocation("in_Color"); - } - shader[0]->Bind(); - shader[0]->SetUniform(uni[0], orange); - shader++; - uni++; - - glEnableClientState(GL_VERTEX_ARRAY); - glVertexPointer(3, GL_FLOAT, 0, data->GetVertexArray()); - glDrawArrays(GL_TRIANGLES, 0, 6); - glDisableClientState(GL_VERTEX_ARRAY); -#endif - - Advance(); - ResetState(); - - /* - * Test #14: vertex buffer + color in 1.10 fragment shader (GLSL) or - * in Cg fragment shader (PS3) - * - * Renders a static, coloured and tiled pattern. - */ -#if !defined __ANDROID__ && !defined __APPLE__ && !defined __native_client__ - if (!shader[0]) -#if !defined __CELLOS_LV2__ - shader[0] = Shader::Create( - "#version 110\n" - "void main()" - "{" - " gl_Position = gl_Vertex;" - "}", - - "#version 110\n" - "void main()" - "{" - " float dx = mod(gl_FragCoord.x * gl_FragCoord.y, 2.0);" - " float dy = mod(gl_FragCoord.x * 0.125, 1.0);" - " float dz = mod(gl_FragCoord.y * 0.125, 1.0);" - " gl_FragColor = vec4(dx, dy, dz, 1.0);" - "}"); -#else - shader[0] = Shader::Create( - "void main(float4 in_Position : POSITION," - " out float4 out_Position : POSITION)" - "{" - " out_Position = in_Position;" - "}", - - "void main(float4 in_FragCoord : WPOS," - " out float4 out_FragColor : COLOR)" - "{" - " float dx = frac(in_FragCoord.x * in_FragCoord.y * 0.5) * 2.0;" - " float dy = frac(in_FragCoord.x * 0.125);" - " float dz = frac(in_FragCoord.y * 0.125);" - " out_FragColor = float4(dx, dy, dz, 1.0);" - "}"); -#endif - shader[0]->Bind(); - shader++; - - glEnableClientState(GL_VERTEX_ARRAY); - glVertexPointer(3, GL_FLOAT, 0, data->GetVertexArray()); - glDrawArrays(GL_TRIANGLES, 0, 6); - glDisableClientState(GL_VERTEX_ARRAY); -#endif - - Advance(); - ResetState(); - - /* - * Test #15: vertex buffer + uniform matrix for color transform in 1.10 - * or Cg fragment shader - * - * Renders a multicoloured square with varying colors. - */ -#if !defined __ANDROID__ && !defined __APPLE__ && !defined __native_client__ - if (!shader[0]) - { -#if !defined __CELLOS_LV2__ - shader[0] = Shader::Create( - "#version 110\n" - "varying vec4 pass_Color;" - "uniform mat4 in_Matrix;" - "void main()" - "{" - " gl_Position = gl_Vertex;" - " pass_Color = in_Matrix * vec4(gl_MultiTexCoord0.xy, 0.0, 1.0);" - "}", - - "#version 110\n" - "varying vec4 pass_Color;" - "void main()" - "{" - " gl_FragColor = pass_Color;" - "}"); -#else - shader[0] = Shader::Create( - "void main(float4 in_Position : POSITION," - " float2 in_TexCoord : TEXCOORD0," - " uniform float4x4 in_Matrix," - " out float4 out_Color : COLOR," - " out float4 out_Position : POSITION)" - "{" - " out_Position = in_Position;" - " out_Color = mul(in_Matrix, float4(in_TexCoord, 0, 1));" - "}", - - "void main(float4 in_Color : COLOR," - " out float4 out_FragColor : COLOR)" - "{" - " out_FragColor = in_Color;" - "}"); -#endif - uni[0] = shader[0]->GetUniformLocation("in_Matrix"); - } - shader[0]->Bind(); - shader[0]->SetUniform(uni[0], t2); - shader++; - uni++; - - glEnableClientState(GL_VERTEX_ARRAY); - glEnableClientState(GL_TEXTURE_COORD_ARRAY); - - glVertexPointer(3, GL_FLOAT, 0, data->GetVertexArray()); - glTexCoordPointer(2, GL_FLOAT, 0, points); - glDrawArrays(GL_TRIANGLES, 0, 6); - - glDisableClientState(GL_VERTEX_ARRAY); - glDisableClientState(GL_TEXTURE_COORD_ARRAY); -#endif - - Advance(); - ResetState(); - - /* - * Test #16: simple point buffer - * - * Renders an antialiased green sine wave made of 1-pixel points. - */ -#if !defined __ANDROID__ && !defined __APPLE__ && !defined __CELLOS_LV2__ && !defined __native_client__ - if (!shader[0]) - shader[0] = Shader::Create( - "#version 120\n" - "varying vec4 pass_Color;" - "void main()" - "{" - " pass_Color = vec4(0.0, 1.0, 0.0, 1.0);" - " gl_Position = gl_Vertex;" - "}", - - "#version 120\n" - "varying vec4 pass_Color;" - "void main()" - "{" - " vec2 d = gl_PointCoord.st - vec2(0.5, 0.5);" - " float k = max(0.0, 2.0 * (0.5 - sqrt(dot(d, d))));" - " gl_FragColor = vec4(pass_Color.xyz, k);" - "}"); - - shader[0]->Bind(); - shader++; - - glEnable(GL_POINT_SPRITE); - glEnable(GL_BLEND); - glTexEnvi(GL_POINT_SPRITE, GL_COORD_REPLACE, GL_TRUE); - glPointSize(3.0f); - glEnableClientState(GL_VERTEX_ARRAY); - - glVertexPointer(2, GL_FLOAT, 0, data->GetSineArray()); - glDrawArrays(GL_POINTS, 0, data->npoints); - - glDisableClientState(GL_VERTEX_ARRAY); - glDisable(GL_POINT_SPRITE); - glTexEnvi(GL_POINT_SPRITE, GL_COORD_REPLACE, GL_FALSE); -#endif - - Advance(); - ResetState(); - - /* - * Test #17: vertex buffer + texture & color in 1.10 fragment shader - * - * Renders a multicoloured square with varying colors xored with an - * animated distorted checkerboard. - */ -#if !defined __ANDROID__ && !defined __APPLE__ && !defined __native_client__ - if (!shader[0]) -#if !defined __CELLOS_LV2__ - shader[0] = Shader::Create( - "#version 110\n" - "varying vec4 pass_Color;" - "void main()" - "{" - " gl_TexCoord[0] = gl_MultiTexCoord0;" - " pass_Color = gl_Color;" - " gl_Position = gl_Vertex;" - "}", - - "#version 110\n" - "varying vec4 pass_Color;" - "uniform sampler2D tex;" - "void main()" - "{" - " vec4 tmp = texture2D(tex, gl_TexCoord[0].xy * 0.25);" - " gl_FragColor = vec4(abs(tmp.xyz - pass_Color.xyz), 1.0);" - "}"); -#else - shader[0] = Shader::Create( - "void main(float4 in_Position : POSITION," - " float2 in_TexCoord : TEXCOORD0," - " float4 in_Color : COLOR," - " out float4 out_Color : COLOR," - " out float4 out_Position : POSITION," - " out float2 out_TexCoord : TEXCOORD0)" - "{" - " out_TexCoord = in_TexCoord;" - " out_Color = in_Color;" - " out_Position = in_Position;" - "}", - - "void main(float2 in_TexCoord : TEXCOORD0," - " float4 in_Color : COLOR," - " uniform sampler2D tex," - " out float4 out_FragColor : COLOR)" - "{" - " float4 tmp = tex2D(tex, in_TexCoord * 0.25);" - " out_FragColor = float4(abs(tmp.xyz - in_Color.xyz), 1);" - "}"); -#endif - - shader[0]->Bind(); - shader++; - - glBindTexture(GL_TEXTURE_2D, data->texture[0]); - - glEnableClientState(GL_VERTEX_ARRAY); - glEnableClientState(GL_COLOR_ARRAY); - glEnableClientState(GL_TEXTURE_COORD_ARRAY); - - glVertexPointer(3, GL_FLOAT, 0, data->GetVertexArray()); - glColorPointer(3, GL_FLOAT, 0, colors); - glTexCoordPointer(2, GL_FLOAT, 0, texcoords); - glDrawArrays(GL_TRIANGLES, 0, 6); - - glDisableClientState(GL_VERTEX_ARRAY); - glDisableClientState(GL_COLOR_ARRAY); - glDisableClientState(GL_TEXTURE_COORD_ARRAY); -#endif - - Advance(); - ResetState(); - - /* - * Test #18: vertex buffer + texture & color in 1.20 fragment shader - * - * Renders a multicoloured square with varying colors xored with an - * animated distorted checkerboard. - */ -#if !defined __CELLOS_LV2__ && !defined __ANDROID__ && !defined __APPLE__ && !defined __native_client__ - if (!shader[0]) - { - shader[0] = Shader::Create( - "#version 120\n" - "attribute vec3 in_Vertex;" - "attribute vec3 in_Color;" - "attribute vec2 in_MultiTexCoord0;" - "varying vec4 pass_Color;" - "void main()" - "{" - " gl_TexCoord[0] = vec4(in_MultiTexCoord0, 0.0, 0.0);" - " pass_Color = vec4(in_Color, 1.0);" - " gl_Position = vec4(in_Vertex, 1.0);" - "}", - - "#version 120\n" - "varying vec4 pass_Color;" - "uniform sampler2D tex;" - "void main()" - "{" - " vec4 tmp = texture2D(tex, gl_TexCoord[0].xy * 0.25);" - " gl_FragColor = vec4(abs(tmp.xyz - pass_Color.xyz), 1.0);" - "}"); - attr[0] = shader[0]->GetAttribLocation("in_Vertex"); - attr[1] = shader[0]->GetAttribLocation("in_Color"); - attr[2] = shader[0]->GetAttribLocation("in_MultiTexCoord0"); - } - shader[0]->Bind(); - shader++; - - glBindTexture(GL_TEXTURE_2D, data->texture[0]); - - glBindVertexArray(*array++); - - glBindBuffer(GL_ARRAY_BUFFER, *buffer++); - glBufferData(GL_ARRAY_BUFFER, 3 * 6 * sizeof(GLfloat), - data->GetVertexArray(), GL_DYNAMIC_DRAW); - glVertexAttribPointer(attr[0], 3, GL_FLOAT, GL_FALSE, 0, 0); - glEnableVertexAttribArray(attr[0]); - - glBindBuffer(GL_ARRAY_BUFFER, *buffer++); - glBufferData(GL_ARRAY_BUFFER, sizeof(colors), colors, - GL_DYNAMIC_DRAW); - glVertexAttribPointer(attr[1], 3, GL_FLOAT, GL_FALSE, 0, 0); - glEnableVertexAttribArray(attr[1]); - - glBindBuffer(GL_ARRAY_BUFFER, *buffer++); - glBufferData(GL_ARRAY_BUFFER, sizeof(texcoords), texcoords, - GL_DYNAMIC_DRAW); - glVertexAttribPointer(attr[2], 2, GL_FLOAT, GL_FALSE, 0, 0); - glEnableVertexAttribArray(attr[2]); - - glDrawArrays(GL_TRIANGLES, 0, 6); - glBindVertexArray(0); - - glDisableVertexAttribArray(*attr++); - glDisableVertexAttribArray(*attr++); - glDisableVertexAttribArray(*attr++); -#endif - - Advance(); - ResetState(); - - /* - * Test #19: vertex buffer + texture & color in 1.30 fragment shader - * - * Renders a multicoloured square with varying colors xored with an - * animated distorted checkerboard. - */ -#if !defined __CELLOS_LV2__ && !defined __ANDROID__ && !defined __APPLE__ && !defined __native_client__ - if (!shader[0]) - { - shader[0] = Shader::Create( - "#version 130\n" - "in vec3 in_Vertex;" - "in vec3 in_Color;" - "in vec2 in_MultiTexCoord0;" - "out vec4 pass_Color;" - "void main()" - "{" - " gl_TexCoord[0] = vec4(in_MultiTexCoord0, 0.0, 0.0);" - " pass_Color = vec4(in_Color, 1.0);" - " gl_Position = vec4(in_Vertex, 1.0);" - "}", - - "#version 130\n" - "in vec4 pass_Color;" - "uniform sampler2D tex;" - "void main()" - "{" - " vec4 tmp = texture2D(tex, gl_TexCoord[0].xy * 0.25);" - " gl_FragColor = vec4(abs(tmp.xyz - pass_Color.xyz), 1.0);" - "}"); - attr[0] = shader[0]->GetAttribLocation("in_Vertex"); - attr[1] = shader[0]->GetAttribLocation("in_Color"); - attr[2] = shader[0]->GetAttribLocation("in_MultiTexCoord0"); - } - shader[0]->Bind(); - shader++; - - glBindTexture(GL_TEXTURE_2D, data->texture[0]); - - glBindVertexArray(*array++); - - glBindBuffer(GL_ARRAY_BUFFER, *buffer++); - glBufferData(GL_ARRAY_BUFFER, 3 * 6 * sizeof(GLfloat), - data->GetVertexArray(), GL_DYNAMIC_DRAW); - glVertexAttribPointer(attr[0], 3, GL_FLOAT, GL_FALSE, 0, 0); - glEnableVertexAttribArray(attr[0]); - - glBindBuffer(GL_ARRAY_BUFFER, *buffer++); - glBufferData(GL_ARRAY_BUFFER, sizeof(colors), colors, - GL_DYNAMIC_DRAW); - glVertexAttribPointer(attr[1], 3, GL_FLOAT, GL_FALSE, 0, 0); - glEnableVertexAttribArray(attr[1]); - - glBindBuffer(GL_ARRAY_BUFFER, *buffer++); - glBufferData(GL_ARRAY_BUFFER, sizeof(texcoords), texcoords, - GL_DYNAMIC_DRAW); - glVertexAttribPointer(attr[2], 2, GL_FLOAT, GL_FALSE, 0, 0); - glEnableVertexAttribArray(attr[2]); - - glDrawArrays(GL_TRIANGLES, 0, 6); - glBindVertexArray(0); - - glDisableVertexAttribArray(*attr++); - glDisableVertexAttribArray(*attr++); - glDisableVertexAttribArray(*attr++); -#endif - - Advance(); - ResetState(); - - /* Check that we didn't overflow our list */ -#if !defined __CELLOS_LV2__ && !defined __ANDROID__ - if (array > data->array + NUM_ARRAYS) - Log::Error("too many arrays used\n"); -#endif - if (buffer > data->buffer + NUM_BUFFERS) - Log::Error("too many buffers used\n"); - if (shader > data->shader + NUM_SHADERS) - Log::Error("too many shaders used\n"); - if (attr > data->attr + NUM_ATTRS) - Log::Error("too many attributes used\n"); -} - -void DebugQuad::ResetState() -{ - /* Reset GL states to something reasonably safe */ - -#if defined HAVE_GLBEGIN || defined USE_GLEW || defined __CELLOS_LV2__ - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); -#endif - -#if !defined __ANDROID__ && !defined __APPLE__ && !defined __native_client__ - glColor4f(1.0f, 1.0f, 1.0f, 1.0f); -#endif - -#if !defined HAVE_GLES_2X - glEnable(GL_TEXTURE_2D); -#endif - glBindTexture(GL_TEXTURE_2D, 0); -#if defined HAVE_GLBEGIN || defined USE_GLEW || defined __CELLOS_LV2__ - glClientActiveTexture(GL_TEXTURE0); -#endif -#if !defined __CELLOS_LV2__ && !defined __ANDROID__ && !defined __APPLE__ && !defined __native_client__ - glTexEnvi(GL_POINT_SPRITE, GL_COORD_REPLACE, GL_FALSE); -#endif -#if !defined HAVE_GLES_2X - glDisable(GL_TEXTURE_2D); -#endif - - glDisable(GL_BLEND); -#if !defined __CELLOS_LV2__ && !defined __ANDROID__ && !defined __APPLE__ && !defined __native_client__ - glDisable(GL_POINT_SPRITE); -#endif - - glBindBuffer(GL_ARRAY_BUFFER, 0); -#if !defined __CELLOS_LV2__ - glUseProgram(0); -#else - cgGLDisableProfile(cgGLGetLatestProfile(CG_GL_VERTEX)); - cgGLDisableProfile(cgGLGetLatestProfile(CG_GL_FRAGMENT)); -#endif - -#if !defined __CELLOS_LV2__ && !defined __ANDROID__ && !defined __APPLE__ && !defined __native_client__ - glDisable(GL_VERTEX_PROGRAM_POINT_SIZE); -#endif -} - -} /* namespace lol */ - -#endif /* 0 */ diff --git a/src/debug/quad.h b/src/debug/quad.h deleted file mode 100644 index 3ce611ce..00000000 --- a/src/debug/quad.h +++ /dev/null @@ -1,46 +0,0 @@ -// -// Lol Engine -// -// Copyright: (c) 2010-2012 Sam Hocevar -// This program is free software; you can redistribute it and/or -// modify it under the terms of the Do What The Fuck You Want To -// Public License, Version 2, as published by Sam Hocevar. See -// http://sam.zoy.org/projects/COPYING.WTFPL for more details. -// - -// -// The DebugQuad class -// ------------------- -// - -#if !defined __LOL_DEBUGTRI_H__ -#define __LOL_DEBUGTRI_H__ - -#include "entity.h" - -namespace lol -{ - -class DebugQuadData; - -class DebugQuad : public Entity -{ -public: - DebugQuad(); - virtual ~DebugQuad(); - -protected: - virtual void TickGame(float seconds); - virtual void TickDraw(float seconds); - -private: - void ResetState(); - void Advance(); - - DebugQuadData *data; -}; - -} /* namespace lol */ - -#endif // __LOL_DEBUGTRI_H__ - diff --git a/src/lolcore.vcxproj b/src/lolcore.vcxproj index d94b1f43..65c10805 100644 --- a/src/lolcore.vcxproj +++ b/src/lolcore.vcxproj @@ -235,7 +235,6 @@ - @@ -548,7 +547,6 @@ - diff --git a/src/lolcore.vcxproj.filters b/src/lolcore.vcxproj.filters index 5aaf4a12..3bdfa551 100644 --- a/src/lolcore.vcxproj.filters +++ b/src/lolcore.vcxproj.filters @@ -70,9 +70,6 @@ src\debug - - src\debug - src\debug @@ -639,9 +636,6 @@ src\debug - - src\debug - src\debug @@ -1613,4 +1607,4 @@ src\gpu - \ No newline at end of file + diff --git a/src/loldebug.h b/src/loldebug.h index 515969a0..7831ae0d 100644 --- a/src/loldebug.h +++ b/src/loldebug.h @@ -17,7 +17,6 @@ #define __LOL_LOLDEBUG_H__ #include "debug/fps.h" -#include "debug/quad.h" #include "debug/record.h" #include "debug/sphere.h" #include "debug/stats.h" diff --git a/test/Makefile.am b/test/Makefile.am index 346c22ee..000a8dfe 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -17,7 +17,7 @@ CLEANFILES = $(noinst_PROGRAMS:%$(EXEEXT)=%.self) \ EXTRA_DIST = data/gradient.png -noinst_PROGRAMS = quad benchsuite $(testsuite) btphystest +noinst_PROGRAMS = benchsuite $(testsuite) btphystest TESTS = $(testsuite) @@ -41,11 +41,6 @@ benchsuite_CPPFLAGS = @LOL_CFLAGS@ @PIPI_CFLAGS@ benchsuite_LDFLAGS = $(top_builddir)/src/liblol.a @LOL_LIBS@ @PIPI_LIBS@ benchsuite_DEPENDENCIES = $(top_builddir)/src/liblol.a -quad_SOURCES = debug/quad.cpp -quad_CPPFLAGS = @LOL_CFLAGS@ @PIPI_CFLAGS@ -quad_LDFLAGS = $(top_builddir)/src/liblol.a @LOL_LIBS@ @PIPI_LIBS@ -quad_DEPENDENCIES = $(top_builddir)/src/liblol.a - btphystest_SOURCES = BtPhysTest.cpp BtPhysTest.h \ Physics/Src/EasyPhysics.cpp Physics/Include/EasyPhysics.h \ Physics/Include/LolBtPhysicsIntegration.h Physics/Include/LolPhysics.h \ diff --git a/test/debug/quad.cpp b/test/debug/quad.cpp deleted file mode 100644 index 1090dda9..00000000 --- a/test/debug/quad.cpp +++ /dev/null @@ -1,34 +0,0 @@ -// -// Lol Engine - Debug Quad test program -// -// Copyright: (c) 2005-2011 Sam Hocevar -// This program is free software; you can redistribute it and/or -// modify it under the terms of the Do What The Fuck You Want To -// Public License, Version 2, as published by Sam Hocevar. See -// http://sam.zoy.org/projects/COPYING.WTFPL for more details. -// - -#if defined HAVE_CONFIG_H -# include "config.h" -#endif - -#include "core.h" -#include "lolgl.h" -#include "loldebug.h" - -using namespace std; -using namespace lol; - -int main(int argc, char **argv) -{ - Application app("Quad", ivec2(640, 480), 60.0f); - - /* Register some debug stuff */ - new DebugFps(5, 5); - //new DebugQuad(); - - app.Run(); - - return EXIT_SUCCESS; -} - diff --git a/test/debug/quad.vcxproj b/test/debug/quad.vcxproj deleted file mode 100644 index 4145f5f7..00000000 --- a/test/debug/quad.vcxproj +++ /dev/null @@ -1,65 +0,0 @@ - - - - - Debug - PS3 - - - Debug - Win32 - - - Debug - x64 - - - Debug - Xbox 360 - - - Release - PS3 - - - Release - Win32 - - - Release - x64 - - - Release - Xbox 360 - - - - - - - - {9e62f2fe-3408-4eae-8238-fd84238ceeda} - - - - {53D9D96F-55C0-4044-BDB1-4A5E8EDBDF0E} - Application - Win32Proj - - - - - - - - - - - - - - - - - \ No newline at end of file