Skip to content

Commit

Permalink
ADD Sep 1, 6 - polygon, lighting, serpenski
Browse files Browse the repository at this point in the history
  • Loading branch information
enygmator committed Sep 7, 2021
1 parent fb7a8ea commit 245050a
Show file tree
Hide file tree
Showing 13 changed files with 1,418 additions and 0 deletions.
40 changes: 40 additions & 0 deletions FVAR_UE19CS315.sln
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Aug30_1_Teapot", "Aug30_1_T
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Aug30_2_Polygons", "Aug30_2_Polygons\Aug30_2_Polygons.vcxproj", "{270D7196-36AD-403B-A07C-CEFEB47E0814}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Sep1_1_Polygons", "Sep1_1_Polygons\Sep1_1_Polygons.vcxproj", "{3EF87408-6F98-4F32-B8B3-C2FD2DD1DD6C}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Sep1_2_SerpinskiGasket", "Sep1_2_SerpinskiGasket\Sep1_2_SerpinskiGasket.vcxproj", "{77D4F853-BCA0-4D41-B8EA-87C3DA69C53B}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Sep1_3_3dPolygon", "Sep1_3_3dPolygon\Sep1_3_3dPolygon.vcxproj", "{667B789A-4E0A-4029-9AC3-F95559F26CB6}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Sep6_1_OpenGLLighting", "Sep6_1_OpenGLLighting\Sep6_1_OpenGLLighting.vcxproj", "{80754C14-4419-44A8-B8AB-D2C80134B8D0}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Expand Down Expand Up @@ -41,6 +49,38 @@ Global
{270D7196-36AD-403B-A07C-CEFEB47E0814}.Release|x64.Build.0 = Release|x64
{270D7196-36AD-403B-A07C-CEFEB47E0814}.Release|x86.ActiveCfg = Release|Win32
{270D7196-36AD-403B-A07C-CEFEB47E0814}.Release|x86.Build.0 = Release|Win32
{3EF87408-6F98-4F32-B8B3-C2FD2DD1DD6C}.Debug|x64.ActiveCfg = Debug|x64
{3EF87408-6F98-4F32-B8B3-C2FD2DD1DD6C}.Debug|x64.Build.0 = Debug|x64
{3EF87408-6F98-4F32-B8B3-C2FD2DD1DD6C}.Debug|x86.ActiveCfg = Debug|Win32
{3EF87408-6F98-4F32-B8B3-C2FD2DD1DD6C}.Debug|x86.Build.0 = Debug|Win32
{3EF87408-6F98-4F32-B8B3-C2FD2DD1DD6C}.Release|x64.ActiveCfg = Release|x64
{3EF87408-6F98-4F32-B8B3-C2FD2DD1DD6C}.Release|x64.Build.0 = Release|x64
{3EF87408-6F98-4F32-B8B3-C2FD2DD1DD6C}.Release|x86.ActiveCfg = Release|Win32
{3EF87408-6F98-4F32-B8B3-C2FD2DD1DD6C}.Release|x86.Build.0 = Release|Win32
{77D4F853-BCA0-4D41-B8EA-87C3DA69C53B}.Debug|x64.ActiveCfg = Debug|x64
{77D4F853-BCA0-4D41-B8EA-87C3DA69C53B}.Debug|x64.Build.0 = Debug|x64
{77D4F853-BCA0-4D41-B8EA-87C3DA69C53B}.Debug|x86.ActiveCfg = Debug|Win32
{77D4F853-BCA0-4D41-B8EA-87C3DA69C53B}.Debug|x86.Build.0 = Debug|Win32
{77D4F853-BCA0-4D41-B8EA-87C3DA69C53B}.Release|x64.ActiveCfg = Release|x64
{77D4F853-BCA0-4D41-B8EA-87C3DA69C53B}.Release|x64.Build.0 = Release|x64
{77D4F853-BCA0-4D41-B8EA-87C3DA69C53B}.Release|x86.ActiveCfg = Release|Win32
{77D4F853-BCA0-4D41-B8EA-87C3DA69C53B}.Release|x86.Build.0 = Release|Win32
{667B789A-4E0A-4029-9AC3-F95559F26CB6}.Debug|x64.ActiveCfg = Debug|x64
{667B789A-4E0A-4029-9AC3-F95559F26CB6}.Debug|x64.Build.0 = Debug|x64
{667B789A-4E0A-4029-9AC3-F95559F26CB6}.Debug|x86.ActiveCfg = Debug|Win32
{667B789A-4E0A-4029-9AC3-F95559F26CB6}.Debug|x86.Build.0 = Debug|Win32
{667B789A-4E0A-4029-9AC3-F95559F26CB6}.Release|x64.ActiveCfg = Release|x64
{667B789A-4E0A-4029-9AC3-F95559F26CB6}.Release|x64.Build.0 = Release|x64
{667B789A-4E0A-4029-9AC3-F95559F26CB6}.Release|x86.ActiveCfg = Release|Win32
{667B789A-4E0A-4029-9AC3-F95559F26CB6}.Release|x86.Build.0 = Release|Win32
{80754C14-4419-44A8-B8AB-D2C80134B8D0}.Debug|x64.ActiveCfg = Debug|x64
{80754C14-4419-44A8-B8AB-D2C80134B8D0}.Debug|x64.Build.0 = Debug|x64
{80754C14-4419-44A8-B8AB-D2C80134B8D0}.Debug|x86.ActiveCfg = Debug|Win32
{80754C14-4419-44A8-B8AB-D2C80134B8D0}.Debug|x86.Build.0 = Debug|Win32
{80754C14-4419-44A8-B8AB-D2C80134B8D0}.Release|x64.ActiveCfg = Release|x64
{80754C14-4419-44A8-B8AB-D2C80134B8D0}.Release|x64.Build.0 = Release|x64
{80754C14-4419-44A8-B8AB-D2C80134B8D0}.Release|x86.ActiveCfg = Release|Win32
{80754C14-4419-44A8-B8AB-D2C80134B8D0}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
74 changes: 74 additions & 0 deletions Sep1_1_Polygons/Sep1_1_Polygons.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
#include <gl/glut.h>

