rayfract
changeset 3:bf1d56975cc9
- added visual studio project
- removed vmath dependency
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Tue, 26 Oct 2010 09:52:57 +0300 |
parents | 87b6a11c920b |
children | e4349f5804b9 |
files | rayfract.sln rayfract.vcproj src/gui.cc src/rayfract.cc src/utktext.cc src/utktext.h src/vmath.cc src/vmath.h |
diffstat | 8 files changed, 385 insertions(+), 4 deletions(-) [+] |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/rayfract.sln Tue Oct 26 09:52:57 2010 +0300 1.3 @@ -0,0 +1,20 @@ 1.4 + 1.5 +Microsoft Visual Studio Solution File, Format Version 9.00 1.6 +# Visual Studio 2005 1.7 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rayfract", "rayfract.vcproj", "{374B1E09-A12F-49C8-9A49-DA090A68BCC0}" 1.8 +EndProject 1.9 +Global 1.10 + GlobalSection(SolutionConfigurationPlatforms) = preSolution 1.11 + Debug|Win32 = Debug|Win32 1.12 + Release|Win32 = Release|Win32 1.13 + EndGlobalSection 1.14 + GlobalSection(ProjectConfigurationPlatforms) = postSolution 1.15 + {374B1E09-A12F-49C8-9A49-DA090A68BCC0}.Debug|Win32.ActiveCfg = Debug|Win32 1.16 + {374B1E09-A12F-49C8-9A49-DA090A68BCC0}.Debug|Win32.Build.0 = Debug|Win32 1.17 + {374B1E09-A12F-49C8-9A49-DA090A68BCC0}.Release|Win32.ActiveCfg = Release|Win32 1.18 + {374B1E09-A12F-49C8-9A49-DA090A68BCC0}.Release|Win32.Build.0 = Release|Win32 1.19 + EndGlobalSection 1.20 + GlobalSection(SolutionProperties) = preSolution 1.21 + HideSolutionNode = FALSE 1.22 + EndGlobalSection 1.23 +EndGlobal
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/rayfract.vcproj Tue Oct 26 09:52:57 2010 +0300 2.3 @@ -0,0 +1,233 @@ 2.4 +<?xml version="1.0" encoding="Windows-1252"?> 2.5 +<VisualStudioProject 2.6 + ProjectType="Visual C++" 2.7 + Version="8,00" 2.8 + Name="rayfract" 2.9 + ProjectGUID="{374B1E09-A12F-49C8-9A49-DA090A68BCC0}" 2.10 + RootNamespace="rayfract" 2.11 + Keyword="Win32Proj" 2.12 + > 2.13 + <Platforms> 2.14 + <Platform 2.15 + Name="Win32" 2.16 + /> 2.17 + </Platforms> 2.18 + <ToolFiles> 2.19 + </ToolFiles> 2.20 + <Configurations> 2.21 + <Configuration 2.22 + Name="Debug|Win32" 2.23 + OutputDirectory="$(SolutionDir)$(ConfigurationName)" 2.24 + IntermediateDirectory="$(ConfigurationName)" 2.25 + ConfigurationType="1" 2.26 + CharacterSet="1" 2.27 + > 2.28 + <Tool 2.29 + Name="VCPreBuildEventTool" 2.30 + /> 2.31 + <Tool 2.32 + Name="VCCustomBuildTool" 2.33 + /> 2.34 + <Tool 2.35 + Name="VCXMLDataGeneratorTool" 2.36 + /> 2.37 + <Tool 2.38 + Name="VCWebServiceProxyGeneratorTool" 2.39 + /> 2.40 + <Tool 2.41 + Name="VCMIDLTool" 2.42 + /> 2.43 + <Tool 2.44 + Name="VCCLCompilerTool" 2.45 + Optimization="0" 2.46 + AdditionalIncludeDirectories="src;c:\usr\include\ubertk" 2.47 + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_USE_MATH_DEFINES;_CRT_SECURE_NO_DEPRECATE" 2.48 + MinimalRebuild="true" 2.49 + BasicRuntimeChecks="3" 2.50 + RuntimeLibrary="3" 2.51 + UsePrecompiledHeader="0" 2.52 + WarningLevel="3" 2.53 + Detect64BitPortabilityProblems="true" 2.54 + DebugInformationFormat="4" 2.55 + /> 2.56 + <Tool 2.57 + Name="VCManagedResourceCompilerTool" 2.58 + /> 2.59 + <Tool 2.60 + Name="VCResourceCompilerTool" 2.61 + /> 2.62 + <Tool 2.63 + Name="VCPreLinkEventTool" 2.64 + /> 2.65 + <Tool 2.66 + Name="VCLinkerTool" 2.67 + AdditionalDependencies="ubertk.lib freetype.lib glew32.lib" 2.68 + LinkIncremental="2" 2.69 + GenerateDebugInformation="true" 2.70 + SubSystem="1" 2.71 + TargetMachine="1" 2.72 + /> 2.73 + <Tool 2.74 + Name="VCALinkTool" 2.75 + /> 2.76 + <Tool 2.77 + Name="VCManifestTool" 2.78 + /> 2.79 + <Tool 2.80 + Name="VCXDCMakeTool" 2.81 + /> 2.82 + <Tool 2.83 + Name="VCBscMakeTool" 2.84 + /> 2.85 + <Tool 2.86 + Name="VCFxCopTool" 2.87 + /> 2.88 + <Tool 2.89 + Name="VCAppVerifierTool" 2.90 + /> 2.91 + <Tool 2.92 + Name="VCWebDeploymentTool" 2.93 + /> 2.94 + <Tool 2.95 + Name="VCPostBuildEventTool" 2.96 + /> 2.97 + </Configuration> 2.98 + <Configuration 2.99 + Name="Release|Win32" 2.100 + OutputDirectory="$(SolutionDir)$(ConfigurationName)" 2.101 + IntermediateDirectory="$(ConfigurationName)" 2.102 + ConfigurationType="1" 2.103 + CharacterSet="1" 2.104 + WholeProgramOptimization="1" 2.105 + > 2.106 + <Tool 2.107 + Name="VCPreBuildEventTool" 2.108 + /> 2.109 + <Tool 2.110 + Name="VCCustomBuildTool" 2.111 + /> 2.112 + <Tool 2.113 + Name="VCXMLDataGeneratorTool" 2.114 + /> 2.115 + <Tool 2.116 + Name="VCWebServiceProxyGeneratorTool" 2.117 + /> 2.118 + <Tool 2.119 + Name="VCMIDLTool" 2.120 + /> 2.121 + <Tool 2.122 + Name="VCCLCompilerTool" 2.123 + AdditionalIncludeDirectories="src;c:\usr\include\ubertk" 2.124 + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_USE_MATH_DEFINES;_CRT_SECURE_NO_DEPRECATE" 2.125 + RuntimeLibrary="2" 2.126 + UsePrecompiledHeader="0" 2.127 + WarningLevel="3" 2.128 + Detect64BitPortabilityProblems="true" 2.129 + DebugInformationFormat="3" 2.130 + /> 2.131 + <Tool 2.132 + Name="VCManagedResourceCompilerTool" 2.133 + /> 2.134 + <Tool 2.135 + Name="VCResourceCompilerTool" 2.136 + /> 2.137 + <Tool 2.138 + Name="VCPreLinkEventTool" 2.139 + /> 2.140 + <Tool 2.141 + Name="VCLinkerTool" 2.142 + AdditionalDependencies="ubertk.lib freetype.lib glew32.lib" 2.143 + LinkIncremental="1" 2.144 + GenerateDebugInformation="true" 2.145 + SubSystem="1" 2.146 + OptimizeReferences="2" 2.147 + EnableCOMDATFolding="2" 2.148 + TargetMachine="1" 2.149 + /> 2.150 + <Tool 2.151 + Name="VCALinkTool" 2.152 + /> 2.153 + <Tool 2.154 + Name="VCManifestTool" 2.155 + /> 2.156 + <Tool 2.157 + Name="VCXDCMakeTool" 2.158 + /> 2.159 + <Tool 2.160 + Name="VCBscMakeTool" 2.161 + /> 2.162 + <Tool 2.163 + Name="VCFxCopTool" 2.164 + /> 2.165 + <Tool 2.166 + Name="VCAppVerifierTool" 2.167 + /> 2.168 + <Tool 2.169 + Name="VCWebDeploymentTool" 2.170 + /> 2.171 + <Tool 2.172 + Name="VCPostBuildEventTool" 2.173 + /> 2.174 + </Configuration> 2.175 + </Configurations> 2.176 + <References> 2.177 + </References> 2.178 + <Files> 2.179 + <Filter 2.180 + Name="src" 2.181 + Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx" 2.182 + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" 2.183 + > 2.184 + <File 2.185 + RelativePath=".\src\gui.cc" 2.186 + > 2.187 + </File> 2.188 + <File 2.189 + RelativePath=".\src\gui.h" 2.190 + > 2.191 + </File> 2.192 + <File 2.193 + RelativePath=".\src\rayfract.cc" 2.194 + > 2.195 + </File> 2.196 + <File 2.197 + RelativePath=".\src\sdr.c" 2.198 + > 2.199 + </File> 2.200 + <File 2.201 + RelativePath=".\src\sdr.h" 2.202 + > 2.203 + </File> 2.204 + <File 2.205 + RelativePath=".\src\utktext.cc" 2.206 + > 2.207 + </File> 2.208 + <File 2.209 + RelativePath=".\src\utktext.h" 2.210 + > 2.211 + </File> 2.212 + <File 2.213 + RelativePath=".\src\vmath.cc" 2.214 + > 2.215 + </File> 2.216 + <File 2.217 + RelativePath=".\src\vmath.h" 2.218 + > 2.219 + </File> 2.220 + </Filter> 2.221 + <Filter 2.222 + Name="sdr" 2.223 + > 2.224 + <File 2.225 + RelativePath=".\sdr\julia.p.glsl" 2.226 + > 2.227 + </File> 2.228 + <File 2.229 + RelativePath=".\sdr\sdr.v.glsl" 2.230 + > 2.231 + </File> 2.232 + </Filter> 2.233 + </Files> 2.234 + <Globals> 2.235 + </Globals> 2.236 +</VisualStudioProject>
3.1 --- a/src/gui.cc Tue Oct 26 08:49:09 2010 +0300 3.2 +++ b/src/gui.cc Tue Oct 26 09:52:57 2010 +0300 3.3 @@ -6,11 +6,15 @@ 3.4 #include <GLUT/glut.h> 3.5 #endif 3.6 3.7 -#include <vmath.h> 3.8 #include <ubertk.h> 3.9 #include "gui.h" 3.10 #include "utktext.h" 3.11 #include "sdr.h" 3.12 +#include "vmath.h" 3.13 + 3.14 +#ifndef GL_BGRA 3.15 +#define GL_BGRA 0x80E1 3.16 +#endif 3.17 3.18 #define TEXT_PT_SIZE 18 3.19
4.1 --- a/src/rayfract.cc Tue Oct 26 08:49:09 2010 +0300 4.2 +++ b/src/rayfract.cc Tue Oct 26 09:52:57 2010 +0300 4.3 @@ -1,11 +1,12 @@ 4.4 #include <stdio.h> 4.5 #include <stdlib.h> 4.6 +#include <math.h> 4.7 #include <assert.h> 4.8 #include <GL/glew.h> 4.9 #include <GL/glut.h> 4.10 -#include <vmath.h> 4.11 #include "sdr.h" 4.12 #include "gui.h" 4.13 +#include "vmath.h" 4.14 4.15 void disp(); 4.16 void reshape(int x, int y);
5.1 --- a/src/utktext.cc Tue Oct 26 08:49:09 2010 +0300 5.2 +++ b/src/utktext.cc Tue Oct 26 09:52:57 2010 +0300 5.3 @@ -8,9 +8,9 @@ 5.4 #endif 5.5 #include <ft2build.h> 5.6 #include FT_FREETYPE_H 5.7 -#include <vmath.h> 5.8 #include "utktext.h" 5.9 #include "utk_common.h" 5.10 +#include "vmath.h" 5.11 5.12 #ifndef GL_BGRA 5.13 #define GL_BGRA 0x80E1
6.1 --- a/src/utktext.h Tue Oct 26 08:49:09 2010 +0300 6.2 +++ b/src/utktext.h Tue Oct 26 09:52:57 2010 +0300 6.3 @@ -5,7 +5,7 @@ 6.4 #include <windows.h> 6.5 #endif 6.6 6.7 -#include <vmath.h> 6.8 +#include "vmath.h" 6.9 6.10 class Color { 6.11 public:
7.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 7.2 +++ b/src/vmath.cc Tue Oct 26 09:52:57 2010 +0300 7.3 @@ -0,0 +1,89 @@ 7.4 +#include "vmath.h" 7.5 + 7.6 +Vector2::Vector2() 7.7 +{ 7.8 + x = y = 0.0f; 7.9 +} 7.10 + 7.11 +Vector2::Vector2(float x, float y) 7.12 +{ 7.13 + this->x = x; 7.14 + this->y = y; 7.15 +} 7.16 + 7.17 +Vector2 operator +(const Vector2 &a, const Vector2 &b) 7.18 +{ 7.19 + return Vector2(a.x + b.x, a.y + b.y); 7.20 +} 7.21 + 7.22 +Vector2 operator *(const Vector2 &v, float s) 7.23 +{ 7.24 + return Vector2(v.x * s, v.y * s); 7.25 +} 7.26 + 7.27 +Vector3::Vector3() 7.28 +{ 7.29 + x = y = z = 0.0f; 7.30 +} 7.31 + 7.32 +Vector3::Vector3(float x, float y, float z) 7.33 +{ 7.34 + this->x = x; 7.35 + this->y = y; 7.36 + this->z = z; 7.37 +} 7.38 + 7.39 +Vector4::Vector4() 7.40 +{ 7.41 + x = y = z = w = 0.0f; 7.42 +} 7.43 + 7.44 +Vector4::Vector4(float x, float y, float z, float w) 7.45 +{ 7.46 + this->x = x; 7.47 + this->y = y; 7.48 + this->z = z; 7.49 + this->w = w; 7.50 +} 7.51 + 7.52 +float &Vector4::operator [](int idx) 7.53 +{ 7.54 + switch(idx) { 7.55 + case 0: 7.56 + return x; 7.57 + break; 7.58 + case 1: 7.59 + return y; 7.60 + break; 7.61 + case 2: 7.62 + return z; 7.63 + break; 7.64 + case 3: 7.65 + return w; 7.66 + break; 7.67 + default: 7.68 + break; 7.69 + } 7.70 + return x; 7.71 +} 7.72 + 7.73 +const float &Vector4::operator [](int idx) const 7.74 +{ 7.75 + switch(idx) { 7.76 + case 0: 7.77 + return x; 7.78 + break; 7.79 + case 1: 7.80 + return y; 7.81 + break; 7.82 + case 2: 7.83 + return z; 7.84 + break; 7.85 + case 3: 7.86 + return w; 7.87 + break; 7.88 + default: 7.89 + break; 7.90 + } 7.91 + return x; 7.92 +} 7.93 \ No newline at end of file
8.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 8.2 +++ b/src/vmath.h Tue Oct 26 09:52:57 2010 +0300 8.3 @@ -0,0 +1,34 @@ 8.4 +#ifndef VMATH_H_ 8.5 +#define VMATH_H_ 8.6 + 8.7 +class Vector2 { 8.8 +public: 8.9 + float x, y; 8.10 + 8.11 + Vector2(); 8.12 + Vector2(float x, float y); 8.13 +}; 8.14 + 8.15 +Vector2 operator +(const Vector2 &a, const Vector2 &b); 8.16 +Vector2 operator *(const Vector2 &v, float s); 8.17 + 8.18 +class Vector3 { 8.19 +public: 8.20 + float x, y, z; 8.21 + 8.22 + Vector3(); 8.23 + Vector3(float x, float y, float z); 8.24 +}; 8.25 + 8.26 +class Vector4 { 8.27 +public: 8.28 + float x, y, z, w; 8.29 + 8.30 + Vector4(); 8.31 + Vector4(float x, float y, float z, float w); 8.32 + 8.33 + float &operator [](int idx); 8.34 + const float &operator [](int idx) const; 8.35 +}; 8.36 + 8.37 +#endif /* VMATH_H_ */ 8.38 \ No newline at end of file