vrheights

changeset 13:0168104ec568

- added new files to the vs project - fixed bug caused by LibOVR's failure to restore OpenGL state
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 04 Oct 2014 03:41:59 +0300
parents cb97ea43709b
children 25cab9e20c9c
files src/game.cc vrheights.sln vrheights.vcxproj vrheights.vcxproj.filters
diffstat 4 files changed, 50 insertions(+), 6 deletions(-) [+]
line diff
     1.1 --- a/src/game.cc	Fri Oct 03 23:11:43 2014 +0300
     1.2 +++ b/src/game.cc	Sat Oct 04 03:41:59 2014 +0300
     1.3 @@ -291,8 +291,7 @@
     1.4  
     1.5  	glMatrixMode(GL_MODELVIEW);
     1.6  
     1.7 -	/*
     1.8 -	glBindTexture(GL_TEXTURE_2D, chess_tex);
     1.9 +	/*glBindTexture(GL_TEXTURE_2D, chess_tex);
    1.10  	glEnable(GL_TEXTURE_2D);
    1.11  	material(1, 1, 1, 1);
    1.12  	glBegin(GL_QUADS);
    1.13 @@ -303,9 +302,8 @@
    1.14  	glTexCoord2f(0, 1); glVertex3f(-10, 0, -10);
    1.15  	glEnd();
    1.16  	glDisable(GL_TEXTURE_2D);
    1.17 -	*/
    1.18  
    1.19 -	/*material(1, 1, 1, 0.4);
    1.20 +	material(1, 1, 1, 0.4);
    1.21  	glPushMatrix();
    1.22  	glTranslatef(0, 1.3, -10);
    1.23  	glFrontFace(GL_CW);
    1.24 @@ -313,6 +311,9 @@
    1.25  	glFrontFace(GL_CCW);
    1.26  	glPopMatrix();*/
    1.27  
    1.28 +	glBindBuffer(GL_ARRAY_BUFFER, 0);
    1.29 +	glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
    1.30 +
    1.31  	for(size_t i=0; i<scn.obj.size(); i++) {
    1.32  		scn.obj[i]->draw();
    1.33  	}
     2.1 --- a/vrheights.sln	Fri Oct 03 23:11:43 2014 +0300
     2.2 +++ b/vrheights.sln	Sat Oct 04 03:41:59 2014 +0300
     2.3 @@ -19,4 +19,7 @@
     2.4  	GlobalSection(SolutionProperties) = preSolution
     2.5  		HideSolutionNode = FALSE
     2.6  	EndGlobalSection
     2.7 +	GlobalSection(Performance) = preSolution
     2.8 +		HasPerformanceSessions = true
     2.9 +	EndGlobalSection
    2.10  EndGlobal
     3.1 --- a/vrheights.vcxproj	Fri Oct 03 23:11:43 2014 +0300
     3.2 +++ b/vrheights.vcxproj	Sat Oct 04 03:41:59 2014 +0300
     3.3 @@ -57,7 +57,7 @@
     3.4      <Link>
     3.5        <SubSystem>Console</SubSystem>
     3.6        <GenerateDebugInformation>true</GenerateDebugInformation>
     3.7 -      <AdditionalDependencies>SDL2.lib;SDL2main.lib;opengl32.lib;glu32.lib;glew32.lib;libgoatvr.lib;libvmath.lib;libdrawtext.lib;%(AdditionalDependencies)</AdditionalDependencies>
     3.8 +      <AdditionalDependencies>SDL2.lib;SDL2main.lib;opengl32.lib;glu32.lib;glew32.lib;libgoatvr.lib;libvmath.lib;libimago2d.lib;libdrawtext.lib;goat3d.lib;zlib.lib;libpng.lib;jpeglib.lib;%(AdditionalDependencies)</AdditionalDependencies>
     3.9      </Link>
    3.10    </ItemDefinitionGroup>
    3.11    <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    3.12 @@ -76,7 +76,7 @@
    3.13        <GenerateDebugInformation>true</GenerateDebugInformation>
    3.14        <EnableCOMDATFolding>true</EnableCOMDATFolding>
    3.15        <OptimizeReferences>true</OptimizeReferences>
    3.16 -      <AdditionalDependencies>SDL2.lib;SDL2main.lib;opengl32.lib;glu32.lib;glew32.lib;libgoatvr.lib;libvmath.lib;libdrawtext.lib;%(AdditionalDependencies)</AdditionalDependencies>
    3.17 +      <AdditionalDependencies>SDL2.lib;SDL2main.lib;opengl32.lib;glu32.lib;glew32.lib;libgoatvr.lib;libvmath.lib;libimago2.lib;libdrawtext.lib;goat3d.lib;zlib.lib;libpng.lib;jpeglib.lib;%(AdditionalDependencies)</AdditionalDependencies>
    3.18      </Link>
    3.19    </ItemDefinitionGroup>
    3.20    <ItemGroup>
    3.21 @@ -85,17 +85,27 @@
    3.22      <ClCompile Include="src\game.cc" />
    3.23      <ClCompile Include="src\game_var.cc" />
    3.24      <ClCompile Include="src\main.cc" />
    3.25 +    <ClCompile Include="src\material.cc" />
    3.26 +    <ClCompile Include="src\mesh.cc" />
    3.27 +    <ClCompile Include="src\object.cc" />
    3.28      <ClCompile Include="src\opengl.cc" />
    3.29 +    <ClCompile Include="src\scenefile.cc" />
    3.30      <ClCompile Include="src\teapot.c" />
    3.31 +    <ClCompile Include="src\texman.cc" />
    3.32    </ItemGroup>
    3.33    <ItemGroup>
    3.34      <ClInclude Include="src\bezmath.h" />
    3.35      <ClInclude Include="src\console.h" />
    3.36      <ClInclude Include="src\game.h" />
    3.37      <ClInclude Include="src\game_var.h" />
    3.38 +    <ClInclude Include="src\material.h" />
    3.39 +    <ClInclude Include="src\mesh.h" />
    3.40 +    <ClInclude Include="src\object.h" />
    3.41      <ClInclude Include="src\opengl.h" />
    3.42 +    <ClInclude Include="src\scenefile.h" />
    3.43      <ClInclude Include="src\teapot.h" />
    3.44      <ClInclude Include="src\teapot_data.h" />
    3.45 +    <ClInclude Include="src\texman.h" />
    3.46    </ItemGroup>
    3.47    <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
    3.48    <ImportGroup Label="ExtensionTargets">
     4.1 --- a/vrheights.vcxproj.filters	Fri Oct 03 23:11:43 2014 +0300
     4.2 +++ b/vrheights.vcxproj.filters	Sat Oct 04 03:41:59 2014 +0300
     4.3 @@ -28,6 +28,21 @@
     4.4      <ClCompile Include="src\game_var.cc">
     4.5        <Filter>src</Filter>
     4.6      </ClCompile>
     4.7 +    <ClCompile Include="src\material.cc">
     4.8 +      <Filter>src</Filter>
     4.9 +    </ClCompile>
    4.10 +    <ClCompile Include="src\mesh.cc">
    4.11 +      <Filter>src</Filter>
    4.12 +    </ClCompile>
    4.13 +    <ClCompile Include="src\object.cc">
    4.14 +      <Filter>src</Filter>
    4.15 +    </ClCompile>
    4.16 +    <ClCompile Include="src\scenefile.cc">
    4.17 +      <Filter>src</Filter>
    4.18 +    </ClCompile>
    4.19 +    <ClCompile Include="src\texman.cc">
    4.20 +      <Filter>src</Filter>
    4.21 +    </ClCompile>
    4.22    </ItemGroup>
    4.23    <ItemGroup>
    4.24      <ClInclude Include="src\game.h">
    4.25 @@ -51,5 +66,20 @@
    4.26      <ClInclude Include="src\game_var.h">
    4.27        <Filter>src</Filter>
    4.28      </ClInclude>
    4.29 +    <ClInclude Include="src\material.h">
    4.30 +      <Filter>src</Filter>
    4.31 +    </ClInclude>
    4.32 +    <ClInclude Include="src\mesh.h">
    4.33 +      <Filter>src</Filter>
    4.34 +    </ClInclude>
    4.35 +    <ClInclude Include="src\object.h">
    4.36 +      <Filter>src</Filter>
    4.37 +    </ClInclude>
    4.38 +    <ClInclude Include="src\scenefile.h">
    4.39 +      <Filter>src</Filter>
    4.40 +    </ClInclude>
    4.41 +    <ClInclude Include="src\texman.h">
    4.42 +      <Filter>src</Filter>
    4.43 +    </ClInclude>
    4.44    </ItemGroup>
    4.45  </Project>
    4.46 \ No newline at end of file