mirror of
https://github.com/glfw/glfw.git
synced 2025-10-04 21:56:36 +00:00
添加fbo
This commit is contained in:
parent
9bdf900248
commit
e635a3fda4
258
build/GLFW.sln
258
build/GLFW.sln
@ -227,278 +227,530 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bingimg", "..\examples\bing
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pbo", "..\examples\PBO\pbo.vcxproj", "{62B99009-2DBC-47C0-AB00-26A4A9852CF7}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vbo", "..\examples\vbo\vbo.vcxproj", "{638BC033-44F0-40E8-AFBD-CF9BEB6094F9}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fbo", "..\examples\fbo\fbo.vcxproj", "{75F44874-65E9-4CE8-B3CE-F30840EE60C8}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fboblit", "..\examples\fboblit\fboblit.vcxproj", "{E3204FFB-321B-4043-B387-FE1B9DAE63CD}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fbodepth", "..\examples\fbodepth\fbodepth.vcxproj", "{487BB169-F91A-4436-BF55-68568636FE35}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fbomsaa", "..\examples\fbomsaa\fbomsaa.vcxproj", "{114E9625-4259-4C6E-84D1-F854FC0C4E28}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fbostencil", "..\examples\fbostencil\fbostencil.vcxproj", "{8F030B44-DFBF-4975-90ED-59815D2FC6B4}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Debug|x64 = Debug|x64
|
||||
MinSizeRel|Win32 = MinSizeRel|Win32
|
||||
MinSizeRel|x64 = MinSizeRel|x64
|
||||
Release|Win32 = Release|Win32
|
||||
Release|x64 = Release|x64
|
||||
RelWithDebInfo|Win32 = RelWithDebInfo|Win32
|
||||
RelWithDebInfo|x64 = RelWithDebInfo|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{3042EB17-D77C-36B1-8DA7-58E300C7D014}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{3042EB17-D77C-36B1-8DA7-58E300C7D014}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{3042EB17-D77C-36B1-8DA7-58E300C7D014}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{3042EB17-D77C-36B1-8DA7-58E300C7D014}.MinSizeRel|Win32.ActiveCfg = MinSizeRel|Win32
|
||||
{3042EB17-D77C-36B1-8DA7-58E300C7D014}.MinSizeRel|Win32.Build.0 = MinSizeRel|Win32
|
||||
{3042EB17-D77C-36B1-8DA7-58E300C7D014}.MinSizeRel|x64.ActiveCfg = MinSizeRel|Win32
|
||||
{3042EB17-D77C-36B1-8DA7-58E300C7D014}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{3042EB17-D77C-36B1-8DA7-58E300C7D014}.Release|Win32.Build.0 = Release|Win32
|
||||
{3042EB17-D77C-36B1-8DA7-58E300C7D014}.Release|x64.ActiveCfg = Release|Win32
|
||||
{3042EB17-D77C-36B1-8DA7-58E300C7D014}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|Win32
|
||||
{3042EB17-D77C-36B1-8DA7-58E300C7D014}.RelWithDebInfo|Win32.Build.0 = RelWithDebInfo|Win32
|
||||
{3042EB17-D77C-36B1-8DA7-58E300C7D014}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|Win32
|
||||
{0F3FF366-475E-3CE1-BF61-D64F1671BACD}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{0F3FF366-475E-3CE1-BF61-D64F1671BACD}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{0F3FF366-475E-3CE1-BF61-D64F1671BACD}.MinSizeRel|Win32.ActiveCfg = MinSizeRel|Win32
|
||||
{0F3FF366-475E-3CE1-BF61-D64F1671BACD}.MinSizeRel|x64.ActiveCfg = MinSizeRel|Win32
|
||||
{0F3FF366-475E-3CE1-BF61-D64F1671BACD}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{0F3FF366-475E-3CE1-BF61-D64F1671BACD}.Release|x64.ActiveCfg = Release|Win32
|
||||
{0F3FF366-475E-3CE1-BF61-D64F1671BACD}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|Win32
|
||||
{0F3FF366-475E-3CE1-BF61-D64F1671BACD}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|Win32
|
||||
{B9366857-E269-38DD-930D-FCA81100FA2A}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{B9366857-E269-38DD-930D-FCA81100FA2A}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{B9366857-E269-38DD-930D-FCA81100FA2A}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{B9366857-E269-38DD-930D-FCA81100FA2A}.MinSizeRel|Win32.ActiveCfg = MinSizeRel|Win32
|
||||
{B9366857-E269-38DD-930D-FCA81100FA2A}.MinSizeRel|Win32.Build.0 = MinSizeRel|Win32
|
||||
{B9366857-E269-38DD-930D-FCA81100FA2A}.MinSizeRel|x64.ActiveCfg = MinSizeRel|Win32
|
||||
{B9366857-E269-38DD-930D-FCA81100FA2A}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{B9366857-E269-38DD-930D-FCA81100FA2A}.Release|Win32.Build.0 = Release|Win32
|
||||
{B9366857-E269-38DD-930D-FCA81100FA2A}.Release|x64.ActiveCfg = Release|Win32
|
||||
{B9366857-E269-38DD-930D-FCA81100FA2A}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|Win32
|
||||
{B9366857-E269-38DD-930D-FCA81100FA2A}.RelWithDebInfo|Win32.Build.0 = RelWithDebInfo|Win32
|
||||
{B9366857-E269-38DD-930D-FCA81100FA2A}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|Win32
|
||||
{F10F5528-E882-31AA-9930-D37C023881C6}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{F10F5528-E882-31AA-9930-D37C023881C6}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{F10F5528-E882-31AA-9930-D37C023881C6}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{F10F5528-E882-31AA-9930-D37C023881C6}.MinSizeRel|Win32.ActiveCfg = MinSizeRel|Win32
|
||||
{F10F5528-E882-31AA-9930-D37C023881C6}.MinSizeRel|Win32.Build.0 = MinSizeRel|Win32
|
||||
{F10F5528-E882-31AA-9930-D37C023881C6}.MinSizeRel|x64.ActiveCfg = MinSizeRel|Win32
|
||||
{F10F5528-E882-31AA-9930-D37C023881C6}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{F10F5528-E882-31AA-9930-D37C023881C6}.Release|Win32.Build.0 = Release|Win32
|
||||
{F10F5528-E882-31AA-9930-D37C023881C6}.Release|x64.ActiveCfg = Release|Win32
|
||||
{F10F5528-E882-31AA-9930-D37C023881C6}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|Win32
|
||||
{F10F5528-E882-31AA-9930-D37C023881C6}.RelWithDebInfo|Win32.Build.0 = RelWithDebInfo|Win32
|
||||
{F10F5528-E882-31AA-9930-D37C023881C6}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|Win32
|
||||
{67F72FA8-D44E-394A-B4A5-56E48C7807AF}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{67F72FA8-D44E-394A-B4A5-56E48C7807AF}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{67F72FA8-D44E-394A-B4A5-56E48C7807AF}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{67F72FA8-D44E-394A-B4A5-56E48C7807AF}.MinSizeRel|Win32.ActiveCfg = MinSizeRel|Win32
|
||||
{67F72FA8-D44E-394A-B4A5-56E48C7807AF}.MinSizeRel|Win32.Build.0 = MinSizeRel|Win32
|
||||
{67F72FA8-D44E-394A-B4A5-56E48C7807AF}.MinSizeRel|x64.ActiveCfg = MinSizeRel|Win32
|
||||
{67F72FA8-D44E-394A-B4A5-56E48C7807AF}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{67F72FA8-D44E-394A-B4A5-56E48C7807AF}.Release|Win32.Build.0 = Release|Win32
|
||||
{67F72FA8-D44E-394A-B4A5-56E48C7807AF}.Release|x64.ActiveCfg = Release|Win32
|
||||
{67F72FA8-D44E-394A-B4A5-56E48C7807AF}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|Win32
|
||||
{67F72FA8-D44E-394A-B4A5-56E48C7807AF}.RelWithDebInfo|Win32.Build.0 = RelWithDebInfo|Win32
|
||||
{67F72FA8-D44E-394A-B4A5-56E48C7807AF}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|Win32
|
||||
{7A4F631D-9B72-3EDE-B0DC-CB56ED0C25AD}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{7A4F631D-9B72-3EDE-B0DC-CB56ED0C25AD}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{7A4F631D-9B72-3EDE-B0DC-CB56ED0C25AD}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{7A4F631D-9B72-3EDE-B0DC-CB56ED0C25AD}.MinSizeRel|Win32.ActiveCfg = MinSizeRel|Win32
|
||||
{7A4F631D-9B72-3EDE-B0DC-CB56ED0C25AD}.MinSizeRel|Win32.Build.0 = MinSizeRel|Win32
|
||||
{7A4F631D-9B72-3EDE-B0DC-CB56ED0C25AD}.MinSizeRel|x64.ActiveCfg = MinSizeRel|Win32
|
||||
{7A4F631D-9B72-3EDE-B0DC-CB56ED0C25AD}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{7A4F631D-9B72-3EDE-B0DC-CB56ED0C25AD}.Release|Win32.Build.0 = Release|Win32
|
||||
{7A4F631D-9B72-3EDE-B0DC-CB56ED0C25AD}.Release|x64.ActiveCfg = Release|Win32
|
||||
{7A4F631D-9B72-3EDE-B0DC-CB56ED0C25AD}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|Win32
|
||||
{7A4F631D-9B72-3EDE-B0DC-CB56ED0C25AD}.RelWithDebInfo|Win32.Build.0 = RelWithDebInfo|Win32
|
||||
{7A4F631D-9B72-3EDE-B0DC-CB56ED0C25AD}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|Win32
|
||||
{87FFC459-D05F-38EB-9643-2CF60771C4A1}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{87FFC459-D05F-38EB-9643-2CF60771C4A1}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{87FFC459-D05F-38EB-9643-2CF60771C4A1}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{87FFC459-D05F-38EB-9643-2CF60771C4A1}.MinSizeRel|Win32.ActiveCfg = MinSizeRel|Win32
|
||||
{87FFC459-D05F-38EB-9643-2CF60771C4A1}.MinSizeRel|Win32.Build.0 = MinSizeRel|Win32
|
||||
{87FFC459-D05F-38EB-9643-2CF60771C4A1}.MinSizeRel|x64.ActiveCfg = MinSizeRel|Win32
|
||||
{87FFC459-D05F-38EB-9643-2CF60771C4A1}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{87FFC459-D05F-38EB-9643-2CF60771C4A1}.Release|Win32.Build.0 = Release|Win32
|
||||
{87FFC459-D05F-38EB-9643-2CF60771C4A1}.Release|x64.ActiveCfg = Release|Win32
|
||||
{87FFC459-D05F-38EB-9643-2CF60771C4A1}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|Win32
|
||||
{87FFC459-D05F-38EB-9643-2CF60771C4A1}.RelWithDebInfo|Win32.Build.0 = RelWithDebInfo|Win32
|
||||
{87FFC459-D05F-38EB-9643-2CF60771C4A1}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|Win32
|
||||
{716097EF-41D9-3215-A39F-EB3490F8257E}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{716097EF-41D9-3215-A39F-EB3490F8257E}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{716097EF-41D9-3215-A39F-EB3490F8257E}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{716097EF-41D9-3215-A39F-EB3490F8257E}.MinSizeRel|Win32.ActiveCfg = MinSizeRel|Win32
|
||||
{716097EF-41D9-3215-A39F-EB3490F8257E}.MinSizeRel|Win32.Build.0 = MinSizeRel|Win32
|
||||
{716097EF-41D9-3215-A39F-EB3490F8257E}.MinSizeRel|x64.ActiveCfg = MinSizeRel|Win32
|
||||
{716097EF-41D9-3215-A39F-EB3490F8257E}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{716097EF-41D9-3215-A39F-EB3490F8257E}.Release|Win32.Build.0 = Release|Win32
|
||||
{716097EF-41D9-3215-A39F-EB3490F8257E}.Release|x64.ActiveCfg = Release|Win32
|
||||
{716097EF-41D9-3215-A39F-EB3490F8257E}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|Win32
|
||||
{716097EF-41D9-3215-A39F-EB3490F8257E}.RelWithDebInfo|Win32.Build.0 = RelWithDebInfo|Win32
|
||||
{716097EF-41D9-3215-A39F-EB3490F8257E}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|Win32
|
||||
{1079F819-F465-3AFF-972D-DE148EBB7F67}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{1079F819-F465-3AFF-972D-DE148EBB7F67}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{1079F819-F465-3AFF-972D-DE148EBB7F67}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{1079F819-F465-3AFF-972D-DE148EBB7F67}.MinSizeRel|Win32.ActiveCfg = MinSizeRel|Win32
|
||||
{1079F819-F465-3AFF-972D-DE148EBB7F67}.MinSizeRel|Win32.Build.0 = MinSizeRel|Win32
|
||||
{1079F819-F465-3AFF-972D-DE148EBB7F67}.MinSizeRel|x64.ActiveCfg = MinSizeRel|Win32
|
||||
{1079F819-F465-3AFF-972D-DE148EBB7F67}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{1079F819-F465-3AFF-972D-DE148EBB7F67}.Release|Win32.Build.0 = Release|Win32
|
||||
{1079F819-F465-3AFF-972D-DE148EBB7F67}.Release|x64.ActiveCfg = Release|Win32
|
||||
{1079F819-F465-3AFF-972D-DE148EBB7F67}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|Win32
|
||||
{1079F819-F465-3AFF-972D-DE148EBB7F67}.RelWithDebInfo|Win32.Build.0 = RelWithDebInfo|Win32
|
||||
{1079F819-F465-3AFF-972D-DE148EBB7F67}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|Win32
|
||||
{F6A140D4-5DBF-375A-B2F2-2081E9328BA7}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{F6A140D4-5DBF-375A-B2F2-2081E9328BA7}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{F6A140D4-5DBF-375A-B2F2-2081E9328BA7}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{F6A140D4-5DBF-375A-B2F2-2081E9328BA7}.MinSizeRel|Win32.ActiveCfg = MinSizeRel|Win32
|
||||
{F6A140D4-5DBF-375A-B2F2-2081E9328BA7}.MinSizeRel|Win32.Build.0 = MinSizeRel|Win32
|
||||
{F6A140D4-5DBF-375A-B2F2-2081E9328BA7}.MinSizeRel|x64.ActiveCfg = MinSizeRel|Win32
|
||||
{F6A140D4-5DBF-375A-B2F2-2081E9328BA7}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{F6A140D4-5DBF-375A-B2F2-2081E9328BA7}.Release|Win32.Build.0 = Release|Win32
|
||||
{F6A140D4-5DBF-375A-B2F2-2081E9328BA7}.Release|x64.ActiveCfg = Release|Win32
|
||||
{F6A140D4-5DBF-375A-B2F2-2081E9328BA7}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|Win32
|
||||
{F6A140D4-5DBF-375A-B2F2-2081E9328BA7}.RelWithDebInfo|Win32.Build.0 = RelWithDebInfo|Win32
|
||||
{F6A140D4-5DBF-375A-B2F2-2081E9328BA7}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|Win32
|
||||
{29C531EE-CECE-3140-A081-0232DAC4408C}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{29C531EE-CECE-3140-A081-0232DAC4408C}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{29C531EE-CECE-3140-A081-0232DAC4408C}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{29C531EE-CECE-3140-A081-0232DAC4408C}.MinSizeRel|Win32.ActiveCfg = MinSizeRel|Win32
|
||||
{29C531EE-CECE-3140-A081-0232DAC4408C}.MinSizeRel|Win32.Build.0 = MinSizeRel|Win32
|
||||
{29C531EE-CECE-3140-A081-0232DAC4408C}.MinSizeRel|x64.ActiveCfg = MinSizeRel|Win32
|
||||
{29C531EE-CECE-3140-A081-0232DAC4408C}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{29C531EE-CECE-3140-A081-0232DAC4408C}.Release|Win32.Build.0 = Release|Win32
|
||||
{29C531EE-CECE-3140-A081-0232DAC4408C}.Release|x64.ActiveCfg = Release|Win32
|
||||
{29C531EE-CECE-3140-A081-0232DAC4408C}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|Win32
|
||||
{29C531EE-CECE-3140-A081-0232DAC4408C}.RelWithDebInfo|Win32.Build.0 = RelWithDebInfo|Win32
|
||||
{29C531EE-CECE-3140-A081-0232DAC4408C}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|Win32
|
||||
{255170C7-C77A-3A5F-AB04-8F76D480CA65}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{255170C7-C77A-3A5F-AB04-8F76D480CA65}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{255170C7-C77A-3A5F-AB04-8F76D480CA65}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{255170C7-C77A-3A5F-AB04-8F76D480CA65}.MinSizeRel|Win32.ActiveCfg = MinSizeRel|Win32
|
||||
{255170C7-C77A-3A5F-AB04-8F76D480CA65}.MinSizeRel|Win32.Build.0 = MinSizeRel|Win32
|
||||
{255170C7-C77A-3A5F-AB04-8F76D480CA65}.MinSizeRel|x64.ActiveCfg = MinSizeRel|Win32
|
||||
{255170C7-C77A-3A5F-AB04-8F76D480CA65}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{255170C7-C77A-3A5F-AB04-8F76D480CA65}.Release|Win32.Build.0 = Release|Win32
|
||||
{255170C7-C77A-3A5F-AB04-8F76D480CA65}.Release|x64.ActiveCfg = Release|Win32
|
||||
{255170C7-C77A-3A5F-AB04-8F76D480CA65}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|Win32
|
||||
{255170C7-C77A-3A5F-AB04-8F76D480CA65}.RelWithDebInfo|Win32.Build.0 = RelWithDebInfo|Win32
|
||||
{255170C7-C77A-3A5F-AB04-8F76D480CA65}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|Win32
|
||||
{DD0AFCBD-441D-3D10-A583-9992604F938A}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{DD0AFCBD-441D-3D10-A583-9992604F938A}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{DD0AFCBD-441D-3D10-A583-9992604F938A}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{DD0AFCBD-441D-3D10-A583-9992604F938A}.MinSizeRel|Win32.ActiveCfg = MinSizeRel|Win32
|
||||
{DD0AFCBD-441D-3D10-A583-9992604F938A}.MinSizeRel|Win32.Build.0 = MinSizeRel|Win32
|
||||
{DD0AFCBD-441D-3D10-A583-9992604F938A}.MinSizeRel|x64.ActiveCfg = MinSizeRel|Win32
|
||||
{DD0AFCBD-441D-3D10-A583-9992604F938A}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{DD0AFCBD-441D-3D10-A583-9992604F938A}.Release|Win32.Build.0 = Release|Win32
|
||||
{DD0AFCBD-441D-3D10-A583-9992604F938A}.Release|x64.ActiveCfg = Release|Win32
|
||||
{DD0AFCBD-441D-3D10-A583-9992604F938A}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|Win32
|
||||
{DD0AFCBD-441D-3D10-A583-9992604F938A}.RelWithDebInfo|Win32.Build.0 = RelWithDebInfo|Win32
|
||||
{DD0AFCBD-441D-3D10-A583-9992604F938A}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|Win32
|
||||
{0278640F-0605-37BF-A764-0252AB2F0551}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{0278640F-0605-37BF-A764-0252AB2F0551}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{0278640F-0605-37BF-A764-0252AB2F0551}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{0278640F-0605-37BF-A764-0252AB2F0551}.MinSizeRel|Win32.ActiveCfg = MinSizeRel|Win32
|
||||
{0278640F-0605-37BF-A764-0252AB2F0551}.MinSizeRel|Win32.Build.0 = MinSizeRel|Win32
|
||||
{0278640F-0605-37BF-A764-0252AB2F0551}.MinSizeRel|x64.ActiveCfg = MinSizeRel|Win32
|
||||
{0278640F-0605-37BF-A764-0252AB2F0551}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{0278640F-0605-37BF-A764-0252AB2F0551}.Release|Win32.Build.0 = Release|Win32
|
||||
{0278640F-0605-37BF-A764-0252AB2F0551}.Release|x64.ActiveCfg = Release|Win32
|
||||
{0278640F-0605-37BF-A764-0252AB2F0551}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|Win32
|
||||
{0278640F-0605-37BF-A764-0252AB2F0551}.RelWithDebInfo|Win32.Build.0 = RelWithDebInfo|Win32
|
||||
{0278640F-0605-37BF-A764-0252AB2F0551}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|Win32
|
||||
{B63607AD-5376-3DF5-BD77-A50D32B0DBE0}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{B63607AD-5376-3DF5-BD77-A50D32B0DBE0}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{B63607AD-5376-3DF5-BD77-A50D32B0DBE0}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{B63607AD-5376-3DF5-BD77-A50D32B0DBE0}.MinSizeRel|Win32.ActiveCfg = MinSizeRel|Win32
|
||||
{B63607AD-5376-3DF5-BD77-A50D32B0DBE0}.MinSizeRel|Win32.Build.0 = MinSizeRel|Win32
|
||||
{B63607AD-5376-3DF5-BD77-A50D32B0DBE0}.MinSizeRel|x64.ActiveCfg = MinSizeRel|Win32
|
||||
{B63607AD-5376-3DF5-BD77-A50D32B0DBE0}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{B63607AD-5376-3DF5-BD77-A50D32B0DBE0}.Release|Win32.Build.0 = Release|Win32
|
||||
{B63607AD-5376-3DF5-BD77-A50D32B0DBE0}.Release|x64.ActiveCfg = Release|Win32
|
||||
{B63607AD-5376-3DF5-BD77-A50D32B0DBE0}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|Win32
|
||||
{B63607AD-5376-3DF5-BD77-A50D32B0DBE0}.RelWithDebInfo|Win32.Build.0 = RelWithDebInfo|Win32
|
||||
{B63607AD-5376-3DF5-BD77-A50D32B0DBE0}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|Win32
|
||||
{8555AB8F-C133-398E-A0C0-BE78F4B14852}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{8555AB8F-C133-398E-A0C0-BE78F4B14852}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{8555AB8F-C133-398E-A0C0-BE78F4B14852}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{8555AB8F-C133-398E-A0C0-BE78F4B14852}.MinSizeRel|Win32.ActiveCfg = MinSizeRel|Win32
|
||||
{8555AB8F-C133-398E-A0C0-BE78F4B14852}.MinSizeRel|Win32.Build.0 = MinSizeRel|Win32
|
||||
{8555AB8F-C133-398E-A0C0-BE78F4B14852}.MinSizeRel|x64.ActiveCfg = MinSizeRel|Win32
|
||||
{8555AB8F-C133-398E-A0C0-BE78F4B14852}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{8555AB8F-C133-398E-A0C0-BE78F4B14852}.Release|Win32.Build.0 = Release|Win32
|
||||
{8555AB8F-C133-398E-A0C0-BE78F4B14852}.Release|x64.ActiveCfg = Release|Win32
|
||||
{8555AB8F-C133-398E-A0C0-BE78F4B14852}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|Win32
|
||||
{8555AB8F-C133-398E-A0C0-BE78F4B14852}.RelWithDebInfo|Win32.Build.0 = RelWithDebInfo|Win32
|
||||
{8555AB8F-C133-398E-A0C0-BE78F4B14852}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|Win32
|
||||
{F4A89C5C-0B1F-32D5-B391-9CB1C2B79DC4}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{F4A89C5C-0B1F-32D5-B391-9CB1C2B79DC4}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{F4A89C5C-0B1F-32D5-B391-9CB1C2B79DC4}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{F4A89C5C-0B1F-32D5-B391-9CB1C2B79DC4}.MinSizeRel|Win32.ActiveCfg = MinSizeRel|Win32
|
||||
{F4A89C5C-0B1F-32D5-B391-9CB1C2B79DC4}.MinSizeRel|Win32.Build.0 = MinSizeRel|Win32
|
||||
{F4A89C5C-0B1F-32D5-B391-9CB1C2B79DC4}.MinSizeRel|x64.ActiveCfg = MinSizeRel|Win32
|
||||
{F4A89C5C-0B1F-32D5-B391-9CB1C2B79DC4}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{F4A89C5C-0B1F-32D5-B391-9CB1C2B79DC4}.Release|Win32.Build.0 = Release|Win32
|
||||
{F4A89C5C-0B1F-32D5-B391-9CB1C2B79DC4}.Release|x64.ActiveCfg = Release|Win32
|
||||
{F4A89C5C-0B1F-32D5-B391-9CB1C2B79DC4}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|Win32
|
||||
{F4A89C5C-0B1F-32D5-B391-9CB1C2B79DC4}.RelWithDebInfo|Win32.Build.0 = RelWithDebInfo|Win32
|
||||
{F4A89C5C-0B1F-32D5-B391-9CB1C2B79DC4}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|Win32
|
||||
{640F48AC-4651-3C55-8AF6-2ED88A7B81FD}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{640F48AC-4651-3C55-8AF6-2ED88A7B81FD}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{640F48AC-4651-3C55-8AF6-2ED88A7B81FD}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{640F48AC-4651-3C55-8AF6-2ED88A7B81FD}.MinSizeRel|Win32.ActiveCfg = MinSizeRel|Win32
|
||||
{640F48AC-4651-3C55-8AF6-2ED88A7B81FD}.MinSizeRel|Win32.Build.0 = MinSizeRel|Win32
|
||||
{640F48AC-4651-3C55-8AF6-2ED88A7B81FD}.MinSizeRel|x64.ActiveCfg = MinSizeRel|Win32
|
||||
{640F48AC-4651-3C55-8AF6-2ED88A7B81FD}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{640F48AC-4651-3C55-8AF6-2ED88A7B81FD}.Release|Win32.Build.0 = Release|Win32
|
||||
{640F48AC-4651-3C55-8AF6-2ED88A7B81FD}.Release|x64.ActiveCfg = Release|Win32
|
||||
{640F48AC-4651-3C55-8AF6-2ED88A7B81FD}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|Win32
|
||||
{640F48AC-4651-3C55-8AF6-2ED88A7B81FD}.RelWithDebInfo|Win32.Build.0 = RelWithDebInfo|Win32
|
||||
{640F48AC-4651-3C55-8AF6-2ED88A7B81FD}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|Win32
|
||||
{3EB9F998-D4A2-3B4F-80FE-192BD6DC95A8}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{3EB9F998-D4A2-3B4F-80FE-192BD6DC95A8}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{3EB9F998-D4A2-3B4F-80FE-192BD6DC95A8}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{3EB9F998-D4A2-3B4F-80FE-192BD6DC95A8}.MinSizeRel|Win32.ActiveCfg = MinSizeRel|Win32
|
||||
{3EB9F998-D4A2-3B4F-80FE-192BD6DC95A8}.MinSizeRel|Win32.Build.0 = MinSizeRel|Win32
|
||||
{3EB9F998-D4A2-3B4F-80FE-192BD6DC95A8}.MinSizeRel|x64.ActiveCfg = MinSizeRel|Win32
|
||||
{3EB9F998-D4A2-3B4F-80FE-192BD6DC95A8}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{3EB9F998-D4A2-3B4F-80FE-192BD6DC95A8}.Release|Win32.Build.0 = Release|Win32
|
||||
{3EB9F998-D4A2-3B4F-80FE-192BD6DC95A8}.Release|x64.ActiveCfg = Release|Win32
|
||||
{3EB9F998-D4A2-3B4F-80FE-192BD6DC95A8}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|Win32
|
||||
{3EB9F998-D4A2-3B4F-80FE-192BD6DC95A8}.RelWithDebInfo|Win32.Build.0 = RelWithDebInfo|Win32
|
||||
{3EB9F998-D4A2-3B4F-80FE-192BD6DC95A8}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|Win32
|
||||
{16717AAF-18DD-3EFA-9AE5-1B7B543F240F}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{16717AAF-18DD-3EFA-9AE5-1B7B543F240F}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{16717AAF-18DD-3EFA-9AE5-1B7B543F240F}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{16717AAF-18DD-3EFA-9AE5-1B7B543F240F}.MinSizeRel|Win32.ActiveCfg = MinSizeRel|Win32
|
||||
{16717AAF-18DD-3EFA-9AE5-1B7B543F240F}.MinSizeRel|Win32.Build.0 = MinSizeRel|Win32
|
||||
{16717AAF-18DD-3EFA-9AE5-1B7B543F240F}.MinSizeRel|x64.ActiveCfg = MinSizeRel|Win32
|
||||
{16717AAF-18DD-3EFA-9AE5-1B7B543F240F}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{16717AAF-18DD-3EFA-9AE5-1B7B543F240F}.Release|Win32.Build.0 = Release|Win32
|
||||
{16717AAF-18DD-3EFA-9AE5-1B7B543F240F}.Release|x64.ActiveCfg = Release|Win32
|
||||
{16717AAF-18DD-3EFA-9AE5-1B7B543F240F}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|Win32
|
||||
{16717AAF-18DD-3EFA-9AE5-1B7B543F240F}.RelWithDebInfo|Win32.Build.0 = RelWithDebInfo|Win32
|
||||
{16717AAF-18DD-3EFA-9AE5-1B7B543F240F}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|Win32
|
||||
{194F45C3-D972-36C3-868A-109F80FB256A}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{194F45C3-D972-36C3-868A-109F80FB256A}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{194F45C3-D972-36C3-868A-109F80FB256A}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{194F45C3-D972-36C3-868A-109F80FB256A}.MinSizeRel|Win32.ActiveCfg = MinSizeRel|Win32
|
||||
{194F45C3-D972-36C3-868A-109F80FB256A}.MinSizeRel|Win32.Build.0 = MinSizeRel|Win32
|
||||
{194F45C3-D972-36C3-868A-109F80FB256A}.MinSizeRel|x64.ActiveCfg = MinSizeRel|Win32
|
||||
{194F45C3-D972-36C3-868A-109F80FB256A}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{194F45C3-D972-36C3-868A-109F80FB256A}.Release|Win32.Build.0 = Release|Win32
|
||||
{194F45C3-D972-36C3-868A-109F80FB256A}.Release|x64.ActiveCfg = Release|Win32
|
||||
{194F45C3-D972-36C3-868A-109F80FB256A}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|Win32
|
||||
{194F45C3-D972-36C3-868A-109F80FB256A}.RelWithDebInfo|Win32.Build.0 = RelWithDebInfo|Win32
|
||||
{194F45C3-D972-36C3-868A-109F80FB256A}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|Win32
|
||||
{CE7E32A8-831B-3042-8C0B-8FE6AECB54F2}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{CE7E32A8-831B-3042-8C0B-8FE6AECB54F2}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{CE7E32A8-831B-3042-8C0B-8FE6AECB54F2}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{CE7E32A8-831B-3042-8C0B-8FE6AECB54F2}.MinSizeRel|Win32.ActiveCfg = MinSizeRel|Win32
|
||||
{CE7E32A8-831B-3042-8C0B-8FE6AECB54F2}.MinSizeRel|Win32.Build.0 = MinSizeRel|Win32
|
||||
{CE7E32A8-831B-3042-8C0B-8FE6AECB54F2}.MinSizeRel|x64.ActiveCfg = MinSizeRel|Win32
|
||||
{CE7E32A8-831B-3042-8C0B-8FE6AECB54F2}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{CE7E32A8-831B-3042-8C0B-8FE6AECB54F2}.Release|Win32.Build.0 = Release|Win32
|
||||
{CE7E32A8-831B-3042-8C0B-8FE6AECB54F2}.Release|x64.ActiveCfg = Release|Win32
|
||||
{CE7E32A8-831B-3042-8C0B-8FE6AECB54F2}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|Win32
|
||||
{CE7E32A8-831B-3042-8C0B-8FE6AECB54F2}.RelWithDebInfo|Win32.Build.0 = RelWithDebInfo|Win32
|
||||
{CE7E32A8-831B-3042-8C0B-8FE6AECB54F2}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|Win32
|
||||
{9C43F8C4-5F22-3C13-B252-A93E65118585}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{9C43F8C4-5F22-3C13-B252-A93E65118585}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{9C43F8C4-5F22-3C13-B252-A93E65118585}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{9C43F8C4-5F22-3C13-B252-A93E65118585}.MinSizeRel|Win32.ActiveCfg = MinSizeRel|Win32
|
||||
{9C43F8C4-5F22-3C13-B252-A93E65118585}.MinSizeRel|Win32.Build.0 = MinSizeRel|Win32
|
||||
{9C43F8C4-5F22-3C13-B252-A93E65118585}.MinSizeRel|x64.ActiveCfg = MinSizeRel|Win32
|
||||
{9C43F8C4-5F22-3C13-B252-A93E65118585}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{9C43F8C4-5F22-3C13-B252-A93E65118585}.Release|Win32.Build.0 = Release|Win32
|
||||
{9C43F8C4-5F22-3C13-B252-A93E65118585}.Release|x64.ActiveCfg = Release|Win32
|
||||
{9C43F8C4-5F22-3C13-B252-A93E65118585}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|Win32
|
||||
{9C43F8C4-5F22-3C13-B252-A93E65118585}.RelWithDebInfo|Win32.Build.0 = RelWithDebInfo|Win32
|
||||
{9C43F8C4-5F22-3C13-B252-A93E65118585}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|Win32
|
||||
{8A72BF57-9556-368D-AEC3-9382B8E44BCB}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{8A72BF57-9556-368D-AEC3-9382B8E44BCB}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{8A72BF57-9556-368D-AEC3-9382B8E44BCB}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{8A72BF57-9556-368D-AEC3-9382B8E44BCB}.MinSizeRel|Win32.ActiveCfg = MinSizeRel|Win32
|
||||
{8A72BF57-9556-368D-AEC3-9382B8E44BCB}.MinSizeRel|Win32.Build.0 = MinSizeRel|Win32
|
||||
{8A72BF57-9556-368D-AEC3-9382B8E44BCB}.MinSizeRel|x64.ActiveCfg = MinSizeRel|Win32
|
||||
{8A72BF57-9556-368D-AEC3-9382B8E44BCB}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{8A72BF57-9556-368D-AEC3-9382B8E44BCB}.Release|Win32.Build.0 = Release|Win32
|
||||
{8A72BF57-9556-368D-AEC3-9382B8E44BCB}.Release|x64.ActiveCfg = Release|Win32
|
||||
{8A72BF57-9556-368D-AEC3-9382B8E44BCB}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|Win32
|
||||
{8A72BF57-9556-368D-AEC3-9382B8E44BCB}.RelWithDebInfo|Win32.Build.0 = RelWithDebInfo|Win32
|
||||
{8A72BF57-9556-368D-AEC3-9382B8E44BCB}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|Win32
|
||||
{3C856484-5382-3050-B4AF-4AE752976313}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{3C856484-5382-3050-B4AF-4AE752976313}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{3C856484-5382-3050-B4AF-4AE752976313}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{3C856484-5382-3050-B4AF-4AE752976313}.MinSizeRel|Win32.ActiveCfg = MinSizeRel|Win32
|
||||
{3C856484-5382-3050-B4AF-4AE752976313}.MinSizeRel|Win32.Build.0 = MinSizeRel|Win32
|
||||
{3C856484-5382-3050-B4AF-4AE752976313}.MinSizeRel|x64.ActiveCfg = MinSizeRel|Win32
|
||||
{3C856484-5382-3050-B4AF-4AE752976313}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{3C856484-5382-3050-B4AF-4AE752976313}.Release|Win32.Build.0 = Release|Win32
|
||||
{3C856484-5382-3050-B4AF-4AE752976313}.Release|x64.ActiveCfg = Release|Win32
|
||||
{3C856484-5382-3050-B4AF-4AE752976313}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|Win32
|
||||
{3C856484-5382-3050-B4AF-4AE752976313}.RelWithDebInfo|Win32.Build.0 = RelWithDebInfo|Win32
|
||||
{3C856484-5382-3050-B4AF-4AE752976313}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|Win32
|
||||
{37EBACD4-6063-3D1E-9510-58D49DB69D6D}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{37EBACD4-6063-3D1E-9510-58D49DB69D6D}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{37EBACD4-6063-3D1E-9510-58D49DB69D6D}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{37EBACD4-6063-3D1E-9510-58D49DB69D6D}.MinSizeRel|Win32.ActiveCfg = MinSizeRel|Win32
|
||||
{37EBACD4-6063-3D1E-9510-58D49DB69D6D}.MinSizeRel|Win32.Build.0 = MinSizeRel|Win32
|
||||
{37EBACD4-6063-3D1E-9510-58D49DB69D6D}.MinSizeRel|x64.ActiveCfg = MinSizeRel|Win32
|
||||
{37EBACD4-6063-3D1E-9510-58D49DB69D6D}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{37EBACD4-6063-3D1E-9510-58D49DB69D6D}.Release|Win32.Build.0 = Release|Win32
|
||||
{37EBACD4-6063-3D1E-9510-58D49DB69D6D}.Release|x64.ActiveCfg = Release|Win32
|
||||
{37EBACD4-6063-3D1E-9510-58D49DB69D6D}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|Win32
|
||||
{37EBACD4-6063-3D1E-9510-58D49DB69D6D}.RelWithDebInfo|Win32.Build.0 = RelWithDebInfo|Win32
|
||||
{37EBACD4-6063-3D1E-9510-58D49DB69D6D}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|Win32
|
||||
{393A4E3C-4A8C-3B03-BF04-1F118B66B500}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{393A4E3C-4A8C-3B03-BF04-1F118B66B500}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{393A4E3C-4A8C-3B03-BF04-1F118B66B500}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{393A4E3C-4A8C-3B03-BF04-1F118B66B500}.MinSizeRel|Win32.ActiveCfg = MinSizeRel|Win32
|
||||
{393A4E3C-4A8C-3B03-BF04-1F118B66B500}.MinSizeRel|Win32.Build.0 = MinSizeRel|Win32
|
||||
{393A4E3C-4A8C-3B03-BF04-1F118B66B500}.MinSizeRel|x64.ActiveCfg = MinSizeRel|Win32
|
||||
{393A4E3C-4A8C-3B03-BF04-1F118B66B500}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{393A4E3C-4A8C-3B03-BF04-1F118B66B500}.Release|Win32.Build.0 = Release|Win32
|
||||
{393A4E3C-4A8C-3B03-BF04-1F118B66B500}.Release|x64.ActiveCfg = Release|Win32
|
||||
{393A4E3C-4A8C-3B03-BF04-1F118B66B500}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|Win32
|
||||
{393A4E3C-4A8C-3B03-BF04-1F118B66B500}.RelWithDebInfo|Win32.Build.0 = RelWithDebInfo|Win32
|
||||
{393A4E3C-4A8C-3B03-BF04-1F118B66B500}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|Win32
|
||||
{735C4D57-AFF0-3B45-BAA4-5171371D143D}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{735C4D57-AFF0-3B45-BAA4-5171371D143D}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{735C4D57-AFF0-3B45-BAA4-5171371D143D}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{735C4D57-AFF0-3B45-BAA4-5171371D143D}.MinSizeRel|Win32.ActiveCfg = MinSizeRel|Win32
|
||||
{735C4D57-AFF0-3B45-BAA4-5171371D143D}.MinSizeRel|Win32.Build.0 = MinSizeRel|Win32
|
||||
{735C4D57-AFF0-3B45-BAA4-5171371D143D}.MinSizeRel|x64.ActiveCfg = MinSizeRel|Win32
|
||||
{735C4D57-AFF0-3B45-BAA4-5171371D143D}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{735C4D57-AFF0-3B45-BAA4-5171371D143D}.Release|Win32.Build.0 = Release|Win32
|
||||
{735C4D57-AFF0-3B45-BAA4-5171371D143D}.Release|x64.ActiveCfg = Release|Win32
|
||||
{735C4D57-AFF0-3B45-BAA4-5171371D143D}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|Win32
|
||||
{735C4D57-AFF0-3B45-BAA4-5171371D143D}.RelWithDebInfo|Win32.Build.0 = RelWithDebInfo|Win32
|
||||
{735C4D57-AFF0-3B45-BAA4-5171371D143D}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|Win32
|
||||
{64F112EE-E6D6-3BAA-8A8F-E5D34EF84DF5}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{64F112EE-E6D6-3BAA-8A8F-E5D34EF84DF5}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{64F112EE-E6D6-3BAA-8A8F-E5D34EF84DF5}.MinSizeRel|Win32.ActiveCfg = MinSizeRel|Win32
|
||||
{64F112EE-E6D6-3BAA-8A8F-E5D34EF84DF5}.MinSizeRel|x64.ActiveCfg = MinSizeRel|Win32
|
||||
{64F112EE-E6D6-3BAA-8A8F-E5D34EF84DF5}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{64F112EE-E6D6-3BAA-8A8F-E5D34EF84DF5}.Release|x64.ActiveCfg = Release|Win32
|
||||
{64F112EE-E6D6-3BAA-8A8F-E5D34EF84DF5}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|Win32
|
||||
{64F112EE-E6D6-3BAA-8A8F-E5D34EF84DF5}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|Win32
|
||||
{88488E22-D2A8-3924-A776-6DB80C9B2AB0}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{88488E22-D2A8-3924-A776-6DB80C9B2AB0}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{88488E22-D2A8-3924-A776-6DB80C9B2AB0}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{88488E22-D2A8-3924-A776-6DB80C9B2AB0}.MinSizeRel|Win32.ActiveCfg = MinSizeRel|Win32
|
||||
{88488E22-D2A8-3924-A776-6DB80C9B2AB0}.MinSizeRel|Win32.Build.0 = MinSizeRel|Win32
|
||||
{88488E22-D2A8-3924-A776-6DB80C9B2AB0}.MinSizeRel|x64.ActiveCfg = MinSizeRel|Win32
|
||||
{88488E22-D2A8-3924-A776-6DB80C9B2AB0}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{88488E22-D2A8-3924-A776-6DB80C9B2AB0}.Release|Win32.Build.0 = Release|Win32
|
||||
{88488E22-D2A8-3924-A776-6DB80C9B2AB0}.Release|x64.ActiveCfg = Release|Win32
|
||||
{88488E22-D2A8-3924-A776-6DB80C9B2AB0}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|Win32
|
||||
{88488E22-D2A8-3924-A776-6DB80C9B2AB0}.RelWithDebInfo|Win32.Build.0 = RelWithDebInfo|Win32
|
||||
{88488E22-D2A8-3924-A776-6DB80C9B2AB0}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|Win32
|
||||
{23BC8F58-A6CB-3A24-AD7C-CC891268500C}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{23BC8F58-A6CB-3A24-AD7C-CC891268500C}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{23BC8F58-A6CB-3A24-AD7C-CC891268500C}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{23BC8F58-A6CB-3A24-AD7C-CC891268500C}.MinSizeRel|Win32.ActiveCfg = MinSizeRel|Win32
|
||||
{23BC8F58-A6CB-3A24-AD7C-CC891268500C}.MinSizeRel|Win32.Build.0 = MinSizeRel|Win32
|
||||
{23BC8F58-A6CB-3A24-AD7C-CC891268500C}.MinSizeRel|x64.ActiveCfg = MinSizeRel|Win32
|
||||
{23BC8F58-A6CB-3A24-AD7C-CC891268500C}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{23BC8F58-A6CB-3A24-AD7C-CC891268500C}.Release|Win32.Build.0 = Release|Win32
|
||||
{23BC8F58-A6CB-3A24-AD7C-CC891268500C}.Release|x64.ActiveCfg = Release|Win32
|
||||
{23BC8F58-A6CB-3A24-AD7C-CC891268500C}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|Win32
|
||||
{23BC8F58-A6CB-3A24-AD7C-CC891268500C}.RelWithDebInfo|Win32.Build.0 = RelWithDebInfo|Win32
|
||||
{23BC8F58-A6CB-3A24-AD7C-CC891268500C}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|Win32
|
||||
{52AF0E89-854D-3CB3-BF56-AADB00529895}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{52AF0E89-854D-3CB3-BF56-AADB00529895}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{52AF0E89-854D-3CB3-BF56-AADB00529895}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{52AF0E89-854D-3CB3-BF56-AADB00529895}.MinSizeRel|Win32.ActiveCfg = MinSizeRel|Win32
|
||||
{52AF0E89-854D-3CB3-BF56-AADB00529895}.MinSizeRel|Win32.Build.0 = MinSizeRel|Win32
|
||||
{52AF0E89-854D-3CB3-BF56-AADB00529895}.MinSizeRel|x64.ActiveCfg = MinSizeRel|Win32
|
||||
{52AF0E89-854D-3CB3-BF56-AADB00529895}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{52AF0E89-854D-3CB3-BF56-AADB00529895}.Release|Win32.Build.0 = Release|Win32
|
||||
{52AF0E89-854D-3CB3-BF56-AADB00529895}.Release|x64.ActiveCfg = Release|Win32
|
||||
{52AF0E89-854D-3CB3-BF56-AADB00529895}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|Win32
|
||||
{52AF0E89-854D-3CB3-BF56-AADB00529895}.RelWithDebInfo|Win32.Build.0 = RelWithDebInfo|Win32
|
||||
{52AF0E89-854D-3CB3-BF56-AADB00529895}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|Win32
|
||||
{883F0787-AB9B-4E59-860D-0E032D806318}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{883F0787-AB9B-4E59-860D-0E032D806318}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{883F0787-AB9B-4E59-860D-0E032D806318}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{883F0787-AB9B-4E59-860D-0E032D806318}.MinSizeRel|Win32.ActiveCfg = MinSizeRel|Win32
|
||||
{883F0787-AB9B-4E59-860D-0E032D806318}.MinSizeRel|Win32.Build.0 = MinSizeRel|Win32
|
||||
{883F0787-AB9B-4E59-860D-0E032D806318}.MinSizeRel|x64.ActiveCfg = MinSizeRel|Win32
|
||||
{883F0787-AB9B-4E59-860D-0E032D806318}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{883F0787-AB9B-4E59-860D-0E032D806318}.Release|Win32.Build.0 = Release|Win32
|
||||
{883F0787-AB9B-4E59-860D-0E032D806318}.Release|x64.ActiveCfg = Release|Win32
|
||||
{883F0787-AB9B-4E59-860D-0E032D806318}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|Win32
|
||||
{883F0787-AB9B-4E59-860D-0E032D806318}.RelWithDebInfo|Win32.Build.0 = RelWithDebInfo|Win32
|
||||
{883F0787-AB9B-4E59-860D-0E032D806318}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|Win32
|
||||
{62B99009-2DBC-47C0-AB00-26A4A9852CF7}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{62B99009-2DBC-47C0-AB00-26A4A9852CF7}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{62B99009-2DBC-47C0-AB00-26A4A9852CF7}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{62B99009-2DBC-47C0-AB00-26A4A9852CF7}.Debug|x64.Build.0 = Debug|x64
|
||||
{62B99009-2DBC-47C0-AB00-26A4A9852CF7}.MinSizeRel|Win32.ActiveCfg = Release|Win32
|
||||
{62B99009-2DBC-47C0-AB00-26A4A9852CF7}.MinSizeRel|Win32.Build.0 = Release|Win32
|
||||
{62B99009-2DBC-47C0-AB00-26A4A9852CF7}.MinSizeRel|x64.ActiveCfg = Release|x64
|
||||
{62B99009-2DBC-47C0-AB00-26A4A9852CF7}.MinSizeRel|x64.Build.0 = Release|x64
|
||||
{62B99009-2DBC-47C0-AB00-26A4A9852CF7}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{62B99009-2DBC-47C0-AB00-26A4A9852CF7}.Release|Win32.Build.0 = Release|Win32
|
||||
{62B99009-2DBC-47C0-AB00-26A4A9852CF7}.Release|x64.ActiveCfg = Release|x64
|
||||
{62B99009-2DBC-47C0-AB00-26A4A9852CF7}.Release|x64.Build.0 = Release|x64
|
||||
{62B99009-2DBC-47C0-AB00-26A4A9852CF7}.RelWithDebInfo|Win32.ActiveCfg = Release|Win32
|
||||
{62B99009-2DBC-47C0-AB00-26A4A9852CF7}.RelWithDebInfo|Win32.Build.0 = Release|Win32
|
||||
{62B99009-2DBC-47C0-AB00-26A4A9852CF7}.RelWithDebInfo|x64.ActiveCfg = Release|x64
|
||||
{62B99009-2DBC-47C0-AB00-26A4A9852CF7}.RelWithDebInfo|x64.Build.0 = Release|x64
|
||||
{638BC033-44F0-40E8-AFBD-CF9BEB6094F9}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{638BC033-44F0-40E8-AFBD-CF9BEB6094F9}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{638BC033-44F0-40E8-AFBD-CF9BEB6094F9}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{638BC033-44F0-40E8-AFBD-CF9BEB6094F9}.Debug|x64.Build.0 = Debug|x64
|
||||
{638BC033-44F0-40E8-AFBD-CF9BEB6094F9}.MinSizeRel|Win32.ActiveCfg = Release|Win32
|
||||
{638BC033-44F0-40E8-AFBD-CF9BEB6094F9}.MinSizeRel|Win32.Build.0 = Release|Win32
|
||||
{638BC033-44F0-40E8-AFBD-CF9BEB6094F9}.MinSizeRel|x64.ActiveCfg = Release|x64
|
||||
{638BC033-44F0-40E8-AFBD-CF9BEB6094F9}.MinSizeRel|x64.Build.0 = Release|x64
|
||||
{638BC033-44F0-40E8-AFBD-CF9BEB6094F9}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{638BC033-44F0-40E8-AFBD-CF9BEB6094F9}.Release|Win32.Build.0 = Release|Win32
|
||||
{638BC033-44F0-40E8-AFBD-CF9BEB6094F9}.Release|x64.ActiveCfg = Release|x64
|
||||
{638BC033-44F0-40E8-AFBD-CF9BEB6094F9}.Release|x64.Build.0 = Release|x64
|
||||
{638BC033-44F0-40E8-AFBD-CF9BEB6094F9}.RelWithDebInfo|Win32.ActiveCfg = Release|Win32
|
||||
{638BC033-44F0-40E8-AFBD-CF9BEB6094F9}.RelWithDebInfo|Win32.Build.0 = Release|Win32
|
||||
{638BC033-44F0-40E8-AFBD-CF9BEB6094F9}.RelWithDebInfo|x64.ActiveCfg = Release|x64
|
||||
{638BC033-44F0-40E8-AFBD-CF9BEB6094F9}.RelWithDebInfo|x64.Build.0 = Release|x64
|
||||
{75F44874-65E9-4CE8-B3CE-F30840EE60C8}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{75F44874-65E9-4CE8-B3CE-F30840EE60C8}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{75F44874-65E9-4CE8-B3CE-F30840EE60C8}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{75F44874-65E9-4CE8-B3CE-F30840EE60C8}.Debug|x64.Build.0 = Debug|x64
|
||||
{75F44874-65E9-4CE8-B3CE-F30840EE60C8}.MinSizeRel|Win32.ActiveCfg = Release|Win32
|
||||
{75F44874-65E9-4CE8-B3CE-F30840EE60C8}.MinSizeRel|Win32.Build.0 = Release|Win32
|
||||
{75F44874-65E9-4CE8-B3CE-F30840EE60C8}.MinSizeRel|x64.ActiveCfg = Release|x64
|
||||
{75F44874-65E9-4CE8-B3CE-F30840EE60C8}.MinSizeRel|x64.Build.0 = Release|x64
|
||||
{75F44874-65E9-4CE8-B3CE-F30840EE60C8}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{75F44874-65E9-4CE8-B3CE-F30840EE60C8}.Release|Win32.Build.0 = Release|Win32
|
||||
{75F44874-65E9-4CE8-B3CE-F30840EE60C8}.Release|x64.ActiveCfg = Release|x64
|
||||
{75F44874-65E9-4CE8-B3CE-F30840EE60C8}.Release|x64.Build.0 = Release|x64
|
||||
{75F44874-65E9-4CE8-B3CE-F30840EE60C8}.RelWithDebInfo|Win32.ActiveCfg = Release|Win32
|
||||
{75F44874-65E9-4CE8-B3CE-F30840EE60C8}.RelWithDebInfo|Win32.Build.0 = Release|Win32
|
||||
{75F44874-65E9-4CE8-B3CE-F30840EE60C8}.RelWithDebInfo|x64.ActiveCfg = Release|x64
|
||||
{75F44874-65E9-4CE8-B3CE-F30840EE60C8}.RelWithDebInfo|x64.Build.0 = Release|x64
|
||||
{E3204FFB-321B-4043-B387-FE1B9DAE63CD}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{E3204FFB-321B-4043-B387-FE1B9DAE63CD}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{E3204FFB-321B-4043-B387-FE1B9DAE63CD}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{E3204FFB-321B-4043-B387-FE1B9DAE63CD}.Debug|x64.Build.0 = Debug|x64
|
||||
{E3204FFB-321B-4043-B387-FE1B9DAE63CD}.MinSizeRel|Win32.ActiveCfg = Release|Win32
|
||||
{E3204FFB-321B-4043-B387-FE1B9DAE63CD}.MinSizeRel|Win32.Build.0 = Release|Win32
|
||||
{E3204FFB-321B-4043-B387-FE1B9DAE63CD}.MinSizeRel|x64.ActiveCfg = Release|x64
|
||||
{E3204FFB-321B-4043-B387-FE1B9DAE63CD}.MinSizeRel|x64.Build.0 = Release|x64
|
||||
{E3204FFB-321B-4043-B387-FE1B9DAE63CD}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{E3204FFB-321B-4043-B387-FE1B9DAE63CD}.Release|Win32.Build.0 = Release|Win32
|
||||
{E3204FFB-321B-4043-B387-FE1B9DAE63CD}.Release|x64.ActiveCfg = Release|x64
|
||||
{E3204FFB-321B-4043-B387-FE1B9DAE63CD}.Release|x64.Build.0 = Release|x64
|
||||
{E3204FFB-321B-4043-B387-FE1B9DAE63CD}.RelWithDebInfo|Win32.ActiveCfg = Release|Win32
|
||||
{E3204FFB-321B-4043-B387-FE1B9DAE63CD}.RelWithDebInfo|Win32.Build.0 = Release|Win32
|
||||
{E3204FFB-321B-4043-B387-FE1B9DAE63CD}.RelWithDebInfo|x64.ActiveCfg = Release|x64
|
||||
{E3204FFB-321B-4043-B387-FE1B9DAE63CD}.RelWithDebInfo|x64.Build.0 = Release|x64
|
||||
{487BB169-F91A-4436-BF55-68568636FE35}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{487BB169-F91A-4436-BF55-68568636FE35}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{487BB169-F91A-4436-BF55-68568636FE35}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{487BB169-F91A-4436-BF55-68568636FE35}.Debug|x64.Build.0 = Debug|x64
|
||||
{487BB169-F91A-4436-BF55-68568636FE35}.MinSizeRel|Win32.ActiveCfg = Release|Win32
|
||||
{487BB169-F91A-4436-BF55-68568636FE35}.MinSizeRel|Win32.Build.0 = Release|Win32
|
||||
{487BB169-F91A-4436-BF55-68568636FE35}.MinSizeRel|x64.ActiveCfg = Release|x64
|
||||
{487BB169-F91A-4436-BF55-68568636FE35}.MinSizeRel|x64.Build.0 = Release|x64
|
||||
{487BB169-F91A-4436-BF55-68568636FE35}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{487BB169-F91A-4436-BF55-68568636FE35}.Release|Win32.Build.0 = Release|Win32
|
||||
{487BB169-F91A-4436-BF55-68568636FE35}.Release|x64.ActiveCfg = Release|x64
|
||||
{487BB169-F91A-4436-BF55-68568636FE35}.Release|x64.Build.0 = Release|x64
|
||||
{487BB169-F91A-4436-BF55-68568636FE35}.RelWithDebInfo|Win32.ActiveCfg = Release|Win32
|
||||
{487BB169-F91A-4436-BF55-68568636FE35}.RelWithDebInfo|Win32.Build.0 = Release|Win32
|
||||
{487BB169-F91A-4436-BF55-68568636FE35}.RelWithDebInfo|x64.ActiveCfg = Release|x64
|
||||
{487BB169-F91A-4436-BF55-68568636FE35}.RelWithDebInfo|x64.Build.0 = Release|x64
|
||||
{114E9625-4259-4C6E-84D1-F854FC0C4E28}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{114E9625-4259-4C6E-84D1-F854FC0C4E28}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{114E9625-4259-4C6E-84D1-F854FC0C4E28}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{114E9625-4259-4C6E-84D1-F854FC0C4E28}.Debug|x64.Build.0 = Debug|x64
|
||||
{114E9625-4259-4C6E-84D1-F854FC0C4E28}.MinSizeRel|Win32.ActiveCfg = Release|Win32
|
||||
{114E9625-4259-4C6E-84D1-F854FC0C4E28}.MinSizeRel|Win32.Build.0 = Release|Win32
|
||||
{114E9625-4259-4C6E-84D1-F854FC0C4E28}.MinSizeRel|x64.ActiveCfg = Release|x64
|
||||
{114E9625-4259-4C6E-84D1-F854FC0C4E28}.MinSizeRel|x64.Build.0 = Release|x64
|
||||
{114E9625-4259-4C6E-84D1-F854FC0C4E28}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{114E9625-4259-4C6E-84D1-F854FC0C4E28}.Release|Win32.Build.0 = Release|Win32
|
||||
{114E9625-4259-4C6E-84D1-F854FC0C4E28}.Release|x64.ActiveCfg = Release|x64
|
||||
{114E9625-4259-4C6E-84D1-F854FC0C4E28}.Release|x64.Build.0 = Release|x64
|
||||
{114E9625-4259-4C6E-84D1-F854FC0C4E28}.RelWithDebInfo|Win32.ActiveCfg = Release|Win32
|
||||
{114E9625-4259-4C6E-84D1-F854FC0C4E28}.RelWithDebInfo|Win32.Build.0 = Release|Win32
|
||||
{114E9625-4259-4C6E-84D1-F854FC0C4E28}.RelWithDebInfo|x64.ActiveCfg = Release|x64
|
||||
{114E9625-4259-4C6E-84D1-F854FC0C4E28}.RelWithDebInfo|x64.Build.0 = Release|x64
|
||||
{8F030B44-DFBF-4975-90ED-59815D2FC6B4}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{8F030B44-DFBF-4975-90ED-59815D2FC6B4}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{8F030B44-DFBF-4975-90ED-59815D2FC6B4}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{8F030B44-DFBF-4975-90ED-59815D2FC6B4}.Debug|x64.Build.0 = Debug|x64
|
||||
{8F030B44-DFBF-4975-90ED-59815D2FC6B4}.MinSizeRel|Win32.ActiveCfg = Release|Win32
|
||||
{8F030B44-DFBF-4975-90ED-59815D2FC6B4}.MinSizeRel|Win32.Build.0 = Release|Win32
|
||||
{8F030B44-DFBF-4975-90ED-59815D2FC6B4}.MinSizeRel|x64.ActiveCfg = Release|x64
|
||||
{8F030B44-DFBF-4975-90ED-59815D2FC6B4}.MinSizeRel|x64.Build.0 = Release|x64
|
||||
{8F030B44-DFBF-4975-90ED-59815D2FC6B4}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{8F030B44-DFBF-4975-90ED-59815D2FC6B4}.Release|Win32.Build.0 = Release|Win32
|
||||
{8F030B44-DFBF-4975-90ED-59815D2FC6B4}.Release|x64.ActiveCfg = Release|x64
|
||||
{8F030B44-DFBF-4975-90ED-59815D2FC6B4}.Release|x64.Build.0 = Release|x64
|
||||
{8F030B44-DFBF-4975-90ED-59815D2FC6B4}.RelWithDebInfo|Win32.ActiveCfg = Release|Win32
|
||||
{8F030B44-DFBF-4975-90ED-59815D2FC6B4}.RelWithDebInfo|Win32.Build.0 = Release|Win32
|
||||
{8F030B44-DFBF-4975-90ED-59815D2FC6B4}.RelWithDebInfo|x64.ActiveCfg = Release|x64
|
||||
{8F030B44-DFBF-4975-90ED-59815D2FC6B4}.RelWithDebInfo|x64.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
@ -539,5 +791,11 @@ Global
|
||||
{52AF0E89-854D-3CB3-BF56-AADB00529895} = {CB51A66F-4944-3276-BB4F-E5C39A387294}
|
||||
{883F0787-AB9B-4E59-860D-0E032D806318} = {46666672-CE20-3D1B-9180-1909006B3676}
|
||||
{62B99009-2DBC-47C0-AB00-26A4A9852CF7} = {46666672-CE20-3D1B-9180-1909006B3676}
|
||||
{638BC033-44F0-40E8-AFBD-CF9BEB6094F9} = {46666672-CE20-3D1B-9180-1909006B3676}
|
||||
{75F44874-65E9-4CE8-B3CE-F30840EE60C8} = {46666672-CE20-3D1B-9180-1909006B3676}
|
||||
{E3204FFB-321B-4043-B387-FE1B9DAE63CD} = {46666672-CE20-3D1B-9180-1909006B3676}
|
||||
{487BB169-F91A-4436-BF55-68568636FE35} = {46666672-CE20-3D1B-9180-1909006B3676}
|
||||
{114E9625-4259-4C6E-84D1-F854FC0C4E28} = {46666672-CE20-3D1B-9180-1909006B3676}
|
||||
{8F030B44-DFBF-4975-90ED-59815D2FC6B4} = {46666672-CE20-3D1B-9180-1909006B3676}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
132
examples/fbo/Timer.cpp
Normal file
132
examples/fbo/Timer.cpp
Normal file
@ -0,0 +1,132 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// Timer.cpp
|
||||
// =========
|
||||
// High Resolution Timer.
|
||||
// This timer is able to measure the elapsed time with 1 micro-second accuracy
|
||||
// in both Windows, Linux and Unix system
|
||||
//
|
||||
// AUTHOR: Song Ho Ahn (song.ahn@gmail.com)
|
||||
// CREATED: 2003-01-13
|
||||
// UPDATED: 2017-03-30
|
||||
//
|
||||
// Copyright (c) 2003 Song Ho Ahn
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "Timer.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// constructor
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
Timer::Timer()
|
||||
{
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
QueryPerformanceFrequency(&frequency);
|
||||
startCount.QuadPart = 0;
|
||||
endCount.QuadPart = 0;
|
||||
#else
|
||||
startCount.tv_sec = startCount.tv_usec = 0;
|
||||
endCount.tv_sec = endCount.tv_usec = 0;
|
||||
#endif
|
||||
|
||||
stopped = 0;
|
||||
startTimeInMicroSec = 0;
|
||||
endTimeInMicroSec = 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// distructor
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
Timer::~Timer()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// start timer.
|
||||
// startCount will be set at this point.
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
void Timer::start()
|
||||
{
|
||||
stopped = 0; // reset stop flag
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
QueryPerformanceCounter(&startCount);
|
||||
#else
|
||||
gettimeofday(&startCount, NULL);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// stop the timer.
|
||||
// endCount will be set at this point.
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
void Timer::stop()
|
||||
{
|
||||
stopped = 1; // set timer stopped flag
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
QueryPerformanceCounter(&endCount);
|
||||
#else
|
||||
gettimeofday(&endCount, NULL);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// compute elapsed time in micro-second resolution.
|
||||
// other getElapsedTime will call this first, then convert to correspond resolution.
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
double Timer::getElapsedTimeInMicroSec()
|
||||
{
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
if(!stopped)
|
||||
QueryPerformanceCounter(&endCount);
|
||||
|
||||
startTimeInMicroSec = startCount.QuadPart * (1000000.0 / frequency.QuadPart);
|
||||
endTimeInMicroSec = endCount.QuadPart * (1000000.0 / frequency.QuadPart);
|
||||
#else
|
||||
if(!stopped)
|
||||
gettimeofday(&endCount, NULL);
|
||||
|
||||
startTimeInMicroSec = (startCount.tv_sec * 1000000.0) + startCount.tv_usec;
|
||||
endTimeInMicroSec = (endCount.tv_sec * 1000000.0) + endCount.tv_usec;
|
||||
#endif
|
||||
|
||||
return endTimeInMicroSec - startTimeInMicroSec;
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// divide elapsedTimeInMicroSec by 1000
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
double Timer::getElapsedTimeInMilliSec()
|
||||
{
|
||||
return this->getElapsedTimeInMicroSec() * 0.001;
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// divide elapsedTimeInMicroSec by 1000000
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
double Timer::getElapsedTimeInSec()
|
||||
{
|
||||
return this->getElapsedTimeInMicroSec() * 0.000001;
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// same as getElapsedTimeInSec()
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
double Timer::getElapsedTime()
|
||||
{
|
||||
return this->getElapsedTimeInSec();
|
||||
}
|
56
examples/fbo/Timer.h
Normal file
56
examples/fbo/Timer.h
Normal file
@ -0,0 +1,56 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// Timer.h
|
||||
// =======
|
||||
// High Resolution Timer.
|
||||
// This timer is able to measure the elapsed time with 1 micro-second accuracy
|
||||
// in both Windows, Linux and Unix system
|
||||
//
|
||||
// AUTHOR: Song Ho Ahn (song.ahn@gmail.com)
|
||||
// CREATED: 2003-01-13
|
||||
// UPDATED: 2017-03-30
|
||||
//
|
||||
// Copyright (c) 2003 Song Ho Ahn
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef TIMER_H_DEF
|
||||
#define TIMER_H_DEF
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32) // Windows system specific
|
||||
#include <windows.h>
|
||||
#else // Unix based system specific
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
|
||||
|
||||
class Timer
|
||||
{
|
||||
public:
|
||||
Timer(); // default constructor
|
||||
~Timer(); // default destructor
|
||||
|
||||
void start(); // start timer
|
||||
void stop(); // stop the timer
|
||||
double getElapsedTime(); // get elapsed time in second
|
||||
double getElapsedTimeInSec(); // get elapsed time in second (same as getElapsedTime)
|
||||
double getElapsedTimeInMilliSec(); // get elapsed time in milli-second
|
||||
double getElapsedTimeInMicroSec(); // get elapsed time in micro-second
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
private:
|
||||
double startTimeInMicroSec; // starting time in micro-second
|
||||
double endTimeInMicroSec; // ending time in micro-second
|
||||
int stopped; // stop flag
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
LARGE_INTEGER frequency; // ticks per second
|
||||
LARGE_INTEGER startCount; //
|
||||
LARGE_INTEGER endCount; //
|
||||
#else
|
||||
timeval startCount; //
|
||||
timeval endCount; //
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif // TIMER_H_DEF
|
160
examples/fbo/fbo.vcxproj
Normal file
160
examples/fbo/fbo.vcxproj
Normal file
@ -0,0 +1,160 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="14.0" 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>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="glInfo.cpp" />
|
||||
<ClCompile Include="main.cpp" />
|
||||
<ClCompile Include="Timer.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="glext.h" />
|
||||
<ClInclude Include="glInfo.h" />
|
||||
<ClInclude Include="teapot.h" />
|
||||
<ClInclude Include="Timer.h" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{75F44874-65E9-4CE8-B3CE-F30840EE60C8}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>fbo</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v140</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)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\..\glew;..\..\glew\gl;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalLibraryDirectories>..\..\glew\lib</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
221
examples/fbo/glInfo.cpp
Normal file
221
examples/fbo/glInfo.cpp
Normal file
@ -0,0 +1,221 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// glInfo.cpp
|
||||
// ==========
|
||||
// get GL vendor, version, supported extensions and other states using glGet*
|
||||
// functions and store them glInfo struct variable
|
||||
//
|
||||
// To get valid OpenGL infos, OpenGL rendering context (RC) must be opened
|
||||
// before calling glInfo::getInfo(). Otherwise it returns false.
|
||||
//
|
||||
// AUTHOR: Song Ho Ahn (song.ahn@gmail.com)
|
||||
// CREATED: 2005-10-04
|
||||
// UPDATED: 2013-03-06
|
||||
//
|
||||
// Copyright (c) 2005-2013 Song Ho Ahn
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#ifdef __APPLE__
|
||||
#include <OpenGL/gl.h>
|
||||
#else
|
||||
#include <GL/gl.h>
|
||||
#endif
|
||||
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
#include <algorithm>
|
||||
#include <cstring>
|
||||
#include "glInfo.h"
|
||||
|
||||
|
||||
|
||||
// WGL specific extensions for v3.0+ //////////////////////////////////////////
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#ifndef WGLGETEXTENSIONSSTRINGARB_DEF
|
||||
#define WGLGETEXTENSIONSSTRINGARB_DEF
|
||||
typedef const char* (WINAPI * PFNWGLGETEXTENSIONSSTRINGARBPROC)(HDC hdc);
|
||||
PFNWGLGETEXTENSIONSSTRINGARBPROC pwglGetExtensionsStringARB = 0;
|
||||
#define wglGetExtensionsStringARB pwglGetExtensionsStringARB
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// version 2.0 or greater
|
||||
#define GL_SHADING_LANGUAGE_VERSION 0x8B8C
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// extract openGL info
|
||||
// This function must be called after GL rendering context opened.
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
void glInfo::getInfo(unsigned int param)
|
||||
{
|
||||
std::string str;
|
||||
|
||||
// get vendor string
|
||||
str = (const char*)glGetString(GL_VENDOR);
|
||||
this->vendor = str; // check NULL return value
|
||||
|
||||
// get renderer string
|
||||
str = (const char*)glGetString(GL_RENDERER);
|
||||
this->renderer = str; // check NULL return value
|
||||
|
||||
// get version string
|
||||
str = (const char*)glGetString(GL_VERSION);
|
||||
this->version = str; // check NULL return value
|
||||
|
||||
// get all extensions as a string
|
||||
str = (const char*)glGetString(GL_EXTENSIONS);
|
||||
|
||||
// split extensions
|
||||
if(str.size() > 0)
|
||||
{
|
||||
char* str2 = new char[str.size() + 1];
|
||||
strcpy(str2, str.c_str());
|
||||
char* tok = strtok(str2, " ");
|
||||
while(tok)
|
||||
{
|
||||
this->extensions.push_back(tok); // put a extension into struct
|
||||
tok = strtok(0, " "); // next token
|
||||
}
|
||||
delete [] str2;
|
||||
}
|
||||
|
||||
// get GLSL version string (v2.0+)
|
||||
str = (const char*)glGetString(GL_SHADING_LANGUAGE_VERSION);
|
||||
if(str.size() > 0)
|
||||
this->glslVersion = str;
|
||||
else
|
||||
{
|
||||
// "GL_SHADING_LANGUAGE_VERSION" token is added later (v2.0) after the
|
||||
// first GLSL included in OpenGL (v1.5). If "GL_SHADING_LANGUAGE_VERSION"
|
||||
// is invalid token but "GL_ARB_shading_language_100" is supported, then
|
||||
// the GLSL version should be 1.0.rev.51
|
||||
if(isExtensionSupported("GL_ARB_shading_language_100"))
|
||||
glslVersion = "1.0.51"; // the first GLSL version
|
||||
else
|
||||
glslVersion = "";
|
||||
}
|
||||
|
||||
// get WGL specific extensions for v3.0+
|
||||
#ifdef _WIN32 //===========================================
|
||||
wglGetExtensionsStringARB = (PFNWGLGETEXTENSIONSSTRINGARBPROC)wglGetProcAddress("wglGetExtensionsStringARB");
|
||||
if(wglGetExtensionsStringARB && param)
|
||||
{
|
||||
str = (const char*)wglGetExtensionsStringARB((HDC)param);
|
||||
if(str.size() > 0)
|
||||
{
|
||||
char* str2 = new char[str.size() + 1];
|
||||
strcpy(str2, str.c_str());
|
||||
char* tok = strtok(str2, " ");
|
||||
while(tok)
|
||||
{
|
||||
this->extensions.push_back(tok); // put a extension into struct
|
||||
tok = strtok(0, " "); // next token
|
||||
}
|
||||
delete [] str2;
|
||||
}
|
||||
}
|
||||
#endif //==================================================
|
||||
|
||||
// sort extension by alphabetical order
|
||||
std::sort(this->extensions.begin(), this->extensions.end());
|
||||
|
||||
// get number of color bits
|
||||
glGetIntegerv(GL_RED_BITS, &this->redBits);
|
||||
glGetIntegerv(GL_GREEN_BITS, &this->greenBits);
|
||||
glGetIntegerv(GL_BLUE_BITS, &this->blueBits);
|
||||
glGetIntegerv(GL_ALPHA_BITS, &this->alphaBits);
|
||||
|
||||
// get depth bits
|
||||
glGetIntegerv(GL_DEPTH_BITS, &this->depthBits);
|
||||
|
||||
// get stecil bits
|
||||
glGetIntegerv(GL_STENCIL_BITS, &this->stencilBits);
|
||||
|
||||
// get max number of lights allowed
|
||||
glGetIntegerv(GL_MAX_LIGHTS, &this->maxLights);
|
||||
|
||||
// get max texture resolution
|
||||
glGetIntegerv(GL_MAX_TEXTURE_SIZE, &this->maxTextureSize);
|
||||
|
||||
// get max number of clipping planes
|
||||
glGetIntegerv(GL_MAX_CLIP_PLANES, &this->maxClipPlanes);
|
||||
|
||||
// get max modelview and projection matrix stacks
|
||||
glGetIntegerv(GL_MAX_MODELVIEW_STACK_DEPTH, &this->maxModelViewStacks);
|
||||
glGetIntegerv(GL_MAX_PROJECTION_STACK_DEPTH, &this->maxProjectionStacks);
|
||||
glGetIntegerv(GL_MAX_ATTRIB_STACK_DEPTH, &this->maxAttribStacks);
|
||||
|
||||
// get max texture stacks
|
||||
glGetIntegerv(GL_MAX_TEXTURE_STACK_DEPTH, &this->maxTextureStacks);
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// check if the video card support a certain extension
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
bool glInfo::isExtensionSupported(const std::string& ext)
|
||||
{
|
||||
// search corresponding extension
|
||||
std::vector<std::string>::const_iterator iter = this->extensions.begin();
|
||||
std::vector<std::string>::const_iterator endIter = this->extensions.end();
|
||||
|
||||
while(iter != endIter)
|
||||
{
|
||||
if(ext == *iter)
|
||||
return true;
|
||||
else
|
||||
++iter;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// print OpenGL info to screen and save to a file
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
void glInfo::printSelf()
|
||||
{
|
||||
std::stringstream ss;
|
||||
|
||||
ss << std::endl; // blank line
|
||||
ss << "OpenGL Driver Info" << std::endl;
|
||||
ss << "==================" << std::endl;
|
||||
ss << "Vendor: " << this->vendor << std::endl;
|
||||
ss << "Version: " << this->version << std::endl;
|
||||
ss << "GLSL Version: " << this->glslVersion << std::endl;
|
||||
ss << "Renderer: " << this->renderer << std::endl;
|
||||
|
||||
ss << std::endl;
|
||||
ss << "Color Bits(R,G,B,A): (" << this->redBits << ", " << this->greenBits
|
||||
<< ", " << this->blueBits << ", " << this->alphaBits << ")\n";
|
||||
ss << "Depth Bits: " << this->depthBits << std::endl;
|
||||
ss << "Stencil Bits: " << this->stencilBits << std::endl;
|
||||
|
||||
ss << std::endl;
|
||||
ss << "Max Texture Size: " << this->maxTextureSize << "x" << this->maxTextureSize << std::endl;
|
||||
ss << "Max Lights: " << this->maxLights << std::endl;
|
||||
ss << "Max Clip Planes: " << this->maxClipPlanes << std::endl;
|
||||
ss << "Max Modelview Matrix Stacks: " << this->maxModelViewStacks << std::endl;
|
||||
ss << "Max Projection Matrix Stacks: " << this->maxProjectionStacks << std::endl;
|
||||
ss << "Max Attribute Stacks: " << this->maxAttribStacks << std::endl;
|
||||
ss << "Max Texture Stacks: " << this->maxTextureStacks << std::endl;
|
||||
|
||||
ss << std::endl;
|
||||
ss << "Total Number of Extensions: " << this->extensions.size() << std::endl;
|
||||
ss << "==============================" << std::endl;
|
||||
for(unsigned int i = 0; i < this->extensions.size(); ++i)
|
||||
ss << this->extensions.at(i) << std::endl;
|
||||
|
||||
ss << "======================================================================" << std::endl;
|
||||
|
||||
std::cout << ss.str() << std::endl;
|
||||
}
|
55
examples/fbo/glInfo.h
Normal file
55
examples/fbo/glInfo.h
Normal file
@ -0,0 +1,55 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// glInfo.h
|
||||
// ========
|
||||
// get GL vendor, version, supported extensions and other states using glGet*
|
||||
// functions and store them glInfo struct variable
|
||||
//
|
||||
// To get valid OpenGL infos, OpenGL rendering context (RC) must be opened
|
||||
// before calling glInfo::getInfo(). Otherwise it returns false.
|
||||
//
|
||||
// AUTHOR: Song Ho Ahn (song.ahn@gmail.com)
|
||||
// CREATED: 2005-10-04
|
||||
// UPDATED: 2013-03-06
|
||||
//
|
||||
// Copyright (c) 2005-2013 Song Ho Ahn
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef GLINFO_H
|
||||
#define GLINFO_H
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
// struct variable to store OpenGL info
|
||||
struct glInfo
|
||||
{
|
||||
std::string vendor;
|
||||
std::string renderer;
|
||||
std::string version;
|
||||
std::string glslVersion;
|
||||
std::vector <std::string> extensions;
|
||||
int redBits;
|
||||
int greenBits;
|
||||
int blueBits;
|
||||
int alphaBits;
|
||||
int depthBits;
|
||||
int stencilBits;
|
||||
int maxTextureSize;
|
||||
int maxLights;
|
||||
int maxAttribStacks;
|
||||
int maxModelViewStacks;
|
||||
int maxProjectionStacks;
|
||||
int maxClipPlanes;
|
||||
int maxTextureStacks;
|
||||
|
||||
// ctor, init all members
|
||||
glInfo() : redBits(0), greenBits(0), blueBits(0), alphaBits(0), depthBits(0),
|
||||
stencilBits(0), maxTextureSize(0), maxLights(0), maxAttribStacks(0),
|
||||
maxModelViewStacks(0), maxClipPlanes(0), maxTextureStacks(0) {}
|
||||
|
||||
void getInfo(unsigned int param=0); // extract info
|
||||
void printSelf(); // print itself
|
||||
bool isExtensionSupported(const std::string& ext); // check if a extension is supported
|
||||
};
|
||||
|
||||
#endif
|
12146
examples/fbo/glext.h
Normal file
12146
examples/fbo/glext.h
Normal file
File diff suppressed because it is too large
Load Diff
1361
examples/fbo/main.cpp
Normal file
1361
examples/fbo/main.cpp
Normal file
File diff suppressed because it is too large
Load Diff
4366
examples/fbo/teapot.h
Normal file
4366
examples/fbo/teapot.h
Normal file
File diff suppressed because it is too large
Load Diff
132
examples/fboblit/Timer.cpp
Normal file
132
examples/fboblit/Timer.cpp
Normal file
@ -0,0 +1,132 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// Timer.cpp
|
||||
// =========
|
||||
// High Resolution Timer.
|
||||
// This timer is able to measure the elapsed time with 1 micro-second accuracy
|
||||
// in both Windows, Linux and Unix system
|
||||
//
|
||||
// AUTHOR: Song Ho Ahn (song.ahn@gmail.com)
|
||||
// CREATED: 2003-01-13
|
||||
// UPDATED: 2017-03-30
|
||||
//
|
||||
// Copyright (c) 2003 Song Ho Ahn
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "Timer.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// constructor
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
Timer::Timer()
|
||||
{
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
QueryPerformanceFrequency(&frequency);
|
||||
startCount.QuadPart = 0;
|
||||
endCount.QuadPart = 0;
|
||||
#else
|
||||
startCount.tv_sec = startCount.tv_usec = 0;
|
||||
endCount.tv_sec = endCount.tv_usec = 0;
|
||||
#endif
|
||||
|
||||
stopped = 0;
|
||||
startTimeInMicroSec = 0;
|
||||
endTimeInMicroSec = 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// distructor
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
Timer::~Timer()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// start timer.
|
||||
// startCount will be set at this point.
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
void Timer::start()
|
||||
{
|
||||
stopped = 0; // reset stop flag
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
QueryPerformanceCounter(&startCount);
|
||||
#else
|
||||
gettimeofday(&startCount, NULL);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// stop the timer.
|
||||
// endCount will be set at this point.
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
void Timer::stop()
|
||||
{
|
||||
stopped = 1; // set timer stopped flag
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
QueryPerformanceCounter(&endCount);
|
||||
#else
|
||||
gettimeofday(&endCount, NULL);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// compute elapsed time in micro-second resolution.
|
||||
// other getElapsedTime will call this first, then convert to correspond resolution.
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
double Timer::getElapsedTimeInMicroSec()
|
||||
{
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
if(!stopped)
|
||||
QueryPerformanceCounter(&endCount);
|
||||
|
||||
startTimeInMicroSec = startCount.QuadPart * (1000000.0 / frequency.QuadPart);
|
||||
endTimeInMicroSec = endCount.QuadPart * (1000000.0 / frequency.QuadPart);
|
||||
#else
|
||||
if(!stopped)
|
||||
gettimeofday(&endCount, NULL);
|
||||
|
||||
startTimeInMicroSec = (startCount.tv_sec * 1000000.0) + startCount.tv_usec;
|
||||
endTimeInMicroSec = (endCount.tv_sec * 1000000.0) + endCount.tv_usec;
|
||||
#endif
|
||||
|
||||
return endTimeInMicroSec - startTimeInMicroSec;
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// divide elapsedTimeInMicroSec by 1000
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
double Timer::getElapsedTimeInMilliSec()
|
||||
{
|
||||
return this->getElapsedTimeInMicroSec() * 0.001;
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// divide elapsedTimeInMicroSec by 1000000
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
double Timer::getElapsedTimeInSec()
|
||||
{
|
||||
return this->getElapsedTimeInMicroSec() * 0.000001;
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// same as getElapsedTimeInSec()
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
double Timer::getElapsedTime()
|
||||
{
|
||||
return this->getElapsedTimeInSec();
|
||||
}
|
56
examples/fboblit/Timer.h
Normal file
56
examples/fboblit/Timer.h
Normal file
@ -0,0 +1,56 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// Timer.h
|
||||
// =======
|
||||
// High Resolution Timer.
|
||||
// This timer is able to measure the elapsed time with 1 micro-second accuracy
|
||||
// in both Windows, Linux and Unix system
|
||||
//
|
||||
// AUTHOR: Song Ho Ahn (song.ahn@gmail.com)
|
||||
// CREATED: 2003-01-13
|
||||
// UPDATED: 2017-03-30
|
||||
//
|
||||
// Copyright (c) 2003 Song Ho Ahn
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef TIMER_H_DEF
|
||||
#define TIMER_H_DEF
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32) // Windows system specific
|
||||
#include <windows.h>
|
||||
#else // Unix based system specific
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
|
||||
|
||||
class Timer
|
||||
{
|
||||
public:
|
||||
Timer(); // default constructor
|
||||
~Timer(); // default destructor
|
||||
|
||||
void start(); // start timer
|
||||
void stop(); // stop the timer
|
||||
double getElapsedTime(); // get elapsed time in second
|
||||
double getElapsedTimeInSec(); // get elapsed time in second (same as getElapsedTime)
|
||||
double getElapsedTimeInMilliSec(); // get elapsed time in milli-second
|
||||
double getElapsedTimeInMicroSec(); // get elapsed time in micro-second
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
private:
|
||||
double startTimeInMicroSec; // starting time in micro-second
|
||||
double endTimeInMicroSec; // ending time in micro-second
|
||||
int stopped; // stop flag
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
LARGE_INTEGER frequency; // ticks per second
|
||||
LARGE_INTEGER startCount; //
|
||||
LARGE_INTEGER endCount; //
|
||||
#else
|
||||
timeval startCount; //
|
||||
timeval endCount; //
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif // TIMER_H_DEF
|
160
examples/fboblit/fboblit.vcxproj
Normal file
160
examples/fboblit/fboblit.vcxproj
Normal file
@ -0,0 +1,160 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="14.0" 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>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="glInfo.cpp" />
|
||||
<ClCompile Include="main.cpp" />
|
||||
<ClCompile Include="Timer.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="glext.h" />
|
||||
<ClInclude Include="glInfo.h" />
|
||||
<ClInclude Include="teapot.h" />
|
||||
<ClInclude Include="Timer.h" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{E3204FFB-321B-4043-B387-FE1B9DAE63CD}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>fboblit</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v140</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)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\..\glew;..\..\glew\gl;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalLibraryDirectories>..\..\glew\lib</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
221
examples/fboblit/glInfo.cpp
Normal file
221
examples/fboblit/glInfo.cpp
Normal file
@ -0,0 +1,221 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// glInfo.cpp
|
||||
// ==========
|
||||
// get GL vendor, version, supported extensions and other states using glGet*
|
||||
// functions and store them glInfo struct variable
|
||||
//
|
||||
// To get valid OpenGL infos, OpenGL rendering context (RC) must be opened
|
||||
// before calling glInfo::getInfo(). Otherwise it returns false.
|
||||
//
|
||||
// AUTHOR: Song Ho Ahn (song.ahn@gmail.com)
|
||||
// CREATED: 2005-10-04
|
||||
// UPDATED: 2013-03-06
|
||||
//
|
||||
// Copyright (c) 2005-2013 Song Ho Ahn
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#ifdef __APPLE__
|
||||
#include <OpenGL/gl.h>
|
||||
#else
|
||||
#include <GL/gl.h>
|
||||
#endif
|
||||
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
#include <algorithm>
|
||||
#include <cstring>
|
||||
#include "glInfo.h"
|
||||
|
||||
|
||||
|
||||
// WGL specific extensions for v3.0+ //////////////////////////////////////////
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#ifndef WGLGETEXTENSIONSSTRINGARB_DEF
|
||||
#define WGLGETEXTENSIONSSTRINGARB_DEF
|
||||
typedef const char* (WINAPI * PFNWGLGETEXTENSIONSSTRINGARBPROC)(HDC hdc);
|
||||
PFNWGLGETEXTENSIONSSTRINGARBPROC pwglGetExtensionsStringARB = 0;
|
||||
#define wglGetExtensionsStringARB pwglGetExtensionsStringARB
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// version 2.0 or greater
|
||||
#define GL_SHADING_LANGUAGE_VERSION 0x8B8C
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// extract openGL info
|
||||
// This function must be called after GL rendering context opened.
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
void glInfo::getInfo(unsigned int param)
|
||||
{
|
||||
std::string str;
|
||||
|
||||
// get vendor string
|
||||
str = (const char*)glGetString(GL_VENDOR);
|
||||
this->vendor = str; // check NULL return value
|
||||
|
||||
// get renderer string
|
||||
str = (const char*)glGetString(GL_RENDERER);
|
||||
this->renderer = str; // check NULL return value
|
||||
|
||||
// get version string
|
||||
str = (const char*)glGetString(GL_VERSION);
|
||||
this->version = str; // check NULL return value
|
||||
|
||||
// get all extensions as a string
|
||||
str = (const char*)glGetString(GL_EXTENSIONS);
|
||||
|
||||
// split extensions
|
||||
if(str.size() > 0)
|
||||
{
|
||||
char* str2 = new char[str.size() + 1];
|
||||
strcpy(str2, str.c_str());
|
||||
char* tok = strtok(str2, " ");
|
||||
while(tok)
|
||||
{
|
||||
this->extensions.push_back(tok); // put a extension into struct
|
||||
tok = strtok(0, " "); // next token
|
||||
}
|
||||
delete [] str2;
|
||||
}
|
||||
|
||||
// get GLSL version string (v2.0+)
|
||||
str = (const char*)glGetString(GL_SHADING_LANGUAGE_VERSION);
|
||||
if(str.size() > 0)
|
||||
this->glslVersion = str;
|
||||
else
|
||||
{
|
||||
// "GL_SHADING_LANGUAGE_VERSION" token is added later (v2.0) after the
|
||||
// first GLSL included in OpenGL (v1.5). If "GL_SHADING_LANGUAGE_VERSION"
|
||||
// is invalid token but "GL_ARB_shading_language_100" is supported, then
|
||||
// the GLSL version should be 1.0.rev.51
|
||||
if(isExtensionSupported("GL_ARB_shading_language_100"))
|
||||
glslVersion = "1.0.51"; // the first GLSL version
|
||||
else
|
||||
glslVersion = "";
|
||||
}
|
||||
|
||||
// get WGL specific extensions for v3.0+
|
||||
#ifdef _WIN32 //===========================================
|
||||
wglGetExtensionsStringARB = (PFNWGLGETEXTENSIONSSTRINGARBPROC)wglGetProcAddress("wglGetExtensionsStringARB");
|
||||
if(wglGetExtensionsStringARB && param)
|
||||
{
|
||||
str = (const char*)wglGetExtensionsStringARB((HDC)param);
|
||||
if(str.size() > 0)
|
||||
{
|
||||
char* str2 = new char[str.size() + 1];
|
||||
strcpy(str2, str.c_str());
|
||||
char* tok = strtok(str2, " ");
|
||||
while(tok)
|
||||
{
|
||||
this->extensions.push_back(tok); // put a extension into struct
|
||||
tok = strtok(0, " "); // next token
|
||||
}
|
||||
delete [] str2;
|
||||
}
|
||||
}
|
||||
#endif //==================================================
|
||||
|
||||
// sort extension by alphabetical order
|
||||
std::sort(this->extensions.begin(), this->extensions.end());
|
||||
|
||||
// get number of color bits
|
||||
glGetIntegerv(GL_RED_BITS, &this->redBits);
|
||||
glGetIntegerv(GL_GREEN_BITS, &this->greenBits);
|
||||
glGetIntegerv(GL_BLUE_BITS, &this->blueBits);
|
||||
glGetIntegerv(GL_ALPHA_BITS, &this->alphaBits);
|
||||
|
||||
// get depth bits
|
||||
glGetIntegerv(GL_DEPTH_BITS, &this->depthBits);
|
||||
|
||||
// get stecil bits
|
||||
glGetIntegerv(GL_STENCIL_BITS, &this->stencilBits);
|
||||
|
||||
// get max number of lights allowed
|
||||
glGetIntegerv(GL_MAX_LIGHTS, &this->maxLights);
|
||||
|
||||
// get max texture resolution
|
||||
glGetIntegerv(GL_MAX_TEXTURE_SIZE, &this->maxTextureSize);
|
||||
|
||||
// get max number of clipping planes
|
||||
glGetIntegerv(GL_MAX_CLIP_PLANES, &this->maxClipPlanes);
|
||||
|
||||
// get max modelview and projection matrix stacks
|
||||
glGetIntegerv(GL_MAX_MODELVIEW_STACK_DEPTH, &this->maxModelViewStacks);
|
||||
glGetIntegerv(GL_MAX_PROJECTION_STACK_DEPTH, &this->maxProjectionStacks);
|
||||
glGetIntegerv(GL_MAX_ATTRIB_STACK_DEPTH, &this->maxAttribStacks);
|
||||
|
||||
// get max texture stacks
|
||||
glGetIntegerv(GL_MAX_TEXTURE_STACK_DEPTH, &this->maxTextureStacks);
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// check if the video card support a certain extension
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
bool glInfo::isExtensionSupported(const std::string& ext)
|
||||
{
|
||||
// search corresponding extension
|
||||
std::vector<std::string>::const_iterator iter = this->extensions.begin();
|
||||
std::vector<std::string>::const_iterator endIter = this->extensions.end();
|
||||
|
||||
while(iter != endIter)
|
||||
{
|
||||
if(ext == *iter)
|
||||
return true;
|
||||
else
|
||||
++iter;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// print OpenGL info to screen and save to a file
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
void glInfo::printSelf()
|
||||
{
|
||||
std::stringstream ss;
|
||||
|
||||
ss << std::endl; // blank line
|
||||
ss << "OpenGL Driver Info" << std::endl;
|
||||
ss << "==================" << std::endl;
|
||||
ss << "Vendor: " << this->vendor << std::endl;
|
||||
ss << "Version: " << this->version << std::endl;
|
||||
ss << "GLSL Version: " << this->glslVersion << std::endl;
|
||||
ss << "Renderer: " << this->renderer << std::endl;
|
||||
|
||||
ss << std::endl;
|
||||
ss << "Color Bits(R,G,B,A): (" << this->redBits << ", " << this->greenBits
|
||||
<< ", " << this->blueBits << ", " << this->alphaBits << ")\n";
|
||||
ss << "Depth Bits: " << this->depthBits << std::endl;
|
||||
ss << "Stencil Bits: " << this->stencilBits << std::endl;
|
||||
|
||||
ss << std::endl;
|
||||
ss << "Max Texture Size: " << this->maxTextureSize << "x" << this->maxTextureSize << std::endl;
|
||||
ss << "Max Lights: " << this->maxLights << std::endl;
|
||||
ss << "Max Clip Planes: " << this->maxClipPlanes << std::endl;
|
||||
ss << "Max Modelview Matrix Stacks: " << this->maxModelViewStacks << std::endl;
|
||||
ss << "Max Projection Matrix Stacks: " << this->maxProjectionStacks << std::endl;
|
||||
ss << "Max Attribute Stacks: " << this->maxAttribStacks << std::endl;
|
||||
ss << "Max Texture Stacks: " << this->maxTextureStacks << std::endl;
|
||||
|
||||
ss << std::endl;
|
||||
ss << "Total Number of Extensions: " << this->extensions.size() << std::endl;
|
||||
ss << "==============================" << std::endl;
|
||||
for(unsigned int i = 0; i < this->extensions.size(); ++i)
|
||||
ss << this->extensions.at(i) << std::endl;
|
||||
|
||||
ss << "======================================================================" << std::endl;
|
||||
|
||||
std::cout << ss.str() << std::endl;
|
||||
}
|
55
examples/fboblit/glInfo.h
Normal file
55
examples/fboblit/glInfo.h
Normal file
@ -0,0 +1,55 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// glInfo.h
|
||||
// ========
|
||||
// get GL vendor, version, supported extensions and other states using glGet*
|
||||
// functions and store them glInfo struct variable
|
||||
//
|
||||
// To get valid OpenGL infos, OpenGL rendering context (RC) must be opened
|
||||
// before calling glInfo::getInfo(). Otherwise it returns false.
|
||||
//
|
||||
// AUTHOR: Song Ho Ahn (song.ahn@gmail.com)
|
||||
// CREATED: 2005-10-04
|
||||
// UPDATED: 2013-03-06
|
||||
//
|
||||
// Copyright (c) 2005-2013 Song Ho Ahn
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef GLINFO_H
|
||||
#define GLINFO_H
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
// struct variable to store OpenGL info
|
||||
struct glInfo
|
||||
{
|
||||
std::string vendor;
|
||||
std::string renderer;
|
||||
std::string version;
|
||||
std::string glslVersion;
|
||||
std::vector <std::string> extensions;
|
||||
int redBits;
|
||||
int greenBits;
|
||||
int blueBits;
|
||||
int alphaBits;
|
||||
int depthBits;
|
||||
int stencilBits;
|
||||
int maxTextureSize;
|
||||
int maxLights;
|
||||
int maxAttribStacks;
|
||||
int maxModelViewStacks;
|
||||
int maxProjectionStacks;
|
||||
int maxClipPlanes;
|
||||
int maxTextureStacks;
|
||||
|
||||
// ctor, init all members
|
||||
glInfo() : redBits(0), greenBits(0), blueBits(0), alphaBits(0), depthBits(0),
|
||||
stencilBits(0), maxTextureSize(0), maxLights(0), maxAttribStacks(0),
|
||||
maxModelViewStacks(0), maxClipPlanes(0), maxTextureStacks(0) {}
|
||||
|
||||
void getInfo(unsigned int param=0); // extract info
|
||||
void printSelf(); // print itself
|
||||
bool isExtensionSupported(const std::string& ext); // check if a extension is supported
|
||||
};
|
||||
|
||||
#endif
|
12146
examples/fboblit/glext.h
Normal file
12146
examples/fboblit/glext.h
Normal file
File diff suppressed because it is too large
Load Diff
1371
examples/fboblit/main.cpp
Normal file
1371
examples/fboblit/main.cpp
Normal file
File diff suppressed because it is too large
Load Diff
4366
examples/fboblit/teapot.h
Normal file
4366
examples/fboblit/teapot.h
Normal file
File diff suppressed because it is too large
Load Diff
132
examples/fbodepth/Timer.cpp
Normal file
132
examples/fbodepth/Timer.cpp
Normal file
@ -0,0 +1,132 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// Timer.cpp
|
||||
// =========
|
||||
// High Resolution Timer.
|
||||
// This timer is able to measure the elapsed time with 1 micro-second accuracy
|
||||
// in both Windows, Linux and Unix system
|
||||
//
|
||||
// AUTHOR: Song Ho Ahn (song.ahn@gmail.com)
|
||||
// CREATED: 2003-01-13
|
||||
// UPDATED: 2017-03-30
|
||||
//
|
||||
// Copyright (c) 2003 Song Ho Ahn
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "Timer.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// constructor
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
Timer::Timer()
|
||||
{
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
QueryPerformanceFrequency(&frequency);
|
||||
startCount.QuadPart = 0;
|
||||
endCount.QuadPart = 0;
|
||||
#else
|
||||
startCount.tv_sec = startCount.tv_usec = 0;
|
||||
endCount.tv_sec = endCount.tv_usec = 0;
|
||||
#endif
|
||||
|
||||
stopped = 0;
|
||||
startTimeInMicroSec = 0;
|
||||
endTimeInMicroSec = 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// distructor
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
Timer::~Timer()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// start timer.
|
||||
// startCount will be set at this point.
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
void Timer::start()
|
||||
{
|
||||
stopped = 0; // reset stop flag
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
QueryPerformanceCounter(&startCount);
|
||||
#else
|
||||
gettimeofday(&startCount, NULL);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// stop the timer.
|
||||
// endCount will be set at this point.
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
void Timer::stop()
|
||||
{
|
||||
stopped = 1; // set timer stopped flag
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
QueryPerformanceCounter(&endCount);
|
||||
#else
|
||||
gettimeofday(&endCount, NULL);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// compute elapsed time in micro-second resolution.
|
||||
// other getElapsedTime will call this first, then convert to correspond resolution.
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
double Timer::getElapsedTimeInMicroSec()
|
||||
{
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
if(!stopped)
|
||||
QueryPerformanceCounter(&endCount);
|
||||
|
||||
startTimeInMicroSec = startCount.QuadPart * (1000000.0 / frequency.QuadPart);
|
||||
endTimeInMicroSec = endCount.QuadPart * (1000000.0 / frequency.QuadPart);
|
||||
#else
|
||||
if(!stopped)
|
||||
gettimeofday(&endCount, NULL);
|
||||
|
||||
startTimeInMicroSec = (startCount.tv_sec * 1000000.0) + startCount.tv_usec;
|
||||
endTimeInMicroSec = (endCount.tv_sec * 1000000.0) + endCount.tv_usec;
|
||||
#endif
|
||||
|
||||
return endTimeInMicroSec - startTimeInMicroSec;
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// divide elapsedTimeInMicroSec by 1000
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
double Timer::getElapsedTimeInMilliSec()
|
||||
{
|
||||
return this->getElapsedTimeInMicroSec() * 0.001;
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// divide elapsedTimeInMicroSec by 1000000
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
double Timer::getElapsedTimeInSec()
|
||||
{
|
||||
return this->getElapsedTimeInMicroSec() * 0.000001;
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// same as getElapsedTimeInSec()
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
double Timer::getElapsedTime()
|
||||
{
|
||||
return this->getElapsedTimeInSec();
|
||||
}
|
56
examples/fbodepth/Timer.h
Normal file
56
examples/fbodepth/Timer.h
Normal file
@ -0,0 +1,56 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// Timer.h
|
||||
// =======
|
||||
// High Resolution Timer.
|
||||
// This timer is able to measure the elapsed time with 1 micro-second accuracy
|
||||
// in both Windows, Linux and Unix system
|
||||
//
|
||||
// AUTHOR: Song Ho Ahn (song.ahn@gmail.com)
|
||||
// CREATED: 2003-01-13
|
||||
// UPDATED: 2017-03-30
|
||||
//
|
||||
// Copyright (c) 2003 Song Ho Ahn
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef TIMER_H_DEF
|
||||
#define TIMER_H_DEF
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32) // Windows system specific
|
||||
#include <windows.h>
|
||||
#else // Unix based system specific
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
|
||||
|
||||
class Timer
|
||||
{
|
||||
public:
|
||||
Timer(); // default constructor
|
||||
~Timer(); // default destructor
|
||||
|
||||
void start(); // start timer
|
||||
void stop(); // stop the timer
|
||||
double getElapsedTime(); // get elapsed time in second
|
||||
double getElapsedTimeInSec(); // get elapsed time in second (same as getElapsedTime)
|
||||
double getElapsedTimeInMilliSec(); // get elapsed time in milli-second
|
||||
double getElapsedTimeInMicroSec(); // get elapsed time in micro-second
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
private:
|
||||
double startTimeInMicroSec; // starting time in micro-second
|
||||
double endTimeInMicroSec; // ending time in micro-second
|
||||
int stopped; // stop flag
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
LARGE_INTEGER frequency; // ticks per second
|
||||
LARGE_INTEGER startCount; //
|
||||
LARGE_INTEGER endCount; //
|
||||
#else
|
||||
timeval startCount; //
|
||||
timeval endCount; //
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif // TIMER_H_DEF
|
160
examples/fbodepth/fbodepth.vcxproj
Normal file
160
examples/fbodepth/fbodepth.vcxproj
Normal file
@ -0,0 +1,160 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="14.0" 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>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="glInfo.cpp" />
|
||||
<ClCompile Include="main.cpp" />
|
||||
<ClCompile Include="Timer.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="glext.h" />
|
||||
<ClInclude Include="glInfo.h" />
|
||||
<ClInclude Include="teapot.h" />
|
||||
<ClInclude Include="Timer.h" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{487BB169-F91A-4436-BF55-68568636FE35}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>fbodepth</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v140</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)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\..\glew;..\..\glew\gl;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalLibraryDirectories>..\..\glew\lib</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
221
examples/fbodepth/glInfo.cpp
Normal file
221
examples/fbodepth/glInfo.cpp
Normal file
@ -0,0 +1,221 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// glInfo.cpp
|
||||
// ==========
|
||||
// get GL vendor, version, supported extensions and other states using glGet*
|
||||
// functions and store them glInfo struct variable
|
||||
//
|
||||
// To get valid OpenGL infos, OpenGL rendering context (RC) must be opened
|
||||
// before calling glInfo::getInfo(). Otherwise it returns false.
|
||||
//
|
||||
// AUTHOR: Song Ho Ahn (song.ahn@gmail.com)
|
||||
// CREATED: 2005-10-04
|
||||
// UPDATED: 2013-03-06
|
||||
//
|
||||
// Copyright (c) 2005-2013 Song Ho Ahn
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#ifdef __APPLE__
|
||||
#include <OpenGL/gl.h>
|
||||
#else
|
||||
#include <GL/gl.h>
|
||||
#endif
|
||||
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
#include <algorithm>
|
||||
#include <cstring>
|
||||
#include "glInfo.h"
|
||||
|
||||
|
||||
|
||||
// WGL specific extensions for v3.0+ //////////////////////////////////////////
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#ifndef WGLGETEXTENSIONSSTRINGARB_DEF
|
||||
#define WGLGETEXTENSIONSSTRINGARB_DEF
|
||||
typedef const char* (WINAPI * PFNWGLGETEXTENSIONSSTRINGARBPROC)(HDC hdc);
|
||||
PFNWGLGETEXTENSIONSSTRINGARBPROC pwglGetExtensionsStringARB = 0;
|
||||
#define wglGetExtensionsStringARB pwglGetExtensionsStringARB
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// version 2.0 or greater
|
||||
#define GL_SHADING_LANGUAGE_VERSION 0x8B8C
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// extract openGL info
|
||||
// This function must be called after GL rendering context opened.
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
void glInfo::getInfo(unsigned int param)
|
||||
{
|
||||
std::string str;
|
||||
|
||||
// get vendor string
|
||||
str = (const char*)glGetString(GL_VENDOR);
|
||||
this->vendor = str; // check NULL return value
|
||||
|
||||
// get renderer string
|
||||
str = (const char*)glGetString(GL_RENDERER);
|
||||
this->renderer = str; // check NULL return value
|
||||
|
||||
// get version string
|
||||
str = (const char*)glGetString(GL_VERSION);
|
||||
this->version = str; // check NULL return value
|
||||
|
||||
// get all extensions as a string
|
||||
str = (const char*)glGetString(GL_EXTENSIONS);
|
||||
|
||||
// split extensions
|
||||
if(str.size() > 0)
|
||||
{
|
||||
char* str2 = new char[str.size() + 1];
|
||||
strcpy(str2, str.c_str());
|
||||
char* tok = strtok(str2, " ");
|
||||
while(tok)
|
||||
{
|
||||
this->extensions.push_back(tok); // put a extension into struct
|
||||
tok = strtok(0, " "); // next token
|
||||
}
|
||||
delete [] str2;
|
||||
}
|
||||
|
||||
// get GLSL version string (v2.0+)
|
||||
str = (const char*)glGetString(GL_SHADING_LANGUAGE_VERSION);
|
||||
if(str.size() > 0)
|
||||
this->glslVersion = str;
|
||||
else
|
||||
{
|
||||
// "GL_SHADING_LANGUAGE_VERSION" token is added later (v2.0) after the
|
||||
// first GLSL included in OpenGL (v1.5). If "GL_SHADING_LANGUAGE_VERSION"
|
||||
// is invalid token but "GL_ARB_shading_language_100" is supported, then
|
||||
// the GLSL version should be 1.0.rev.51
|
||||
if(isExtensionSupported("GL_ARB_shading_language_100"))
|
||||
glslVersion = "1.0.51"; // the first GLSL version
|
||||
else
|
||||
glslVersion = "";
|
||||
}
|
||||
|
||||
// get WGL specific extensions for v3.0+
|
||||
#ifdef _WIN32 //===========================================
|
||||
wglGetExtensionsStringARB = (PFNWGLGETEXTENSIONSSTRINGARBPROC)wglGetProcAddress("wglGetExtensionsStringARB");
|
||||
if(wglGetExtensionsStringARB && param)
|
||||
{
|
||||
str = (const char*)wglGetExtensionsStringARB((HDC)param);
|
||||
if(str.size() > 0)
|
||||
{
|
||||
char* str2 = new char[str.size() + 1];
|
||||
strcpy(str2, str.c_str());
|
||||
char* tok = strtok(str2, " ");
|
||||
while(tok)
|
||||
{
|
||||
this->extensions.push_back(tok); // put a extension into struct
|
||||
tok = strtok(0, " "); // next token
|
||||
}
|
||||
delete [] str2;
|
||||
}
|
||||
}
|
||||
#endif //==================================================
|
||||
|
||||
// sort extension by alphabetical order
|
||||
std::sort(this->extensions.begin(), this->extensions.end());
|
||||
|
||||
// get number of color bits
|
||||
glGetIntegerv(GL_RED_BITS, &this->redBits);
|
||||
glGetIntegerv(GL_GREEN_BITS, &this->greenBits);
|
||||
glGetIntegerv(GL_BLUE_BITS, &this->blueBits);
|
||||
glGetIntegerv(GL_ALPHA_BITS, &this->alphaBits);
|
||||
|
||||
// get depth bits
|
||||
glGetIntegerv(GL_DEPTH_BITS, &this->depthBits);
|
||||
|
||||
// get stecil bits
|
||||
glGetIntegerv(GL_STENCIL_BITS, &this->stencilBits);
|
||||
|
||||
// get max number of lights allowed
|
||||
glGetIntegerv(GL_MAX_LIGHTS, &this->maxLights);
|
||||
|
||||
// get max texture resolution
|
||||
glGetIntegerv(GL_MAX_TEXTURE_SIZE, &this->maxTextureSize);
|
||||
|
||||
// get max number of clipping planes
|
||||
glGetIntegerv(GL_MAX_CLIP_PLANES, &this->maxClipPlanes);
|
||||
|
||||
// get max modelview and projection matrix stacks
|
||||
glGetIntegerv(GL_MAX_MODELVIEW_STACK_DEPTH, &this->maxModelViewStacks);
|
||||
glGetIntegerv(GL_MAX_PROJECTION_STACK_DEPTH, &this->maxProjectionStacks);
|
||||
glGetIntegerv(GL_MAX_ATTRIB_STACK_DEPTH, &this->maxAttribStacks);
|
||||
|
||||
// get max texture stacks
|
||||
glGetIntegerv(GL_MAX_TEXTURE_STACK_DEPTH, &this->maxTextureStacks);
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// check if the video card support a certain extension
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
bool glInfo::isExtensionSupported(const std::string& ext)
|
||||
{
|
||||
// search corresponding extension
|
||||
std::vector<std::string>::const_iterator iter = this->extensions.begin();
|
||||
std::vector<std::string>::const_iterator endIter = this->extensions.end();
|
||||
|
||||
while(iter != endIter)
|
||||
{
|
||||
if(ext == *iter)
|
||||
return true;
|
||||
else
|
||||
++iter;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// print OpenGL info to screen and save to a file
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
void glInfo::printSelf()
|
||||
{
|
||||
std::stringstream ss;
|
||||
|
||||
ss << std::endl; // blank line
|
||||
ss << "OpenGL Driver Info" << std::endl;
|
||||
ss << "==================" << std::endl;
|
||||
ss << "Vendor: " << this->vendor << std::endl;
|
||||
ss << "Version: " << this->version << std::endl;
|
||||
ss << "GLSL Version: " << this->glslVersion << std::endl;
|
||||
ss << "Renderer: " << this->renderer << std::endl;
|
||||
|
||||
ss << std::endl;
|
||||
ss << "Color Bits(R,G,B,A): (" << this->redBits << ", " << this->greenBits
|
||||
<< ", " << this->blueBits << ", " << this->alphaBits << ")\n";
|
||||
ss << "Depth Bits: " << this->depthBits << std::endl;
|
||||
ss << "Stencil Bits: " << this->stencilBits << std::endl;
|
||||
|
||||
ss << std::endl;
|
||||
ss << "Max Texture Size: " << this->maxTextureSize << "x" << this->maxTextureSize << std::endl;
|
||||
ss << "Max Lights: " << this->maxLights << std::endl;
|
||||
ss << "Max Clip Planes: " << this->maxClipPlanes << std::endl;
|
||||
ss << "Max Modelview Matrix Stacks: " << this->maxModelViewStacks << std::endl;
|
||||
ss << "Max Projection Matrix Stacks: " << this->maxProjectionStacks << std::endl;
|
||||
ss << "Max Attribute Stacks: " << this->maxAttribStacks << std::endl;
|
||||
ss << "Max Texture Stacks: " << this->maxTextureStacks << std::endl;
|
||||
|
||||
ss << std::endl;
|
||||
ss << "Total Number of Extensions: " << this->extensions.size() << std::endl;
|
||||
ss << "==============================" << std::endl;
|
||||
for(unsigned int i = 0; i < this->extensions.size(); ++i)
|
||||
ss << this->extensions.at(i) << std::endl;
|
||||
|
||||
ss << "======================================================================" << std::endl;
|
||||
|
||||
std::cout << ss.str() << std::endl;
|
||||
}
|
55
examples/fbodepth/glInfo.h
Normal file
55
examples/fbodepth/glInfo.h
Normal file
@ -0,0 +1,55 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// glInfo.h
|
||||
// ========
|
||||
// get GL vendor, version, supported extensions and other states using glGet*
|
||||
// functions and store them glInfo struct variable
|
||||
//
|
||||
// To get valid OpenGL infos, OpenGL rendering context (RC) must be opened
|
||||
// before calling glInfo::getInfo(). Otherwise it returns false.
|
||||
//
|
||||
// AUTHOR: Song Ho Ahn (song.ahn@gmail.com)
|
||||
// CREATED: 2005-10-04
|
||||
// UPDATED: 2013-03-06
|
||||
//
|
||||
// Copyright (c) 2005-2013 Song Ho Ahn
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef GLINFO_H
|
||||
#define GLINFO_H
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
// struct variable to store OpenGL info
|
||||
struct glInfo
|
||||
{
|
||||
std::string vendor;
|
||||
std::string renderer;
|
||||
std::string version;
|
||||
std::string glslVersion;
|
||||
std::vector <std::string> extensions;
|
||||
int redBits;
|
||||
int greenBits;
|
||||
int blueBits;
|
||||
int alphaBits;
|
||||
int depthBits;
|
||||
int stencilBits;
|
||||
int maxTextureSize;
|
||||
int maxLights;
|
||||
int maxAttribStacks;
|
||||
int maxModelViewStacks;
|
||||
int maxProjectionStacks;
|
||||
int maxClipPlanes;
|
||||
int maxTextureStacks;
|
||||
|
||||
// ctor, init all members
|
||||
glInfo() : redBits(0), greenBits(0), blueBits(0), alphaBits(0), depthBits(0),
|
||||
stencilBits(0), maxTextureSize(0), maxLights(0), maxAttribStacks(0),
|
||||
maxModelViewStacks(0), maxClipPlanes(0), maxTextureStacks(0) {}
|
||||
|
||||
void getInfo(unsigned int param=0); // extract info
|
||||
void printSelf(); // print itself
|
||||
bool isExtensionSupported(const std::string& ext); // check if a extension is supported
|
||||
};
|
||||
|
||||
#endif
|
12146
examples/fbodepth/glext.h
Normal file
12146
examples/fbodepth/glext.h
Normal file
File diff suppressed because it is too large
Load Diff
1446
examples/fbodepth/main.cpp
Normal file
1446
examples/fbodepth/main.cpp
Normal file
File diff suppressed because it is too large
Load Diff
4366
examples/fbodepth/teapot.h
Normal file
4366
examples/fbodepth/teapot.h
Normal file
File diff suppressed because it is too large
Load Diff
132
examples/fbomsaa/Timer.cpp
Normal file
132
examples/fbomsaa/Timer.cpp
Normal file
@ -0,0 +1,132 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// Timer.cpp
|
||||
// =========
|
||||
// High Resolution Timer.
|
||||
// This timer is able to measure the elapsed time with 1 micro-second accuracy
|
||||
// in both Windows, Linux and Unix system
|
||||
//
|
||||
// AUTHOR: Song Ho Ahn (song.ahn@gmail.com)
|
||||
// CREATED: 2003-01-13
|
||||
// UPDATED: 2017-03-30
|
||||
//
|
||||
// Copyright (c) 2003 Song Ho Ahn
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "Timer.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// constructor
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
Timer::Timer()
|
||||
{
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
QueryPerformanceFrequency(&frequency);
|
||||
startCount.QuadPart = 0;
|
||||
endCount.QuadPart = 0;
|
||||
#else
|
||||
startCount.tv_sec = startCount.tv_usec = 0;
|
||||
endCount.tv_sec = endCount.tv_usec = 0;
|
||||
#endif
|
||||
|
||||
stopped = 0;
|
||||
startTimeInMicroSec = 0;
|
||||
endTimeInMicroSec = 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// distructor
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
Timer::~Timer()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// start timer.
|
||||
// startCount will be set at this point.
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
void Timer::start()
|
||||
{
|
||||
stopped = 0; // reset stop flag
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
QueryPerformanceCounter(&startCount);
|
||||
#else
|
||||
gettimeofday(&startCount, NULL);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// stop the timer.
|
||||
// endCount will be set at this point.
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
void Timer::stop()
|
||||
{
|
||||
stopped = 1; // set timer stopped flag
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
QueryPerformanceCounter(&endCount);
|
||||
#else
|
||||
gettimeofday(&endCount, NULL);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// compute elapsed time in micro-second resolution.
|
||||
// other getElapsedTime will call this first, then convert to correspond resolution.
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
double Timer::getElapsedTimeInMicroSec()
|
||||
{
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
if(!stopped)
|
||||
QueryPerformanceCounter(&endCount);
|
||||
|
||||
startTimeInMicroSec = startCount.QuadPart * (1000000.0 / frequency.QuadPart);
|
||||
endTimeInMicroSec = endCount.QuadPart * (1000000.0 / frequency.QuadPart);
|
||||
#else
|
||||
if(!stopped)
|
||||
gettimeofday(&endCount, NULL);
|
||||
|
||||
startTimeInMicroSec = (startCount.tv_sec * 1000000.0) + startCount.tv_usec;
|
||||
endTimeInMicroSec = (endCount.tv_sec * 1000000.0) + endCount.tv_usec;
|
||||
#endif
|
||||
|
||||
return endTimeInMicroSec - startTimeInMicroSec;
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// divide elapsedTimeInMicroSec by 1000
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
double Timer::getElapsedTimeInMilliSec()
|
||||
{
|
||||
return this->getElapsedTimeInMicroSec() * 0.001;
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// divide elapsedTimeInMicroSec by 1000000
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
double Timer::getElapsedTimeInSec()
|
||||
{
|
||||
return this->getElapsedTimeInMicroSec() * 0.000001;
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// same as getElapsedTimeInSec()
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
double Timer::getElapsedTime()
|
||||
{
|
||||
return this->getElapsedTimeInSec();
|
||||
}
|
56
examples/fbomsaa/Timer.h
Normal file
56
examples/fbomsaa/Timer.h
Normal file
@ -0,0 +1,56 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// Timer.h
|
||||
// =======
|
||||
// High Resolution Timer.
|
||||
// This timer is able to measure the elapsed time with 1 micro-second accuracy
|
||||
// in both Windows, Linux and Unix system
|
||||
//
|
||||
// AUTHOR: Song Ho Ahn (song.ahn@gmail.com)
|
||||
// CREATED: 2003-01-13
|
||||
// UPDATED: 2017-03-30
|
||||
//
|
||||
// Copyright (c) 2003 Song Ho Ahn
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef TIMER_H_DEF
|
||||
#define TIMER_H_DEF
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32) // Windows system specific
|
||||
#include <windows.h>
|
||||
#else // Unix based system specific
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
|
||||
|
||||
class Timer
|
||||
{
|
||||
public:
|
||||
Timer(); // default constructor
|
||||
~Timer(); // default destructor
|
||||
|
||||
void start(); // start timer
|
||||
void stop(); // stop the timer
|
||||
double getElapsedTime(); // get elapsed time in second
|
||||
double getElapsedTimeInSec(); // get elapsed time in second (same as getElapsedTime)
|
||||
double getElapsedTimeInMilliSec(); // get elapsed time in milli-second
|
||||
double getElapsedTimeInMicroSec(); // get elapsed time in micro-second
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
private:
|
||||
double startTimeInMicroSec; // starting time in micro-second
|
||||
double endTimeInMicroSec; // ending time in micro-second
|
||||
int stopped; // stop flag
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
LARGE_INTEGER frequency; // ticks per second
|
||||
LARGE_INTEGER startCount; //
|
||||
LARGE_INTEGER endCount; //
|
||||
#else
|
||||
timeval startCount; //
|
||||
timeval endCount; //
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif // TIMER_H_DEF
|
160
examples/fbomsaa/fbomsaa.vcxproj
Normal file
160
examples/fbomsaa/fbomsaa.vcxproj
Normal file
@ -0,0 +1,160 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="14.0" 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>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="glInfo.cpp" />
|
||||
<ClCompile Include="main.cpp" />
|
||||
<ClCompile Include="Timer.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="glext.h" />
|
||||
<ClInclude Include="glInfo.h" />
|
||||
<ClInclude Include="teapot.h" />
|
||||
<ClInclude Include="Timer.h" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{114E9625-4259-4C6E-84D1-F854FC0C4E28}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>fbomsaa</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v140</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)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\..\glew;..\..\glew\gl;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalLibraryDirectories>..\..\glew\lib</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
221
examples/fbomsaa/glInfo.cpp
Normal file
221
examples/fbomsaa/glInfo.cpp
Normal file
@ -0,0 +1,221 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// glInfo.cpp
|
||||
// ==========
|
||||
// get GL vendor, version, supported extensions and other states using glGet*
|
||||
// functions and store them glInfo struct variable
|
||||
//
|
||||
// To get valid OpenGL infos, OpenGL rendering context (RC) must be opened
|
||||
// before calling glInfo::getInfo(). Otherwise it returns false.
|
||||
//
|
||||
// AUTHOR: Song Ho Ahn (song.ahn@gmail.com)
|
||||
// CREATED: 2005-10-04
|
||||
// UPDATED: 2013-03-06
|
||||
//
|
||||
// Copyright (c) 2005-2013 Song Ho Ahn
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#ifdef __APPLE__
|
||||
#include <OpenGL/gl.h>
|
||||
#else
|
||||
#include <GL/gl.h>
|
||||
#endif
|
||||
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
#include <algorithm>
|
||||
#include <cstring>
|
||||
#include "glInfo.h"
|
||||
|
||||
|
||||
|
||||
// WGL specific extensions for v3.0+ //////////////////////////////////////////
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#ifndef WGLGETEXTENSIONSSTRINGARB_DEF
|
||||
#define WGLGETEXTENSIONSSTRINGARB_DEF
|
||||
typedef const char* (WINAPI * PFNWGLGETEXTENSIONSSTRINGARBPROC)(HDC hdc);
|
||||
PFNWGLGETEXTENSIONSSTRINGARBPROC pwglGetExtensionsStringARB = 0;
|
||||
#define wglGetExtensionsStringARB pwglGetExtensionsStringARB
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// version 2.0 or greater
|
||||
#define GL_SHADING_LANGUAGE_VERSION 0x8B8C
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// extract openGL info
|
||||
// This function must be called after GL rendering context opened.
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
void glInfo::getInfo(unsigned int param)
|
||||
{
|
||||
std::string str;
|
||||
|
||||
// get vendor string
|
||||
str = (const char*)glGetString(GL_VENDOR);
|
||||
this->vendor = str; // check NULL return value
|
||||
|
||||
// get renderer string
|
||||
str = (const char*)glGetString(GL_RENDERER);
|
||||
this->renderer = str; // check NULL return value
|
||||
|
||||
// get version string
|
||||
str = (const char*)glGetString(GL_VERSION);
|
||||
this->version = str; // check NULL return value
|
||||
|
||||
// get all extensions as a string
|
||||
str = (const char*)glGetString(GL_EXTENSIONS);
|
||||
|
||||
// split extensions
|
||||
if(str.size() > 0)
|
||||
{
|
||||
char* str2 = new char[str.size() + 1];
|
||||
strcpy(str2, str.c_str());
|
||||
char* tok = strtok(str2, " ");
|
||||
while(tok)
|
||||
{
|
||||
this->extensions.push_back(tok); // put a extension into struct
|
||||
tok = strtok(0, " "); // next token
|
||||
}
|
||||
delete [] str2;
|
||||
}
|
||||
|
||||
// get GLSL version string (v2.0+)
|
||||
str = (const char*)glGetString(GL_SHADING_LANGUAGE_VERSION);
|
||||
if(str.size() > 0)
|
||||
this->glslVersion = str;
|
||||
else
|
||||
{
|
||||
// "GL_SHADING_LANGUAGE_VERSION" token is added later (v2.0) after the
|
||||
// first GLSL included in OpenGL (v1.5). If "GL_SHADING_LANGUAGE_VERSION"
|
||||
// is invalid token but "GL_ARB_shading_language_100" is supported, then
|
||||
// the GLSL version should be 1.0.rev.51
|
||||
if(isExtensionSupported("GL_ARB_shading_language_100"))
|
||||
glslVersion = "1.0.51"; // the first GLSL version
|
||||
else
|
||||
glslVersion = "";
|
||||
}
|
||||
|
||||
// get WGL specific extensions for v3.0+
|
||||
#ifdef _WIN32 //===========================================
|
||||
wglGetExtensionsStringARB = (PFNWGLGETEXTENSIONSSTRINGARBPROC)wglGetProcAddress("wglGetExtensionsStringARB");
|
||||
if(wglGetExtensionsStringARB && param)
|
||||
{
|
||||
str = (const char*)wglGetExtensionsStringARB((HDC)param);
|
||||
if(str.size() > 0)
|
||||
{
|
||||
char* str2 = new char[str.size() + 1];
|
||||
strcpy(str2, str.c_str());
|
||||
char* tok = strtok(str2, " ");
|
||||
while(tok)
|
||||
{
|
||||
this->extensions.push_back(tok); // put a extension into struct
|
||||
tok = strtok(0, " "); // next token
|
||||
}
|
||||
delete [] str2;
|
||||
}
|
||||
}
|
||||
#endif //==================================================
|
||||
|
||||
// sort extension by alphabetical order
|
||||
std::sort(this->extensions.begin(), this->extensions.end());
|
||||
|
||||
// get number of color bits
|
||||
glGetIntegerv(GL_RED_BITS, &this->redBits);
|
||||
glGetIntegerv(GL_GREEN_BITS, &this->greenBits);
|
||||
glGetIntegerv(GL_BLUE_BITS, &this->blueBits);
|
||||
glGetIntegerv(GL_ALPHA_BITS, &this->alphaBits);
|
||||
|
||||
// get depth bits
|
||||
glGetIntegerv(GL_DEPTH_BITS, &this->depthBits);
|
||||
|
||||
// get stecil bits
|
||||
glGetIntegerv(GL_STENCIL_BITS, &this->stencilBits);
|
||||
|
||||
// get max number of lights allowed
|
||||
glGetIntegerv(GL_MAX_LIGHTS, &this->maxLights);
|
||||
|
||||
// get max texture resolution
|
||||
glGetIntegerv(GL_MAX_TEXTURE_SIZE, &this->maxTextureSize);
|
||||
|
||||
// get max number of clipping planes
|
||||
glGetIntegerv(GL_MAX_CLIP_PLANES, &this->maxClipPlanes);
|
||||
|
||||
// get max modelview and projection matrix stacks
|
||||
glGetIntegerv(GL_MAX_MODELVIEW_STACK_DEPTH, &this->maxModelViewStacks);
|
||||
glGetIntegerv(GL_MAX_PROJECTION_STACK_DEPTH, &this->maxProjectionStacks);
|
||||
glGetIntegerv(GL_MAX_ATTRIB_STACK_DEPTH, &this->maxAttribStacks);
|
||||
|
||||
// get max texture stacks
|
||||
glGetIntegerv(GL_MAX_TEXTURE_STACK_DEPTH, &this->maxTextureStacks);
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// check if the video card support a certain extension
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
bool glInfo::isExtensionSupported(const std::string& ext)
|
||||
{
|
||||
// search corresponding extension
|
||||
std::vector<std::string>::const_iterator iter = this->extensions.begin();
|
||||
std::vector<std::string>::const_iterator endIter = this->extensions.end();
|
||||
|
||||
while(iter != endIter)
|
||||
{
|
||||
if(ext == *iter)
|
||||
return true;
|
||||
else
|
||||
++iter;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// print OpenGL info to screen and save to a file
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
void glInfo::printSelf()
|
||||
{
|
||||
std::stringstream ss;
|
||||
|
||||
ss << std::endl; // blank line
|
||||
ss << "OpenGL Driver Info" << std::endl;
|
||||
ss << "==================" << std::endl;
|
||||
ss << "Vendor: " << this->vendor << std::endl;
|
||||
ss << "Version: " << this->version << std::endl;
|
||||
ss << "GLSL Version: " << this->glslVersion << std::endl;
|
||||
ss << "Renderer: " << this->renderer << std::endl;
|
||||
|
||||
ss << std::endl;
|
||||
ss << "Color Bits(R,G,B,A): (" << this->redBits << ", " << this->greenBits
|
||||
<< ", " << this->blueBits << ", " << this->alphaBits << ")\n";
|
||||
ss << "Depth Bits: " << this->depthBits << std::endl;
|
||||
ss << "Stencil Bits: " << this->stencilBits << std::endl;
|
||||
|
||||
ss << std::endl;
|
||||
ss << "Max Texture Size: " << this->maxTextureSize << "x" << this->maxTextureSize << std::endl;
|
||||
ss << "Max Lights: " << this->maxLights << std::endl;
|
||||
ss << "Max Clip Planes: " << this->maxClipPlanes << std::endl;
|
||||
ss << "Max Modelview Matrix Stacks: " << this->maxModelViewStacks << std::endl;
|
||||
ss << "Max Projection Matrix Stacks: " << this->maxProjectionStacks << std::endl;
|
||||
ss << "Max Attribute Stacks: " << this->maxAttribStacks << std::endl;
|
||||
ss << "Max Texture Stacks: " << this->maxTextureStacks << std::endl;
|
||||
|
||||
ss << std::endl;
|
||||
ss << "Total Number of Extensions: " << this->extensions.size() << std::endl;
|
||||
ss << "==============================" << std::endl;
|
||||
for(unsigned int i = 0; i < this->extensions.size(); ++i)
|
||||
ss << this->extensions.at(i) << std::endl;
|
||||
|
||||
ss << "======================================================================" << std::endl;
|
||||
|
||||
std::cout << ss.str() << std::endl;
|
||||
}
|
55
examples/fbomsaa/glInfo.h
Normal file
55
examples/fbomsaa/glInfo.h
Normal file
@ -0,0 +1,55 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// glInfo.h
|
||||
// ========
|
||||
// get GL vendor, version, supported extensions and other states using glGet*
|
||||
// functions and store them glInfo struct variable
|
||||
//
|
||||
// To get valid OpenGL infos, OpenGL rendering context (RC) must be opened
|
||||
// before calling glInfo::getInfo(). Otherwise it returns false.
|
||||
//
|
||||
// AUTHOR: Song Ho Ahn (song.ahn@gmail.com)
|
||||
// CREATED: 2005-10-04
|
||||
// UPDATED: 2013-03-06
|
||||
//
|
||||
// Copyright (c) 2005-2013 Song Ho Ahn
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef GLINFO_H
|
||||
#define GLINFO_H
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
// struct variable to store OpenGL info
|
||||
struct glInfo
|
||||
{
|
||||
std::string vendor;
|
||||
std::string renderer;
|
||||
std::string version;
|
||||
std::string glslVersion;
|
||||
std::vector <std::string> extensions;
|
||||
int redBits;
|
||||
int greenBits;
|
||||
int blueBits;
|
||||
int alphaBits;
|
||||
int depthBits;
|
||||
int stencilBits;
|
||||
int maxTextureSize;
|
||||
int maxLights;
|
||||
int maxAttribStacks;
|
||||
int maxModelViewStacks;
|
||||
int maxProjectionStacks;
|
||||
int maxClipPlanes;
|
||||
int maxTextureStacks;
|
||||
|
||||
// ctor, init all members
|
||||
glInfo() : redBits(0), greenBits(0), blueBits(0), alphaBits(0), depthBits(0),
|
||||
stencilBits(0), maxTextureSize(0), maxLights(0), maxAttribStacks(0),
|
||||
maxModelViewStacks(0), maxClipPlanes(0), maxTextureStacks(0) {}
|
||||
|
||||
void getInfo(unsigned int param=0); // extract info
|
||||
void printSelf(); // print itself
|
||||
bool isExtensionSupported(const std::string& ext); // check if a extension is supported
|
||||
};
|
||||
|
||||
#endif
|
12146
examples/fbomsaa/glext.h
Normal file
12146
examples/fbomsaa/glext.h
Normal file
File diff suppressed because it is too large
Load Diff
1392
examples/fbomsaa/main.cpp
Normal file
1392
examples/fbomsaa/main.cpp
Normal file
File diff suppressed because it is too large
Load Diff
4366
examples/fbomsaa/teapot.h
Normal file
4366
examples/fbomsaa/teapot.h
Normal file
File diff suppressed because it is too large
Load Diff
132
examples/fbostencil/Timer.cpp
Normal file
132
examples/fbostencil/Timer.cpp
Normal file
@ -0,0 +1,132 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// Timer.cpp
|
||||
// =========
|
||||
// High Resolution Timer.
|
||||
// This timer is able to measure the elapsed time with 1 micro-second accuracy
|
||||
// in both Windows, Linux and Unix system
|
||||
//
|
||||
// AUTHOR: Song Ho Ahn (song.ahn@gmail.com)
|
||||
// CREATED: 2003-01-13
|
||||
// UPDATED: 2017-03-30
|
||||
//
|
||||
// Copyright (c) 2003 Song Ho Ahn
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "Timer.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// constructor
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
Timer::Timer()
|
||||
{
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
QueryPerformanceFrequency(&frequency);
|
||||
startCount.QuadPart = 0;
|
||||
endCount.QuadPart = 0;
|
||||
#else
|
||||
startCount.tv_sec = startCount.tv_usec = 0;
|
||||
endCount.tv_sec = endCount.tv_usec = 0;
|
||||
#endif
|
||||
|
||||
stopped = 0;
|
||||
startTimeInMicroSec = 0;
|
||||
endTimeInMicroSec = 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// distructor
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
Timer::~Timer()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// start timer.
|
||||
// startCount will be set at this point.
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
void Timer::start()
|
||||
{
|
||||
stopped = 0; // reset stop flag
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
QueryPerformanceCounter(&startCount);
|
||||
#else
|
||||
gettimeofday(&startCount, NULL);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// stop the timer.
|
||||
// endCount will be set at this point.
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
void Timer::stop()
|
||||
{
|
||||
stopped = 1; // set timer stopped flag
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
QueryPerformanceCounter(&endCount);
|
||||
#else
|
||||
gettimeofday(&endCount, NULL);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// compute elapsed time in micro-second resolution.
|
||||
// other getElapsedTime will call this first, then convert to correspond resolution.
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
double Timer::getElapsedTimeInMicroSec()
|
||||
{
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
if(!stopped)
|
||||
QueryPerformanceCounter(&endCount);
|
||||
|
||||
startTimeInMicroSec = startCount.QuadPart * (1000000.0 / frequency.QuadPart);
|
||||
endTimeInMicroSec = endCount.QuadPart * (1000000.0 / frequency.QuadPart);
|
||||
#else
|
||||
if(!stopped)
|
||||
gettimeofday(&endCount, NULL);
|
||||
|
||||
startTimeInMicroSec = (startCount.tv_sec * 1000000.0) + startCount.tv_usec;
|
||||
endTimeInMicroSec = (endCount.tv_sec * 1000000.0) + endCount.tv_usec;
|
||||
#endif
|
||||
|
||||
return endTimeInMicroSec - startTimeInMicroSec;
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// divide elapsedTimeInMicroSec by 1000
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
double Timer::getElapsedTimeInMilliSec()
|
||||
{
|
||||
return this->getElapsedTimeInMicroSec() * 0.001;
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// divide elapsedTimeInMicroSec by 1000000
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
double Timer::getElapsedTimeInSec()
|
||||
{
|
||||
return this->getElapsedTimeInMicroSec() * 0.000001;
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// same as getElapsedTimeInSec()
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
double Timer::getElapsedTime()
|
||||
{
|
||||
return this->getElapsedTimeInSec();
|
||||
}
|
56
examples/fbostencil/Timer.h
Normal file
56
examples/fbostencil/Timer.h
Normal file
@ -0,0 +1,56 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// Timer.h
|
||||
// =======
|
||||
// High Resolution Timer.
|
||||
// This timer is able to measure the elapsed time with 1 micro-second accuracy
|
||||
// in both Windows, Linux and Unix system
|
||||
//
|
||||
// AUTHOR: Song Ho Ahn (song.ahn@gmail.com)
|
||||
// CREATED: 2003-01-13
|
||||
// UPDATED: 2017-03-30
|
||||
//
|
||||
// Copyright (c) 2003 Song Ho Ahn
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef TIMER_H_DEF
|
||||
#define TIMER_H_DEF
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32) // Windows system specific
|
||||
#include <windows.h>
|
||||
#else // Unix based system specific
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
|
||||
|
||||
class Timer
|
||||
{
|
||||
public:
|
||||
Timer(); // default constructor
|
||||
~Timer(); // default destructor
|
||||
|
||||
void start(); // start timer
|
||||
void stop(); // stop the timer
|
||||
double getElapsedTime(); // get elapsed time in second
|
||||
double getElapsedTimeInSec(); // get elapsed time in second (same as getElapsedTime)
|
||||
double getElapsedTimeInMilliSec(); // get elapsed time in milli-second
|
||||
double getElapsedTimeInMicroSec(); // get elapsed time in micro-second
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
private:
|
||||
double startTimeInMicroSec; // starting time in micro-second
|
||||
double endTimeInMicroSec; // ending time in micro-second
|
||||
int stopped; // stop flag
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
LARGE_INTEGER frequency; // ticks per second
|
||||
LARGE_INTEGER startCount; //
|
||||
LARGE_INTEGER endCount; //
|
||||
#else
|
||||
timeval startCount; //
|
||||
timeval endCount; //
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif // TIMER_H_DEF
|
160
examples/fbostencil/fbostencil.vcxproj
Normal file
160
examples/fbostencil/fbostencil.vcxproj
Normal file
@ -0,0 +1,160 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="14.0" 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>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="glInfo.cpp" />
|
||||
<ClCompile Include="main.cpp" />
|
||||
<ClCompile Include="Timer.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="glext.h" />
|
||||
<ClInclude Include="glInfo.h" />
|
||||
<ClInclude Include="teapot.h" />
|
||||
<ClInclude Include="Timer.h" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{8F030B44-DFBF-4975-90ED-59815D2FC6B4}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>fbostencil</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v140</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)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\..\glew;..\..\glew\gl;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalLibraryDirectories>..\..\glew\lib</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
221
examples/fbostencil/glInfo.cpp
Normal file
221
examples/fbostencil/glInfo.cpp
Normal file
@ -0,0 +1,221 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// glInfo.cpp
|
||||
// ==========
|
||||
// get GL vendor, version, supported extensions and other states using glGet*
|
||||
// functions and store them glInfo struct variable
|
||||
//
|
||||
// To get valid OpenGL infos, OpenGL rendering context (RC) must be opened
|
||||
// before calling glInfo::getInfo(). Otherwise it returns false.
|
||||
//
|
||||
// AUTHOR: Song Ho Ahn (song.ahn@gmail.com)
|
||||
// CREATED: 2005-10-04
|
||||
// UPDATED: 2013-03-06
|
||||
//
|
||||
// Copyright (c) 2005-2013 Song Ho Ahn
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#ifdef __APPLE__
|
||||
#include <OpenGL/gl.h>
|
||||
#else
|
||||
#include <GL/gl.h>
|
||||
#endif
|
||||
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
#include <algorithm>
|
||||
#include <cstring>
|
||||
#include "glInfo.h"
|
||||
|
||||
|
||||
|
||||
// WGL specific extensions for v3.0+ //////////////////////////////////////////
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#ifndef WGLGETEXTENSIONSSTRINGARB_DEF
|
||||
#define WGLGETEXTENSIONSSTRINGARB_DEF
|
||||
typedef const char* (WINAPI * PFNWGLGETEXTENSIONSSTRINGARBPROC)(HDC hdc);
|
||||
PFNWGLGETEXTENSIONSSTRINGARBPROC pwglGetExtensionsStringARB = 0;
|
||||
#define wglGetExtensionsStringARB pwglGetExtensionsStringARB
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// version 2.0 or greater
|
||||
#define GL_SHADING_LANGUAGE_VERSION 0x8B8C
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// extract openGL info
|
||||
// This function must be called after GL rendering context opened.
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
void glInfo::getInfo(unsigned int param)
|
||||
{
|
||||
std::string str;
|
||||
|
||||
// get vendor string
|
||||
str = (const char*)glGetString(GL_VENDOR);
|
||||
this->vendor = str; // check NULL return value
|
||||
|
||||
// get renderer string
|
||||
str = (const char*)glGetString(GL_RENDERER);
|
||||
this->renderer = str; // check NULL return value
|
||||
|
||||
// get version string
|
||||
str = (const char*)glGetString(GL_VERSION);
|
||||
this->version = str; // check NULL return value
|
||||
|
||||
// get all extensions as a string
|
||||
str = (const char*)glGetString(GL_EXTENSIONS);
|
||||
|
||||
// split extensions
|
||||
if(str.size() > 0)
|
||||
{
|
||||
char* str2 = new char[str.size() + 1];
|
||||
strcpy(str2, str.c_str());
|
||||
char* tok = strtok(str2, " ");
|
||||
while(tok)
|
||||
{
|
||||
this->extensions.push_back(tok); // put a extension into struct
|
||||
tok = strtok(0, " "); // next token
|
||||
}
|
||||
delete [] str2;
|
||||
}
|
||||
|
||||
// get GLSL version string (v2.0+)
|
||||
str = (const char*)glGetString(GL_SHADING_LANGUAGE_VERSION);
|
||||
if(str.size() > 0)
|
||||
this->glslVersion = str;
|
||||
else
|
||||
{
|
||||
// "GL_SHADING_LANGUAGE_VERSION" token is added later (v2.0) after the
|
||||
// first GLSL included in OpenGL (v1.5). If "GL_SHADING_LANGUAGE_VERSION"
|
||||
// is invalid token but "GL_ARB_shading_language_100" is supported, then
|
||||
// the GLSL version should be 1.0.rev.51
|
||||
if(isExtensionSupported("GL_ARB_shading_language_100"))
|
||||
glslVersion = "1.0.51"; // the first GLSL version
|
||||
else
|
||||
glslVersion = "";
|
||||
}
|
||||
|
||||
// get WGL specific extensions for v3.0+
|
||||
#ifdef _WIN32 //===========================================
|
||||
wglGetExtensionsStringARB = (PFNWGLGETEXTENSIONSSTRINGARBPROC)wglGetProcAddress("wglGetExtensionsStringARB");
|
||||
if(wglGetExtensionsStringARB && param)
|
||||
{
|
||||
str = (const char*)wglGetExtensionsStringARB((HDC)param);
|
||||
if(str.size() > 0)
|
||||
{
|
||||
char* str2 = new char[str.size() + 1];
|
||||
strcpy(str2, str.c_str());
|
||||
char* tok = strtok(str2, " ");
|
||||
while(tok)
|
||||
{
|
||||
this->extensions.push_back(tok); // put a extension into struct
|
||||
tok = strtok(0, " "); // next token
|
||||
}
|
||||
delete [] str2;
|
||||
}
|
||||
}
|
||||
#endif //==================================================
|
||||
|
||||
// sort extension by alphabetical order
|
||||
std::sort(this->extensions.begin(), this->extensions.end());
|
||||
|
||||
// get number of color bits
|
||||
glGetIntegerv(GL_RED_BITS, &this->redBits);
|
||||
glGetIntegerv(GL_GREEN_BITS, &this->greenBits);
|
||||
glGetIntegerv(GL_BLUE_BITS, &this->blueBits);
|
||||
glGetIntegerv(GL_ALPHA_BITS, &this->alphaBits);
|
||||
|
||||
// get depth bits
|
||||
glGetIntegerv(GL_DEPTH_BITS, &this->depthBits);
|
||||
|
||||
// get stecil bits
|
||||
glGetIntegerv(GL_STENCIL_BITS, &this->stencilBits);
|
||||
|
||||
// get max number of lights allowed
|
||||
glGetIntegerv(GL_MAX_LIGHTS, &this->maxLights);
|
||||
|
||||
// get max texture resolution
|
||||
glGetIntegerv(GL_MAX_TEXTURE_SIZE, &this->maxTextureSize);
|
||||
|
||||
// get max number of clipping planes
|
||||
glGetIntegerv(GL_MAX_CLIP_PLANES, &this->maxClipPlanes);
|
||||
|
||||
// get max modelview and projection matrix stacks
|
||||
glGetIntegerv(GL_MAX_MODELVIEW_STACK_DEPTH, &this->maxModelViewStacks);
|
||||
glGetIntegerv(GL_MAX_PROJECTION_STACK_DEPTH, &this->maxProjectionStacks);
|
||||
glGetIntegerv(GL_MAX_ATTRIB_STACK_DEPTH, &this->maxAttribStacks);
|
||||
|
||||
// get max texture stacks
|
||||
glGetIntegerv(GL_MAX_TEXTURE_STACK_DEPTH, &this->maxTextureStacks);
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// check if the video card support a certain extension
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
bool glInfo::isExtensionSupported(const std::string& ext)
|
||||
{
|
||||
// search corresponding extension
|
||||
std::vector<std::string>::const_iterator iter = this->extensions.begin();
|
||||
std::vector<std::string>::const_iterator endIter = this->extensions.end();
|
||||
|
||||
while(iter != endIter)
|
||||
{
|
||||
if(ext == *iter)
|
||||
return true;
|
||||
else
|
||||
++iter;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// print OpenGL info to screen and save to a file
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
void glInfo::printSelf()
|
||||
{
|
||||
std::stringstream ss;
|
||||
|
||||
ss << std::endl; // blank line
|
||||
ss << "OpenGL Driver Info" << std::endl;
|
||||
ss << "==================" << std::endl;
|
||||
ss << "Vendor: " << this->vendor << std::endl;
|
||||
ss << "Version: " << this->version << std::endl;
|
||||
ss << "GLSL Version: " << this->glslVersion << std::endl;
|
||||
ss << "Renderer: " << this->renderer << std::endl;
|
||||
|
||||
ss << std::endl;
|
||||
ss << "Color Bits(R,G,B,A): (" << this->redBits << ", " << this->greenBits
|
||||
<< ", " << this->blueBits << ", " << this->alphaBits << ")\n";
|
||||
ss << "Depth Bits: " << this->depthBits << std::endl;
|
||||
ss << "Stencil Bits: " << this->stencilBits << std::endl;
|
||||
|
||||
ss << std::endl;
|
||||
ss << "Max Texture Size: " << this->maxTextureSize << "x" << this->maxTextureSize << std::endl;
|
||||
ss << "Max Lights: " << this->maxLights << std::endl;
|
||||
ss << "Max Clip Planes: " << this->maxClipPlanes << std::endl;
|
||||
ss << "Max Modelview Matrix Stacks: " << this->maxModelViewStacks << std::endl;
|
||||
ss << "Max Projection Matrix Stacks: " << this->maxProjectionStacks << std::endl;
|
||||
ss << "Max Attribute Stacks: " << this->maxAttribStacks << std::endl;
|
||||
ss << "Max Texture Stacks: " << this->maxTextureStacks << std::endl;
|
||||
|
||||
ss << std::endl;
|
||||
ss << "Total Number of Extensions: " << this->extensions.size() << std::endl;
|
||||
ss << "==============================" << std::endl;
|
||||
for(unsigned int i = 0; i < this->extensions.size(); ++i)
|
||||
ss << this->extensions.at(i) << std::endl;
|
||||
|
||||
ss << "======================================================================" << std::endl;
|
||||
|
||||
std::cout << ss.str() << std::endl;
|
||||
}
|
55
examples/fbostencil/glInfo.h
Normal file
55
examples/fbostencil/glInfo.h
Normal file
@ -0,0 +1,55 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// glInfo.h
|
||||
// ========
|
||||
// get GL vendor, version, supported extensions and other states using glGet*
|
||||
// functions and store them glInfo struct variable
|
||||
//
|
||||
// To get valid OpenGL infos, OpenGL rendering context (RC) must be opened
|
||||
// before calling glInfo::getInfo(). Otherwise it returns false.
|
||||
//
|
||||
// AUTHOR: Song Ho Ahn (song.ahn@gmail.com)
|
||||
// CREATED: 2005-10-04
|
||||
// UPDATED: 2013-03-06
|
||||
//
|
||||
// Copyright (c) 2005-2013 Song Ho Ahn
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef GLINFO_H
|
||||
#define GLINFO_H
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
// struct variable to store OpenGL info
|
||||
struct glInfo
|
||||
{
|
||||
std::string vendor;
|
||||
std::string renderer;
|
||||
std::string version;
|
||||
std::string glslVersion;
|
||||
std::vector <std::string> extensions;
|
||||
int redBits;
|
||||
int greenBits;
|
||||
int blueBits;
|
||||
int alphaBits;
|
||||
int depthBits;
|
||||
int stencilBits;
|
||||
int maxTextureSize;
|
||||
int maxLights;
|
||||
int maxAttribStacks;
|
||||
int maxModelViewStacks;
|
||||
int maxProjectionStacks;
|
||||
int maxClipPlanes;
|
||||
int maxTextureStacks;
|
||||
|
||||
// ctor, init all members
|
||||
glInfo() : redBits(0), greenBits(0), blueBits(0), alphaBits(0), depthBits(0),
|
||||
stencilBits(0), maxTextureSize(0), maxLights(0), maxAttribStacks(0),
|
||||
maxModelViewStacks(0), maxClipPlanes(0), maxTextureStacks(0) {}
|
||||
|
||||
void getInfo(unsigned int param=0); // extract info
|
||||
void printSelf(); // print itself
|
||||
bool isExtensionSupported(const std::string& ext); // check if a extension is supported
|
||||
};
|
||||
|
||||
#endif
|
12146
examples/fbostencil/glext.h
Normal file
12146
examples/fbostencil/glext.h
Normal file
File diff suppressed because it is too large
Load Diff
1407
examples/fbostencil/main.cpp
Normal file
1407
examples/fbostencil/main.cpp
Normal file
File diff suppressed because it is too large
Load Diff
4366
examples/fbostencil/teapot.h
Normal file
4366
examples/fbostencil/teapot.h
Normal file
File diff suppressed because it is too large
Load Diff
132
examples/vbo/Timer.cpp
Normal file
132
examples/vbo/Timer.cpp
Normal file
@ -0,0 +1,132 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// Timer.cpp
|
||||
// =========
|
||||
// High Resolution Timer.
|
||||
// This timer is able to measure the elapsed time with 1 micro-second accuracy
|
||||
// in both Windows, Linux and Unix system
|
||||
//
|
||||
// AUTHOR: Song Ho Ahn (song.ahn@gmail.com)
|
||||
// CREATED: 2003-01-13
|
||||
// UPDATED: 2017-03-30
|
||||
//
|
||||
// Copyright (c) 2003 Song Ho Ahn
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "Timer.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// constructor
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
Timer::Timer()
|
||||
{
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
QueryPerformanceFrequency(&frequency);
|
||||
startCount.QuadPart = 0;
|
||||
endCount.QuadPart = 0;
|
||||
#else
|
||||
startCount.tv_sec = startCount.tv_usec = 0;
|
||||
endCount.tv_sec = endCount.tv_usec = 0;
|
||||
#endif
|
||||
|
||||
stopped = 0;
|
||||
startTimeInMicroSec = 0;
|
||||
endTimeInMicroSec = 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// distructor
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
Timer::~Timer()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// start timer.
|
||||
// startCount will be set at this point.
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
void Timer::start()
|
||||
{
|
||||
stopped = 0; // reset stop flag
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
QueryPerformanceCounter(&startCount);
|
||||
#else
|
||||
gettimeofday(&startCount, NULL);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// stop the timer.
|
||||
// endCount will be set at this point.
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
void Timer::stop()
|
||||
{
|
||||
stopped = 1; // set timer stopped flag
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
QueryPerformanceCounter(&endCount);
|
||||
#else
|
||||
gettimeofday(&endCount, NULL);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// compute elapsed time in micro-second resolution.
|
||||
// other getElapsedTime will call this first, then convert to correspond resolution.
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
double Timer::getElapsedTimeInMicroSec()
|
||||
{
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
if(!stopped)
|
||||
QueryPerformanceCounter(&endCount);
|
||||
|
||||
startTimeInMicroSec = startCount.QuadPart * (1000000.0 / frequency.QuadPart);
|
||||
endTimeInMicroSec = endCount.QuadPart * (1000000.0 / frequency.QuadPart);
|
||||
#else
|
||||
if(!stopped)
|
||||
gettimeofday(&endCount, NULL);
|
||||
|
||||
startTimeInMicroSec = (startCount.tv_sec * 1000000.0) + startCount.tv_usec;
|
||||
endTimeInMicroSec = (endCount.tv_sec * 1000000.0) + endCount.tv_usec;
|
||||
#endif
|
||||
|
||||
return endTimeInMicroSec - startTimeInMicroSec;
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// divide elapsedTimeInMicroSec by 1000
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
double Timer::getElapsedTimeInMilliSec()
|
||||
{
|
||||
return this->getElapsedTimeInMicroSec() * 0.001;
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// divide elapsedTimeInMicroSec by 1000000
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
double Timer::getElapsedTimeInSec()
|
||||
{
|
||||
return this->getElapsedTimeInMicroSec() * 0.000001;
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// same as getElapsedTimeInSec()
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
double Timer::getElapsedTime()
|
||||
{
|
||||
return this->getElapsedTimeInSec();
|
||||
}
|
56
examples/vbo/Timer.h
Normal file
56
examples/vbo/Timer.h
Normal file
@ -0,0 +1,56 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// Timer.h
|
||||
// =======
|
||||
// High Resolution Timer.
|
||||
// This timer is able to measure the elapsed time with 1 micro-second accuracy
|
||||
// in both Windows, Linux and Unix system
|
||||
//
|
||||
// AUTHOR: Song Ho Ahn (song.ahn@gmail.com)
|
||||
// CREATED: 2003-01-13
|
||||
// UPDATED: 2017-03-30
|
||||
//
|
||||
// Copyright (c) 2003 Song Ho Ahn
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef TIMER_H_DEF
|
||||
#define TIMER_H_DEF
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32) // Windows system specific
|
||||
#include <windows.h>
|
||||
#else // Unix based system specific
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
|
||||
|
||||
class Timer
|
||||
{
|
||||
public:
|
||||
Timer(); // default constructor
|
||||
~Timer(); // default destructor
|
||||
|
||||
void start(); // start timer
|
||||
void stop(); // stop the timer
|
||||
double getElapsedTime(); // get elapsed time in second
|
||||
double getElapsedTimeInSec(); // get elapsed time in second (same as getElapsedTime)
|
||||
double getElapsedTimeInMilliSec(); // get elapsed time in milli-second
|
||||
double getElapsedTimeInMicroSec(); // get elapsed time in micro-second
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
private:
|
||||
double startTimeInMicroSec; // starting time in micro-second
|
||||
double endTimeInMicroSec; // ending time in micro-second
|
||||
int stopped; // stop flag
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
LARGE_INTEGER frequency; // ticks per second
|
||||
LARGE_INTEGER startCount; //
|
||||
LARGE_INTEGER endCount; //
|
||||
#else
|
||||
timeval startCount; //
|
||||
timeval endCount; //
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif // TIMER_H_DEF
|
60
examples/vbo/WaveFunc.cpp
Normal file
60
examples/vbo/WaveFunc.cpp
Normal file
@ -0,0 +1,60 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// WaveFunc.cpp
|
||||
// ============
|
||||
// compute the output of periodic wave function at given time(second)
|
||||
// It can be used for wobbling effects on vertex data
|
||||
//
|
||||
// AUTHOR: Song Ho Ahn (song.ahn@gmail.com)
|
||||
// CREATED: 2005-11-15
|
||||
// UPDATED: 2005-11-15
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "WaveFunc.h"
|
||||
#include <cmath>
|
||||
const float PI2 = 6.283185f; // PI * 2
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// compute the position at the current time(sec)
|
||||
// Equation: amp * FUNC(freq*(t - phase)) + offset
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
float WaveFunc::update(float time)
|
||||
{
|
||||
// compute time factor between 0 and 1 from (freq*(time - phase))
|
||||
float timeFact = freq * (time - phase);
|
||||
timeFact -= (int)timeFact;
|
||||
|
||||
switch(func)
|
||||
{
|
||||
case FUNC_SIN:
|
||||
output = sinf(PI2 * timeFact);
|
||||
break;
|
||||
|
||||
case FUNC_TRIANGLE:
|
||||
if(timeFact < 0.25f) // 0 ~ 0.25
|
||||
output = 4 * timeFact;
|
||||
else if(timeFact < 0.75f) // 0.25 ~ 0.75
|
||||
output = 2 - (4 * timeFact);
|
||||
else // 0.75 ~ 1
|
||||
output = 4 * timeFact - 4;
|
||||
break;
|
||||
|
||||
case FUNC_SQUARE:
|
||||
if(timeFact < 0.5f)
|
||||
output = 1;
|
||||
else
|
||||
output = -1;
|
||||
break;
|
||||
|
||||
case FUNC_SAWTOOTH:
|
||||
output = 2 * timeFact - 1;
|
||||
break;
|
||||
|
||||
default:
|
||||
output = 1; // no function defined
|
||||
}
|
||||
|
||||
// apply amplitude and offset
|
||||
output = amp * output + offset;
|
||||
|
||||
return output;
|
||||
}
|
42
examples/vbo/WaveFunc.h
Normal file
42
examples/vbo/WaveFunc.h
Normal file
@ -0,0 +1,42 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// WaveFunc.h
|
||||
// ==========
|
||||
// compute the output of periodic wave function at given time(second)
|
||||
// It can be used for wobbling effects on vertex data
|
||||
//
|
||||
// AUTHOR: Song Ho Ahn (song.ahn@gmail.com)
|
||||
// CREATED: 2005-11-15
|
||||
// UPDATED: 2005-11-15
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef WAVEFUNC_H
|
||||
#define WAVEFUNC_H
|
||||
|
||||
enum FuncType // various periodic functions
|
||||
{
|
||||
FUNC_SIN = 0,
|
||||
FUNC_TRIANGLE,
|
||||
FUNC_SQUARE,
|
||||
FUNC_SAWTOOTH
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
// WaveFunc requires 4 params (amplitude, frequency, phase, offset).
|
||||
// The equation is: amp * func(freq(t - phase)) + offset
|
||||
struct WaveFunc
|
||||
{
|
||||
FuncType func;
|
||||
float amp; // amplitude
|
||||
float freq; // frequency
|
||||
float phase; // horizontal shift
|
||||
float offset; // vertical shift
|
||||
float output; // result at given time
|
||||
|
||||
// default constructor, initialize all members
|
||||
WaveFunc() : func(FUNC_SIN), amp(1.0f), freq(1.0f), phase(0.0f), offset(0.0f), output(0.0f) {}
|
||||
|
||||
// compute the position at the current time(sec)
|
||||
float update(float time);
|
||||
};
|
||||
|
||||
#endif
|
221
examples/vbo/glInfo.cpp
Normal file
221
examples/vbo/glInfo.cpp
Normal file
@ -0,0 +1,221 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// glInfo.cpp
|
||||
// ==========
|
||||
// get GL vendor, version, supported extensions and other states using glGet*
|
||||
// functions and store them glInfo struct variable
|
||||
//
|
||||
// To get valid OpenGL infos, OpenGL rendering context (RC) must be opened
|
||||
// before calling glInfo::getInfo(). Otherwise it returns false.
|
||||
//
|
||||
// AUTHOR: Song Ho Ahn (song.ahn@gmail.com)
|
||||
// CREATED: 2005-10-04
|
||||
// UPDATED: 2013-03-06
|
||||
//
|
||||
// Copyright (c) 2005-2013 Song Ho Ahn
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#ifdef __APPLE__
|
||||
#include <OpenGL/gl.h>
|
||||
#else
|
||||
#include <GL/gl.h>
|
||||
#endif
|
||||
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
#include <algorithm>
|
||||
#include <cstring>
|
||||
#include "glInfo.h"
|
||||
|
||||
|
||||
|
||||
// WGL specific extensions for v3.0+ //////////////////////////////////////////
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#ifndef WGLGETEXTENSIONSSTRINGARB_DEF
|
||||
#define WGLGETEXTENSIONSSTRINGARB_DEF
|
||||
typedef const char* (WINAPI * PFNWGLGETEXTENSIONSSTRINGARBPROC)(HDC hdc);
|
||||
PFNWGLGETEXTENSIONSSTRINGARBPROC pwglGetExtensionsStringARB = 0;
|
||||
#define wglGetExtensionsStringARB pwglGetExtensionsStringARB
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// version 2.0 or greater
|
||||
#define GL_SHADING_LANGUAGE_VERSION 0x8B8C
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// extract openGL info
|
||||
// This function must be called after GL rendering context opened.
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
void glInfo::getInfo(unsigned int param)
|
||||
{
|
||||
std::string str;
|
||||
|
||||
// get vendor string
|
||||
str = (const char*)glGetString(GL_VENDOR);
|
||||
this->vendor = str; // check NULL return value
|
||||
|
||||
// get renderer string
|
||||
str = (const char*)glGetString(GL_RENDERER);
|
||||
this->renderer = str; // check NULL return value
|
||||
|
||||
// get version string
|
||||
str = (const char*)glGetString(GL_VERSION);
|
||||
this->version = str; // check NULL return value
|
||||
|
||||
// get all extensions as a string
|
||||
str = (const char*)glGetString(GL_EXTENSIONS);
|
||||
|
||||
// split extensions
|
||||
if(str.size() > 0)
|
||||
{
|
||||
char* str2 = new char[str.size() + 1];
|
||||
strcpy(str2, str.c_str());
|
||||
char* tok = strtok(str2, " ");
|
||||
while(tok)
|
||||
{
|
||||
this->extensions.push_back(tok); // put a extension into struct
|
||||
tok = strtok(0, " "); // next token
|
||||
}
|
||||
delete [] str2;
|
||||
}
|
||||
|
||||
// get GLSL version string (v2.0+)
|
||||
str = (const char*)glGetString(GL_SHADING_LANGUAGE_VERSION);
|
||||
if(str.size() > 0)
|
||||
this->glslVersion = str;
|
||||
else
|
||||
{
|
||||
// "GL_SHADING_LANGUAGE_VERSION" token is added later (v2.0) after the
|
||||
// first GLSL included in OpenGL (v1.5). If "GL_SHADING_LANGUAGE_VERSION"
|
||||
// is invalid token but "GL_ARB_shading_language_100" is supported, then
|
||||
// the GLSL version should be 1.0.rev.51
|
||||
if(isExtensionSupported("GL_ARB_shading_language_100"))
|
||||
glslVersion = "1.0.51"; // the first GLSL version
|
||||
else
|
||||
glslVersion = "";
|
||||
}
|
||||
|
||||
// get WGL specific extensions for v3.0+
|
||||
#ifdef _WIN32 //===========================================
|
||||
wglGetExtensionsStringARB = (PFNWGLGETEXTENSIONSSTRINGARBPROC)wglGetProcAddress("wglGetExtensionsStringARB");
|
||||
if(wglGetExtensionsStringARB && param)
|
||||
{
|
||||
str = (const char*)wglGetExtensionsStringARB((HDC)param);
|
||||
if(str.size() > 0)
|
||||
{
|
||||
char* str2 = new char[str.size() + 1];
|
||||
strcpy(str2, str.c_str());
|
||||
char* tok = strtok(str2, " ");
|
||||
while(tok)
|
||||
{
|
||||
this->extensions.push_back(tok); // put a extension into struct
|
||||
tok = strtok(0, " "); // next token
|
||||
}
|
||||
delete [] str2;
|
||||
}
|
||||
}
|
||||
#endif //==================================================
|
||||
|
||||
// sort extension by alphabetical order
|
||||
std::sort(this->extensions.begin(), this->extensions.end());
|
||||
|
||||
// get number of color bits
|
||||
glGetIntegerv(GL_RED_BITS, &this->redBits);
|
||||
glGetIntegerv(GL_GREEN_BITS, &this->greenBits);
|
||||
glGetIntegerv(GL_BLUE_BITS, &this->blueBits);
|
||||
glGetIntegerv(GL_ALPHA_BITS, &this->alphaBits);
|
||||
|
||||
// get depth bits
|
||||
glGetIntegerv(GL_DEPTH_BITS, &this->depthBits);
|
||||
|
||||
// get stecil bits
|
||||
glGetIntegerv(GL_STENCIL_BITS, &this->stencilBits);
|
||||
|
||||
// get max number of lights allowed
|
||||
glGetIntegerv(GL_MAX_LIGHTS, &this->maxLights);
|
||||
|
||||
// get max texture resolution
|
||||
glGetIntegerv(GL_MAX_TEXTURE_SIZE, &this->maxTextureSize);
|
||||
|
||||
// get max number of clipping planes
|
||||
glGetIntegerv(GL_MAX_CLIP_PLANES, &this->maxClipPlanes);
|
||||
|
||||
// get max modelview and projection matrix stacks
|
||||
glGetIntegerv(GL_MAX_MODELVIEW_STACK_DEPTH, &this->maxModelViewStacks);
|
||||
glGetIntegerv(GL_MAX_PROJECTION_STACK_DEPTH, &this->maxProjectionStacks);
|
||||
glGetIntegerv(GL_MAX_ATTRIB_STACK_DEPTH, &this->maxAttribStacks);
|
||||
|
||||
// get max texture stacks
|
||||
glGetIntegerv(GL_MAX_TEXTURE_STACK_DEPTH, &this->maxTextureStacks);
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// check if the video card support a certain extension
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
bool glInfo::isExtensionSupported(const std::string& ext)
|
||||
{
|
||||
// search corresponding extension
|
||||
std::vector<std::string>::const_iterator iter = this->extensions.begin();
|
||||
std::vector<std::string>::const_iterator endIter = this->extensions.end();
|
||||
|
||||
while(iter != endIter)
|
||||
{
|
||||
if(ext == *iter)
|
||||
return true;
|
||||
else
|
||||
++iter;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// print OpenGL info to screen and save to a file
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
void glInfo::printSelf()
|
||||
{
|
||||
std::stringstream ss;
|
||||
|
||||
ss << std::endl; // blank line
|
||||
ss << "OpenGL Driver Info" << std::endl;
|
||||
ss << "==================" << std::endl;
|
||||
ss << "Vendor: " << this->vendor << std::endl;
|
||||
ss << "Version: " << this->version << std::endl;
|
||||
ss << "GLSL Version: " << this->glslVersion << std::endl;
|
||||
ss << "Renderer: " << this->renderer << std::endl;
|
||||
|
||||
ss << std::endl;
|
||||
ss << "Color Bits(R,G,B,A): (" << this->redBits << ", " << this->greenBits
|
||||
<< ", " << this->blueBits << ", " << this->alphaBits << ")\n";
|
||||
ss << "Depth Bits: " << this->depthBits << std::endl;
|
||||
ss << "Stencil Bits: " << this->stencilBits << std::endl;
|
||||
|
||||
ss << std::endl;
|
||||
ss << "Max Texture Size: " << this->maxTextureSize << "x" << this->maxTextureSize << std::endl;
|
||||
ss << "Max Lights: " << this->maxLights << std::endl;
|
||||
ss << "Max Clip Planes: " << this->maxClipPlanes << std::endl;
|
||||
ss << "Max Modelview Matrix Stacks: " << this->maxModelViewStacks << std::endl;
|
||||
ss << "Max Projection Matrix Stacks: " << this->maxProjectionStacks << std::endl;
|
||||
ss << "Max Attribute Stacks: " << this->maxAttribStacks << std::endl;
|
||||
ss << "Max Texture Stacks: " << this->maxTextureStacks << std::endl;
|
||||
|
||||
ss << std::endl;
|
||||
ss << "Total Number of Extensions: " << this->extensions.size() << std::endl;
|
||||
ss << "==============================" << std::endl;
|
||||
for(unsigned int i = 0; i < this->extensions.size(); ++i)
|
||||
ss << this->extensions.at(i) << std::endl;
|
||||
|
||||
ss << "======================================================================" << std::endl;
|
||||
|
||||
std::cout << ss.str() << std::endl;
|
||||
}
|
55
examples/vbo/glInfo.h
Normal file
55
examples/vbo/glInfo.h
Normal file
@ -0,0 +1,55 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// glInfo.h
|
||||
// ========
|
||||
// get GL vendor, version, supported extensions and other states using glGet*
|
||||
// functions and store them glInfo struct variable
|
||||
//
|
||||
// To get valid OpenGL infos, OpenGL rendering context (RC) must be opened
|
||||
// before calling glInfo::getInfo(). Otherwise it returns false.
|
||||
//
|
||||
// AUTHOR: Song Ho Ahn (song.ahn@gmail.com)
|
||||
// CREATED: 2005-10-04
|
||||
// UPDATED: 2013-03-06
|
||||
//
|
||||
// Copyright (c) 2005-2013 Song Ho Ahn
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef GLINFO_H
|
||||
#define GLINFO_H
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
// struct variable to store OpenGL info
|
||||
struct glInfo
|
||||
{
|
||||
std::string vendor;
|
||||
std::string renderer;
|
||||
std::string version;
|
||||
std::string glslVersion;
|
||||
std::vector <std::string> extensions;
|
||||
int redBits;
|
||||
int greenBits;
|
||||
int blueBits;
|
||||
int alphaBits;
|
||||
int depthBits;
|
||||
int stencilBits;
|
||||
int maxTextureSize;
|
||||
int maxLights;
|
||||
int maxAttribStacks;
|
||||
int maxModelViewStacks;
|
||||
int maxProjectionStacks;
|
||||
int maxClipPlanes;
|
||||
int maxTextureStacks;
|
||||
|
||||
// ctor, init all members
|
||||
glInfo() : redBits(0), greenBits(0), blueBits(0), alphaBits(0), depthBits(0),
|
||||
stencilBits(0), maxTextureSize(0), maxLights(0), maxAttribStacks(0),
|
||||
maxModelViewStacks(0), maxClipPlanes(0), maxTextureStacks(0) {}
|
||||
|
||||
void getInfo(unsigned int param=0); // extract info
|
||||
void printSelf(); // print itself
|
||||
bool isExtensionSupported(const std::string& ext); // check if a extension is supported
|
||||
};
|
||||
|
||||
#endif
|
13142
examples/vbo/glext.h
Normal file
13142
examples/vbo/glext.h
Normal file
File diff suppressed because it is too large
Load Diff
870
examples/vbo/main.cpp
Normal file
870
examples/vbo/main.cpp
Normal file
@ -0,0 +1,870 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// main.cpp
|
||||
// ========
|
||||
// testing buffer object for vertex, GL_ARB_vertex_buffer_object extension
|
||||
//
|
||||
// AUTHOR: Song Ho Ahn (song.ahn@gmail.com)
|
||||
// CREATED: 2005-10-04
|
||||
// UPDATED: 2014-04-25
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// in order to get function prototypes from glext.h, define GL_GLEXT_PROTOTYPES before including glext.h
|
||||
#define GL_GLEXT_PROTOTYPES
|
||||
|
||||
#ifdef __APPLE__
|
||||
#include <GLUT/glut.h>
|
||||
#else
|
||||
#include <GL/glut.h>
|
||||
#endif
|
||||
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
#include <cstdlib>
|
||||
#include "glext.h" // OpenGL extensions
|
||||
#include "glInfo.h" // glInfo struct
|
||||
#include "teapot.h" // meshes of teapot
|
||||
#include "Timer.h"
|
||||
#include "WaveFunc.h"
|
||||
|
||||
|
||||
|
||||
// GLUT CALLBACK functions
|
||||
void displayCB();
|
||||
void reshapeCB(int w, int h);
|
||||
void timerCB(int millisec);
|
||||
void idleCB();
|
||||
void keyboardCB(unsigned char key, int x, int y);
|
||||
void mouseCB(int button, int stat, int x, int y);
|
||||
void mouseMotionCB(int x, int y);
|
||||
|
||||
// CALLBACK function when exit() called ///////////////////////////////////////
|
||||
void exitCB();
|
||||
|
||||
|
||||
void initGL();
|
||||
int initGLUT(int argc, char **argv);
|
||||
bool initSharedMem();
|
||||
void clearSharedMem();
|
||||
void initLights();
|
||||
void setCamera(float posX, float posY, float posZ, float targetX, float targetY, float targetZ);
|
||||
GLuint createVBO(const void* data, int dataSize, GLenum target=GL_ARRAY_BUFFER_ARB, GLenum usage=GL_STATIC_DRAW_ARB);
|
||||
void deleteVBO(const GLuint vboId);
|
||||
void drawString(const char *str, int x, int y, float color[4], void *font);
|
||||
void drawString3D(const char *str, float pos[3], float color[4], void *font);
|
||||
void showInfo();
|
||||
void updateVertices(float* vertices, float* srcVertices, float* srcNormals, int count, float time);
|
||||
void showFPS();
|
||||
void toOrtho();
|
||||
void toPerspective();
|
||||
|
||||
|
||||
// constants
|
||||
const int SCREEN_WIDTH = 400;
|
||||
const int SCREEN_HEIGHT = 300;
|
||||
const float CAMERA_DISTANCE = 10.0f;
|
||||
const int TEXT_WIDTH = 8;
|
||||
const int TEXT_HEIGHT = 13;
|
||||
|
||||
|
||||
// global variables
|
||||
void *font = GLUT_BITMAP_8_BY_13;
|
||||
GLuint vboId1 = 0; // ID of VBO for vertex arrays (to store vertex coords and normals)
|
||||
GLuint vboId2 = 0; // ID of VBO for index array
|
||||
int screenWidth;
|
||||
int screenHeight;
|
||||
bool mouseLeftDown;
|
||||
bool mouseRightDown;
|
||||
float mouseX, mouseY;
|
||||
float cameraAngleX;
|
||||
float cameraAngleY;
|
||||
float cameraDistance;
|
||||
bool vboSupported, vboUsed;
|
||||
int drawMode = 0;
|
||||
Timer timer, t1, t2;
|
||||
float drawTime, updateTime;
|
||||
float* srcVertices; // pointer to copy of vertex array
|
||||
int vertexCount; // number of vertices
|
||||
|
||||
|
||||
|
||||
// function pointers for VBO Extension
|
||||
// Windows needs to get function pointers from ICD OpenGL drivers,
|
||||
// because opengl32.dll does not support extensions higher than v1.1.
|
||||
#ifdef _WIN32
|
||||
PFNGLGENBUFFERSARBPROC pglGenBuffersARB = 0; // VBO Name Generation Procedure
|
||||
PFNGLBINDBUFFERARBPROC pglBindBufferARB = 0; // VBO Bind Procedure
|
||||
PFNGLBUFFERDATAARBPROC pglBufferDataARB = 0; // VBO Data Loading Procedure
|
||||
PFNGLBUFFERSUBDATAARBPROC pglBufferSubDataARB = 0; // VBO Sub Data Loading Procedure
|
||||
PFNGLDELETEBUFFERSARBPROC pglDeleteBuffersARB = 0; // VBO Deletion Procedure
|
||||
PFNGLGETBUFFERPARAMETERIVARBPROC pglGetBufferParameterivARB = 0; // return various parameters of VBO
|
||||
PFNGLMAPBUFFERARBPROC pglMapBufferARB = 0; // map VBO procedure
|
||||
PFNGLUNMAPBUFFERARBPROC pglUnmapBufferARB = 0; // unmap VBO procedure
|
||||
|
||||
#define glGenBuffersARB pglGenBuffersARB
|
||||
#define glBindBufferARB pglBindBufferARB
|
||||
#define glBufferDataARB pglBufferDataARB
|
||||
#define glBufferSubDataARB pglBufferSubDataARB
|
||||
#define glDeleteBuffersARB pglDeleteBuffersARB
|
||||
#define glGetBufferParameterivARB pglGetBufferParameterivARB
|
||||
#define glMapBufferARB pglMapBufferARB
|
||||
#define glUnmapBufferARB pglUnmapBufferARB
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
// function pointers for WGL_EXT_swap_control
|
||||
#ifdef _WIN32
|
||||
typedef BOOL (WINAPI * PFNWGLSWAPINTERVALEXTPROC) (int interval);
|
||||
typedef int (WINAPI * PFNWGLGETSWAPINTERVALEXTPROC) (void);
|
||||
PFNWGLSWAPINTERVALEXTPROC pwglSwapIntervalEXT = 0;
|
||||
PFNWGLGETSWAPINTERVALEXTPROC pwglGetSwapIntervalEXT = 0;
|
||||
#define wglSwapIntervalEXT pwglSwapIntervalEXT
|
||||
#define wglGetSwapIntervalEXT pwglGetSwapIntervalEXT
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
// init global vars
|
||||
initSharedMem();
|
||||
|
||||
// init GLUT and GL
|
||||
initGLUT(argc, argv);
|
||||
initGL();
|
||||
|
||||
// register exit callback
|
||||
atexit(exitCB);
|
||||
|
||||
// get OpenGL info
|
||||
glInfo glInfo;
|
||||
glInfo.getInfo();
|
||||
//glInfo.printSelf();
|
||||
|
||||
#ifdef _WIN32
|
||||
// check VBO is supported by your video card
|
||||
if(glInfo.isExtensionSupported("GL_ARB_vertex_buffer_object"))
|
||||
{
|
||||
// get pointers to GL functions
|
||||
glGenBuffersARB = (PFNGLGENBUFFERSARBPROC)wglGetProcAddress("glGenBuffersARB");
|
||||
glBindBufferARB = (PFNGLBINDBUFFERARBPROC)wglGetProcAddress("glBindBufferARB");
|
||||
glBufferDataARB = (PFNGLBUFFERDATAARBPROC)wglGetProcAddress("glBufferDataARB");
|
||||
glBufferSubDataARB = (PFNGLBUFFERSUBDATAARBPROC)wglGetProcAddress("glBufferSubDataARB");
|
||||
glDeleteBuffersARB = (PFNGLDELETEBUFFERSARBPROC)wglGetProcAddress("glDeleteBuffersARB");
|
||||
glGetBufferParameterivARB = (PFNGLGETBUFFERPARAMETERIVARBPROC)wglGetProcAddress("glGetBufferParameterivARB");
|
||||
glMapBufferARB = (PFNGLMAPBUFFERARBPROC)wglGetProcAddress("glMapBufferARB");
|
||||
glUnmapBufferARB = (PFNGLUNMAPBUFFERARBPROC)wglGetProcAddress("glUnmapBufferARB");
|
||||
|
||||
// check once again VBO extension
|
||||
if(glGenBuffersARB && glBindBufferARB && glBufferDataARB && glBufferSubDataARB &&
|
||||
glMapBufferARB && glUnmapBufferARB && glDeleteBuffersARB && glGetBufferParameterivARB)
|
||||
{
|
||||
vboSupported = vboUsed = true;
|
||||
std::cout << "Video card supports GL_ARB_vertex_buffer_object." << std::endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
vboSupported = vboUsed = false;
|
||||
std::cout << "Video card does NOT support GL_ARB_vertex_buffer_object." << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
// check EXT_swap_control is supported
|
||||
if(glInfo.isExtensionSupported("WGL_EXT_swap_control"))
|
||||
{
|
||||
// get pointers to WGL functions
|
||||
wglSwapIntervalEXT = (PFNWGLSWAPINTERVALEXTPROC)wglGetProcAddress("wglSwapIntervalEXT");
|
||||
wglGetSwapIntervalEXT = (PFNWGLGETSWAPINTERVALEXTPROC)wglGetProcAddress("wglGetSwapIntervalEXT");
|
||||
if(wglSwapIntervalEXT && wglGetSwapIntervalEXT)
|
||||
{
|
||||
// disable v-sync
|
||||
wglSwapIntervalEXT(0);
|
||||
std::cout << "Video card supports WGL_EXT_swap_control." << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
#else // for linux, do not need to get function pointers, it is up-to-date
|
||||
if(glInfo.isExtensionSupported("GL_ARB_vertex_buffer_object"))
|
||||
{
|
||||
vboSupported = vboUsed = true;
|
||||
std::cout << "Video card supports GL_ARB_vertex_buffer_object." << std::endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
vboSupported = vboUsed = false;
|
||||
std::cout << "Video card does NOT support GL_ARB_vertex_buffer_object." << std::endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
// print vertex array size in bytes
|
||||
std::cout << "Vertex Array: " << sizeof(teapotVertices) << " bytes\n";
|
||||
std::cout << "Normal Array: " << sizeof(teapotNormals) << " bytes\n";
|
||||
std::cout << " Index Array: " << sizeof(teapotIndices) << " bytes\n";
|
||||
std::cout << std::endl;
|
||||
|
||||
|
||||
if(vboSupported)
|
||||
{
|
||||
int bufferSize;
|
||||
|
||||
// create vertex buffer objects, you need to delete them when program exits
|
||||
// Try to put both vertex coords array and vertex normal array in the same buffer object.
|
||||
// glBufferDataARB with NULL pointer reserves only memory space.
|
||||
// Copy actual data with 2 calls of glBufferSubDataARB, one for vertex coords and one for normals.
|
||||
// target flag is GL_ARRAY_BUFFER_ARB, and usage flag is GL_STREAM_DRAW_ARB because we will update vertices every frame.
|
||||
glGenBuffersARB(1, &vboId1);
|
||||
glBindBufferARB(GL_ARRAY_BUFFER_ARB, vboId1);
|
||||
glBufferDataARB(GL_ARRAY_BUFFER_ARB, sizeof(teapotVertices)+sizeof(teapotNormals), 0, GL_STREAM_DRAW_ARB);
|
||||
glBufferSubDataARB(GL_ARRAY_BUFFER_ARB, 0, sizeof(teapotVertices), teapotVertices);
|
||||
glBufferSubDataARB(GL_ARRAY_BUFFER_ARB, sizeof(teapotVertices), sizeof(teapotNormals), teapotNormals);
|
||||
glGetBufferParameterivARB(GL_ARRAY_BUFFER_ARB, GL_BUFFER_SIZE_ARB, &bufferSize);
|
||||
std::cout << "Vertex and Normal Array in VBO: " << bufferSize << " bytes\n";
|
||||
|
||||
// create VBO for index array
|
||||
// Target of this VBO is GL_ELEMENT_ARRAY_BUFFER_ARB and usage is GL_STATIC_DRAW_ARB
|
||||
vboId2 = createVBO(teapotIndices, sizeof(teapotIndices), GL_ELEMENT_ARRAY_BUFFER_ARB, GL_STATIC_DRAW_ARB);
|
||||
glGetBufferParameterivARB(GL_ELEMENT_ARRAY_BUFFER_ARB, GL_BUFFER_SIZE_ARB, &bufferSize);
|
||||
std::cout << "Index Array in VBO: " << bufferSize << " bytes\n";
|
||||
}
|
||||
|
||||
// start timer, the elapsed time will be used for updateVertices()
|
||||
timer.start();
|
||||
|
||||
// the last GLUT call (LOOP)
|
||||
// window will be shown and display callback is triggered by events
|
||||
// NOTE: this call never return main().
|
||||
glutMainLoop(); /* Start GLUT event-processing loop */
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// initialize GLUT for windowing
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
int initGLUT(int argc, char **argv)
|
||||
{
|
||||
// GLUT stuff for windowing
|
||||
// initialization openGL window.
|
||||
// it is called before any other GLUT routine
|
||||
glutInit(&argc, argv);
|
||||
|
||||
glutInitDisplayMode(GLUT_RGBA | GLUT_DOUBLE | GLUT_DEPTH | GLUT_STENCIL); // display mode
|
||||
|
||||
glutInitWindowSize(screenWidth, screenHeight); // window size
|
||||
|
||||
glutInitWindowPosition(100, 100); // window location
|
||||
|
||||
// finally, create a window with openGL context
|
||||
// Window will not displayed until glutMainLoop() is called
|
||||
// it returns a unique ID
|
||||
int handle = glutCreateWindow(argv[0]); // param is the title of window
|
||||
|
||||
// register GLUT callback functions
|
||||
glutDisplayFunc(displayCB);
|
||||
//glutTimerFunc(33, timerCB, 33); // redraw only every given millisec
|
||||
glutIdleFunc(idleCB); // redraw only every given millisec
|
||||
glutReshapeFunc(reshapeCB);
|
||||
glutKeyboardFunc(keyboardCB);
|
||||
glutMouseFunc(mouseCB);
|
||||
glutMotionFunc(mouseMotionCB);
|
||||
|
||||
return handle;
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// initialize OpenGL
|
||||
// disable unused features
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
void initGL()
|
||||
{
|
||||
glShadeModel(GL_SMOOTH); // shading mathod: GL_SMOOTH or GL_FLAT
|
||||
glPixelStorei(GL_UNPACK_ALIGNMENT, 4); // 4-byte pixel alignment
|
||||
|
||||
// enable /disable features
|
||||
glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
|
||||
//glHint(GL_LINE_SMOOTH_HINT, GL_NICEST);
|
||||
//glHint(GL_POLYGON_SMOOTH_HINT, GL_NICEST);
|
||||
glEnable(GL_DEPTH_TEST);
|
||||
glEnable(GL_LIGHTING);
|
||||
glEnable(GL_TEXTURE_2D);
|
||||
glEnable(GL_CULL_FACE);
|
||||
|
||||
// track material ambient and diffuse from surface color, call it before glEnable(GL_COLOR_MATERIAL)
|
||||
glColorMaterial(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE);
|
||||
glEnable(GL_COLOR_MATERIAL);
|
||||
|
||||
glClearColor(0, 0, 0, 0); // background color
|
||||
glClearStencil(0); // clear stencil buffer
|
||||
glClearDepth(1.0f); // 0 is near, 1 is far
|
||||
glDepthFunc(GL_LEQUAL);
|
||||
|
||||
initLights();
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// write 2d text using GLUT
|
||||
// The projection matrix must be set to orthogonal before call this function.
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
void drawString(const char *str, int x, int y, float color[4], void *font)
|
||||
{
|
||||
glPushAttrib(GL_LIGHTING_BIT | GL_CURRENT_BIT); // lighting and color mask
|
||||
glDisable(GL_LIGHTING); // need to disable lighting for proper text color
|
||||
glDisable(GL_TEXTURE_2D);
|
||||
|
||||
glColor4fv(color); // set text color
|
||||
glRasterPos2i(x, y); // place text position
|
||||
|
||||
// loop all characters in the string
|
||||
while(*str)
|
||||
{
|
||||
glutBitmapCharacter(font, *str);
|
||||
++str;
|
||||
}
|
||||
|
||||
glEnable(GL_TEXTURE_2D);
|
||||
glEnable(GL_LIGHTING);
|
||||
glPopAttrib();
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// draw a string in 3D space
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
void drawString3D(const char *str, float pos[3], float color[4], void *font)
|
||||
{
|
||||
glPushAttrib(GL_LIGHTING_BIT | GL_CURRENT_BIT); // lighting and color mask
|
||||
glDisable(GL_LIGHTING); // need to disable lighting for proper text color
|
||||
glDisable(GL_TEXTURE_2D);
|
||||
|
||||
glColor4fv(color); // set text color
|
||||
glRasterPos3fv(pos); // place text position
|
||||
|
||||
// loop all characters in the string
|
||||
while(*str)
|
||||
{
|
||||
glutBitmapCharacter(font, *str);
|
||||
++str;
|
||||
}
|
||||
|
||||
glEnable(GL_TEXTURE_2D);
|
||||
glEnable(GL_LIGHTING);
|
||||
glPopAttrib();
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// initialize global variables
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
bool initSharedMem()
|
||||
{
|
||||
screenWidth = SCREEN_WIDTH;
|
||||
screenHeight = SCREEN_HEIGHT;
|
||||
|
||||
mouseLeftDown = mouseRightDown = false;
|
||||
mouseX = mouseY = 0;
|
||||
|
||||
cameraAngleX = cameraAngleY = 0.0f;
|
||||
cameraDistance = CAMERA_DISTANCE;
|
||||
|
||||
drawMode = 0; // 0:fill, 1: wireframe, 2:points
|
||||
drawTime = updateTime = 0;
|
||||
|
||||
// make a copy of vertex array
|
||||
// It will be used as src data for updateVertices()
|
||||
vertexCount = sizeof(teapotVertices) / (3 * sizeof(float));
|
||||
srcVertices = new float[vertexCount * 3];
|
||||
|
||||
// copy data
|
||||
int count = vertexCount * 3;
|
||||
for(int i=0; i < count; ++i)
|
||||
srcVertices[i] = teapotVertices[i];
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// clean up shared memory
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
void clearSharedMem()
|
||||
{
|
||||
// clean up VBOs
|
||||
if(vboSupported)
|
||||
{
|
||||
deleteVBO(vboId1);
|
||||
deleteVBO(vboId2);
|
||||
vboId1 = vboId2 = 0;
|
||||
}
|
||||
|
||||
// delete copy of vertex array
|
||||
delete [] srcVertices;
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// initialize lights
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
void initLights()
|
||||
{
|
||||
// set up light colors (ambient, diffuse, specular)
|
||||
GLfloat lightKa[] = {.2f, .2f, .2f, 1.0f}; // ambient light
|
||||
GLfloat lightKd[] = {.7f, .7f, .7f, 1.0f}; // diffuse light
|
||||
GLfloat lightKs[] = {1, 1, 1, 1}; // specular light
|
||||
glLightfv(GL_LIGHT0, GL_AMBIENT, lightKa);
|
||||
glLightfv(GL_LIGHT0, GL_DIFFUSE, lightKd);
|
||||
glLightfv(GL_LIGHT0, GL_SPECULAR, lightKs);
|
||||
|
||||
// position the light
|
||||
float lightPos[4] = {0, 0, 20, 1}; // positional light
|
||||
glLightfv(GL_LIGHT0, GL_POSITION, lightPos);
|
||||
|
||||
glEnable(GL_LIGHT0); // MUST enable each light source after configuration
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// set camera position and lookat direction
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
void setCamera(float posX, float posY, float posZ, float targetX, float targetY, float targetZ)
|
||||
{
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
glLoadIdentity();
|
||||
gluLookAt(posX, posY, posZ, targetX, targetY, targetZ, 0, 1, 0); // eye(x,y,z), focal(x,y,z), up(x,y,z)
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// generate vertex buffer object and bind it with its data
|
||||
// You must give 2 hints about data usage; target and mode, so that OpenGL can
|
||||
// decide which data should be stored and its location.
|
||||
// VBO works with 2 different targets; GL_ARRAY_BUFFER_ARB for vertex arrays
|
||||
// and GL_ELEMENT_ARRAY_BUFFER_ARB for index array in glDrawElements().
|
||||
// The default target is GL_ARRAY_BUFFER_ARB.
|
||||
// By default, usage mode is set as GL_STATIC_DRAW_ARB.
|
||||
// Other usages are GL_STREAM_DRAW_ARB, GL_STREAM_READ_ARB, GL_STREAM_COPY_ARB,
|
||||
// GL_STATIC_DRAW_ARB, GL_STATIC_READ_ARB, GL_STATIC_COPY_ARB,
|
||||
// GL_DYNAMIC_DRAW_ARB, GL_DYNAMIC_READ_ARB, GL_DYNAMIC_COPY_ARB.
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
GLuint createVBO(const void* data, int dataSize, GLenum target, GLenum usage)
|
||||
{
|
||||
GLuint id = 0; // 0 is reserved, glGenBuffersARB() will return non-zero id if success
|
||||
|
||||
glGenBuffersARB(1, &id); // create a vbo
|
||||
glBindBufferARB(target, id); // activate vbo id to use
|
||||
glBufferDataARB(target, dataSize, data, usage); // upload data to video card
|
||||
|
||||
// check data size in VBO is same as input array, if not return 0 and delete VBO
|
||||
int bufferSize = 0;
|
||||
glGetBufferParameterivARB(target, GL_BUFFER_SIZE_ARB, &bufferSize);
|
||||
if(dataSize != bufferSize)
|
||||
{
|
||||
glDeleteBuffersARB(1, &id);
|
||||
id = 0;
|
||||
std::cout << "[createVBO()] Data size is mismatch with input array\n";
|
||||
}
|
||||
|
||||
return id; // return VBO id
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// destroy a VBO
|
||||
// If VBO id is not valid or zero, then OpenGL ignores it silently.
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
void deleteVBO(const GLuint vboId)
|
||||
{
|
||||
glDeleteBuffersARB(1, &vboId);
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// wobble the vertex in and out along normal
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
void updateVertices(float* dstVertices, float* srcVertices, float* srcNormals, int count, float time)
|
||||
{
|
||||
if(!dstVertices || !srcVertices || !srcNormals)
|
||||
return;
|
||||
|
||||
WaveFunc wave;
|
||||
wave.func = FUNC_SIN; // sine wave function
|
||||
wave.amp = 0.08f; // amplitude
|
||||
wave.freq = 1.0f; // cycles/sec
|
||||
wave.phase = 0; // horizontal shift
|
||||
wave.offset = 0; // vertical shift
|
||||
|
||||
float waveLength = 1.5f;
|
||||
float height;
|
||||
float x, y, z;
|
||||
|
||||
for(int i=0; i < count; ++i)
|
||||
{
|
||||
// get source from original vertex array
|
||||
x = *srcVertices; ++srcVertices;
|
||||
y = *srcVertices; ++srcVertices;
|
||||
z = *srcVertices; ++srcVertices;
|
||||
|
||||
// compute phase (horizontal shift)
|
||||
wave.phase = (x + y + z) / waveLength;
|
||||
|
||||
height = wave.update(time);
|
||||
|
||||
// update vertex coords
|
||||
*dstVertices = x + (height * *srcNormals); // x
|
||||
++dstVertices; ++srcNormals;
|
||||
*dstVertices = y + (height * *srcNormals); // y
|
||||
++dstVertices; ++srcNormals;
|
||||
*dstVertices = z + (height * *srcNormals); // z
|
||||
++dstVertices; ++srcNormals;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// display info messages
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
void showInfo()
|
||||
{
|
||||
// backup current model-view matrix
|
||||
glPushMatrix(); // save current modelview matrix
|
||||
glLoadIdentity(); // reset modelview matrix
|
||||
|
||||
// set to 2D orthogonal projection
|
||||
glMatrixMode(GL_PROJECTION); // switch to projection matrix
|
||||
glPushMatrix(); // save current projection matrix
|
||||
glLoadIdentity(); // reset projection matrix
|
||||
gluOrtho2D(0, screenWidth, 0, screenHeight); // set to orthogonal projection
|
||||
|
||||
float color[4] = {1, 1, 1, 1};
|
||||
|
||||
std::stringstream ss;
|
||||
ss << "VBO: " << (vboUsed ? "on" : "off") << std::ends; // add 0(ends) at the end
|
||||
drawString(ss.str().c_str(), 1, screenHeight-TEXT_HEIGHT, color, font);
|
||||
ss.str(""); // clear buffer
|
||||
|
||||
ss << std::fixed << std::setprecision(3);
|
||||
ss << "Updating Time: " << updateTime << " ms" << std::ends;
|
||||
drawString(ss.str().c_str(), 1, screenHeight-(2*TEXT_HEIGHT), color, font);
|
||||
ss.str("");
|
||||
|
||||
ss << "Drawing Time: " << drawTime << " ms" << std::ends;
|
||||
drawString(ss.str().c_str(), 1, screenHeight-(3*TEXT_HEIGHT), color, font);
|
||||
ss.str("");
|
||||
|
||||
ss << "Press SPACE key to toggle VBO on/off." << std::ends;
|
||||
drawString(ss.str().c_str(), 1, 1, color, font);
|
||||
|
||||
// unset floating format
|
||||
ss << std::resetiosflags(std::ios_base::fixed | std::ios_base::floatfield);
|
||||
|
||||
// restore projection matrix
|
||||
glPopMatrix(); // restore to previous projection matrix
|
||||
|
||||
// restore modelview matrix
|
||||
glMatrixMode(GL_MODELVIEW); // switch to modelview matrix
|
||||
glPopMatrix(); // restore to previous modelview matrix
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// display frame rates
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
void showFPS()
|
||||
{
|
||||
static Timer timer;
|
||||
static int count = 0;
|
||||
static std::string fps = "0.0 FPS";
|
||||
double elapsedTime = 0.0;;
|
||||
|
||||
// update fps every second
|
||||
++count;
|
||||
elapsedTime = timer.getElapsedTime();
|
||||
if(elapsedTime > 1.0)
|
||||
{
|
||||
std::stringstream ss;
|
||||
ss << std::fixed << std::setprecision(1);
|
||||
ss << (count / elapsedTime) << " FPS" << std::ends; // update fps string
|
||||
ss << std::resetiosflags(std::ios_base::fixed | std::ios_base::floatfield);
|
||||
fps = ss.str();
|
||||
count = 0; // reset counter
|
||||
timer.start(); // restart timer
|
||||
}
|
||||
|
||||
// backup current model-view matrix
|
||||
glPushMatrix(); // save current modelview matrix
|
||||
glLoadIdentity(); // reset modelview matrix
|
||||
|
||||
// set to 2D orthogonal projection
|
||||
glMatrixMode(GL_PROJECTION); // switch to projection matrix
|
||||
glPushMatrix(); // save current projection matrix
|
||||
glLoadIdentity(); // reset projection matrix
|
||||
gluOrtho2D(0, screenWidth, 0, screenHeight); // set to orthogonal projection
|
||||
|
||||
float color[4] = {1, 1, 0, 1};
|
||||
int textWidth = (int)fps.size() * TEXT_WIDTH;
|
||||
drawString(fps.c_str(), screenWidth-textWidth, screenHeight-TEXT_HEIGHT, color, font);
|
||||
|
||||
// restore projection matrix
|
||||
glPopMatrix(); // restore to previous projection matrix
|
||||
|
||||
// restore modelview matrix
|
||||
glMatrixMode(GL_MODELVIEW); // switch to modelview matrix
|
||||
glPopMatrix(); // restore to previous modelview matrix
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// set projection matrix as orthogonal
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
void toOrtho()
|
||||
{
|
||||
// set viewport to be the entire window
|
||||
glViewport(0, 0, (GLsizei)screenWidth, (GLsizei)screenHeight);
|
||||
|
||||
// set orthographic viewing frustum
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
glLoadIdentity();
|
||||
glOrtho(0, screenWidth, 0, screenHeight, -1, 1);
|
||||
|
||||
// switch to modelview matrix in order to set scene
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
glLoadIdentity();
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// set the projection matrix as perspective
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
void toPerspective()
|
||||
{
|
||||
// set viewport to be the entire window
|
||||
glViewport(0, 0, (GLsizei)screenWidth, (GLsizei)screenHeight);
|
||||
|
||||
// set perspective viewing frustum
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
glLoadIdentity();
|
||||
gluPerspective(60.0f, (float)(screenWidth)/screenHeight, 1.0f, 1000.0f); // FOV, AspectRatio, NearClip, FarClip
|
||||
|
||||
// switch to modelview matrix in order to set scene
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
glLoadIdentity();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//=============================================================================
|
||||
// CALLBACKS
|
||||
//=============================================================================
|
||||
|
||||
void displayCB()
|
||||
{
|
||||
// clear buffer
|
||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
|
||||
|
||||
// save the initial ModelView matrix before modifying ModelView matrix
|
||||
glPushMatrix();
|
||||
|
||||
// tramsform camera
|
||||
glTranslatef(0, 0, -cameraDistance);
|
||||
glRotatef(cameraAngleX, 1, 0, 0); // pitch
|
||||
glRotatef(cameraAngleY, 0, 1, 0); // heading
|
||||
|
||||
t1.start(); //==============================================================
|
||||
|
||||
if(vboUsed) // draw teapot using VBOs
|
||||
{
|
||||
// bind VBOs with IDs and set the buffer offsets of the bound VBOs
|
||||
// When buffer object is bound with its ID, all pointers in gl*Pointer()
|
||||
// are treated as offset instead of real pointer.
|
||||
glBindBufferARB(GL_ARRAY_BUFFER_ARB, vboId1);
|
||||
|
||||
// measure the elapsed time of updateVertices()
|
||||
t2.start(); //---------------------------------------------------------
|
||||
|
||||
// map the buffer object into client's memory
|
||||
// Note that glMapBufferARB() causes sync issue.
|
||||
// If GPU is working with this buffer, glMapBufferARB() will wait(stall)
|
||||
// for GPU to finish its job.
|
||||
float *ptr = (float*)glMapBufferARB(GL_ARRAY_BUFFER_ARB, GL_READ_WRITE_ARB);
|
||||
if(ptr)
|
||||
{
|
||||
// wobble vertex in and out along normal
|
||||
updateVertices(ptr, srcVertices, teapotNormals, vertexCount, (float)timer.getElapsedTime());
|
||||
glUnmapBufferARB(GL_ARRAY_BUFFER_ARB); // release pointer to mapping buffer
|
||||
}
|
||||
|
||||
t2.stop(); //----------------------------------------------------------
|
||||
updateTime = (float)t2.getElapsedTimeInMilliSec();
|
||||
|
||||
// before draw, specify vertex and index arrays with their offsets
|
||||
glNormalPointer(GL_FLOAT, 0, (void*)sizeof(teapotVertices));
|
||||
glVertexPointer(3, GL_FLOAT, 0, 0);
|
||||
glBindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, vboId2);
|
||||
glIndexPointer(GL_UNSIGNED_SHORT, 0, 0);
|
||||
|
||||
drawTeapotVBO();
|
||||
|
||||
// it is good idea to release VBOs with ID 0 after use.
|
||||
// Once bound with 0, all pointers in gl*Pointer() behave as real
|
||||
// pointer, so, normal vertex array operations are re-activated
|
||||
glBindBufferARB(GL_ARRAY_BUFFER_ARB, 0);
|
||||
glBindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, 0);
|
||||
}
|
||||
else // draw teapot using vertex array method
|
||||
{
|
||||
t2.start(); //---------------------------------------------------------
|
||||
|
||||
// wobbling vertices along normals
|
||||
updateVertices(teapotVertices, srcVertices, teapotNormals, vertexCount, (float)timer.getElapsedTime());
|
||||
|
||||
t2.stop(); //----------------------------------------------------------
|
||||
updateTime = (float)t2.getElapsedTimeInMilliSec();
|
||||
|
||||
drawTeapot();
|
||||
}
|
||||
|
||||
t1.stop(); //===============================================================
|
||||
drawTime = (float)t1.getElapsedTimeInMilliSec() - updateTime;
|
||||
|
||||
// draw info messages
|
||||
showInfo();
|
||||
showFPS();
|
||||
|
||||
glPopMatrix();
|
||||
|
||||
glutSwapBuffers();
|
||||
}
|
||||
|
||||
|
||||
void reshapeCB(int w, int h)
|
||||
{
|
||||
screenWidth = w;
|
||||
screenHeight = h;
|
||||
toPerspective();
|
||||
}
|
||||
|
||||
|
||||
void timerCB(int millisec)
|
||||
{
|
||||
glutTimerFunc(millisec, timerCB, millisec);
|
||||
glutPostRedisplay();
|
||||
}
|
||||
|
||||
|
||||
void idleCB()
|
||||
{
|
||||
glutPostRedisplay();
|
||||
}
|
||||
|
||||
|
||||
void keyboardCB(unsigned char key, int x, int y)
|
||||
{
|
||||
switch(key)
|
||||
{
|
||||
case 27: // ESCAPE
|
||||
exit(0);
|
||||
break;
|
||||
|
||||
case ' ':
|
||||
if(vboSupported)
|
||||
vboUsed = !vboUsed;
|
||||
break;
|
||||
|
||||
case 'd': // switch rendering modes (fill -> wire -> point)
|
||||
case 'D':
|
||||
drawMode = ++drawMode % 3;
|
||||
if(drawMode == 0) // fill mode
|
||||
{
|
||||
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
|
||||
glEnable(GL_DEPTH_TEST);
|
||||
glEnable(GL_CULL_FACE);
|
||||
}
|
||||
else if(drawMode == 1) // wireframe mode
|
||||
{
|
||||
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
|
||||
glDisable(GL_DEPTH_TEST);
|
||||
glDisable(GL_CULL_FACE);
|
||||
}
|
||||
else // point mode
|
||||
{
|
||||
glPolygonMode(GL_FRONT_AND_BACK, GL_POINT);
|
||||
glDisable(GL_DEPTH_TEST);
|
||||
glDisable(GL_CULL_FACE);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void mouseCB(int button, int state, int x, int y)
|
||||
{
|
||||
mouseX = x;
|
||||
mouseY = y;
|
||||
|
||||
if(button == GLUT_LEFT_BUTTON)
|
||||
{
|
||||
if(state == GLUT_DOWN)
|
||||
{
|
||||
mouseLeftDown = true;
|
||||
}
|
||||
else if(state == GLUT_UP)
|
||||
mouseLeftDown = false;
|
||||
}
|
||||
|
||||
else if(button == GLUT_RIGHT_BUTTON)
|
||||
{
|
||||
if(state == GLUT_DOWN)
|
||||
{
|
||||
mouseRightDown = true;
|
||||
}
|
||||
else if(state == GLUT_UP)
|
||||
mouseRightDown = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void mouseMotionCB(int x, int y)
|
||||
{
|
||||
if(mouseLeftDown)
|
||||
{
|
||||
cameraAngleY += (x - mouseX);
|
||||
cameraAngleX += (y - mouseY);
|
||||
mouseX = x;
|
||||
mouseY = y;
|
||||
}
|
||||
if(mouseRightDown)
|
||||
{
|
||||
cameraDistance -= (y - mouseY) * 0.2f;
|
||||
mouseY = y;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void exitCB()
|
||||
{
|
||||
clearSharedMem();
|
||||
}
|
4366
examples/vbo/teapot.h
Normal file
4366
examples/vbo/teapot.h
Normal file
File diff suppressed because it is too large
Load Diff
162
examples/vbo/vbo.vcxproj
Normal file
162
examples/vbo/vbo.vcxproj
Normal file
@ -0,0 +1,162 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="14.0" 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>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="glInfo.cpp" />
|
||||
<ClCompile Include="main.cpp" />
|
||||
<ClCompile Include="Timer.cpp" />
|
||||
<ClCompile Include="WaveFunc.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="glext.h" />
|
||||
<ClInclude Include="glInfo.h" />
|
||||
<ClInclude Include="teapot.h" />
|
||||
<ClInclude Include="Timer.h" />
|
||||
<ClInclude Include="WaveFunc.h" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{638BC033-44F0-40E8-AFBD-CF9BEB6094F9}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>vbo</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v140</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)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\..\glew;..\..\glew\gl;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalLibraryDirectories>..\..\glew\lib</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
Loading…
Reference in New Issue
Block a user