void display_hexagon_triangle();

int main(int argc, char* argv[])
{
// 1. init GLUT using CLI args
glutInit(&argc, argv);

// 2. Setup Size of openGL Window, display Mode
glutInitWindowSize(640, 640);
glutInitWindowPosition(50, 50);
glutInitDisplayMode(GLUT_RGB);

// 3. create a window
glutCreateWindow("Hello Teapot!");

// Set window background color
glClearColor(150, 150, 150, 255);

// 4. calling a call back function for looping into the rasterizer
glutDisplayFunc(display_hexagon_triangle);

// 5. Setup projection Window
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluOrtho2D(0, 640, 0, 640); //Set the coordinates of the "window" inside of the Graphics through which you will be able to see the objects in front via orthogonal projection
glPointSize(10);

// 6. Telling GLUT to loop into the callback
glutMainLoop();

return 0;
}

/// <summary>
/// Displays a Polygon (Hexagon) using Triangles
/// </summary>
void display_hexagon_triangle()
{
//Clear the Windows
glClear(GL_COLOR_BUFFER_BIT);

glBegin(GL_TRIANGLES);
glColor3f(0.0, 255.0, 0.0);
glVertex2d(320, 10);
glVertex2i(10, 206);
glVertex2d(620, 206);
glEnd();

glBegin(GL_TRIANGLES);
glColor3f(0.0, 0.0, 255.0);
glVertex2d(620, 206);
glVertex2i(10, 206);
glVertex2d(10, 412);
glEnd();

glBegin(GL_TRIANGLES);
glColor3f(255.0, 0.0, 0.0);
glVertex2d(620, 412);
glVertex2i(620, 206);
glVertex2d(10, 412);
glEnd();

glBegin(GL_TRIANGLES);
glColor3f(0.0, 150.0, 150.0);
glVertex2d(320, 630);
glVertex2i(620, 412);
glVertex2d(10, 412);
glEnd();

// Flush the drawing routines to the window (pushing drawing onto window)
glFlush();
}
147 changes: 147 additions & 0 deletions Sep1_1_Polygons/Sep1_1_Polygons.vcxproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>16.0</VCProjectVersion>
<Keyword>Win32Proj</Keyword>
<ProjectGuid>{3ef87408-6f98-4f32-b8b3-c2fd2dd1dd6c}</ProjectGuid>
<RootNamespace>Sep11Polygons</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="Sep1_1_Polygons.cpp" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
22 changes: 22 additions & 0 deletions Sep1_1_Polygons/Sep1_1_Polygons.vcxproj.filters
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="Sep1_1_Polygons.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>
Loading

0 comments on commit 245050a

Please sign in to comment.