Skip to content

Commit 4fe8459

Browse files
committed
Externals: Replace glBinding with glew.
Unfortunately glBinding is much harder to debug. # Conflicts: # .gitmodules # src/Externals/glbinding.vcxproj # src/Externals/luabind # src/Externals/luajit # src/Layers/xrRenderPC_GL/xrRender_GL.vcxproj
1 parent 64cbf6e commit 4fe8459

File tree

14 files changed

+12849
-1134
lines changed

14 files changed

+12849
-1134
lines changed

.gitmodules

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44
[submodule "src/Externals/luajit"]
55
path = src/Externals/luajit
66
url = https://github.com/OpenXRay/LuaJIT.git
7-
[submodule "src/Externals/glbinding"]
8-
path = src/Externals/glbinding
9-
url = https://github.com/cginternals/glbinding.git
107
[submodule "src/Externals/gli"]
118
path = src/Externals/gli
129
url = https://github.com/g-truc/gli
@@ -16,3 +13,6 @@
1613
[submodule "src/Externals/AGS_SDK"]
1714
path = src/Externals/AGS_SDK
1815
url = https://github.com/GPUOpen-LibrariesAndSDKs/AGS_SDK.git
16+
[submodule "src/Externals/glew"]
17+
path = src/Externals/glew
18+
url = https://github.com/Armada651/glew.git

src/Externals/gl/include/gl/glext.h

Lines changed: 11829 additions & 0 deletions
Large diffs are not rendered by default.

src/Externals/gl/include/gl/wglext.h

Lines changed: 840 additions & 0 deletions
Large diffs are not rendered by default.

src/Externals/glbinding

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/Externals/glbinding.vcxproj.filters

Lines changed: 0 additions & 1113 deletions
This file was deleted.

src/Externals/glew

Submodule glew added at d2df296

src/Externals/glew.vcxproj

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<ItemGroup Label="ProjectConfigurations">
4+
<ProjectConfiguration Include="Debug|Win32">
5+
<Configuration>Debug</Configuration>
6+
<Platform>Win32</Platform>
7+
</ProjectConfiguration>
8+
<ProjectConfiguration Include="Release|Win32">
9+
<Configuration>Release</Configuration>
10+
<Platform>Win32</Platform>
11+
</ProjectConfiguration>
12+
</ItemGroup>
13+
<PropertyGroup Label="Globals">
14+
<SccProjectName />
15+
<SccLocalPath />
16+
<ProjectGuid>{664E6F0D-6784-4760-9565-D54F8EB1EDF4}</ProjectGuid>
17+
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
18+
</PropertyGroup>
19+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
20+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
21+
<ConfigurationType>StaticLibrary</ConfigurationType>
22+
<UseOfMfc>false</UseOfMfc>
23+
<CharacterSet>MultiByte</CharacterSet>
24+
<PlatformToolset>v140</PlatformToolset>
25+
</PropertyGroup>
26+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
27+
<ConfigurationType>StaticLibrary</ConfigurationType>
28+
<UseOfMfc>false</UseOfMfc>
29+
<CharacterSet>MultiByte</CharacterSet>
30+
<PlatformToolset>v140</PlatformToolset>
31+
</PropertyGroup>
32+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
33+
<ImportGroup Label="ExtensionSettings">
34+
</ImportGroup>
35+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
36+
<Import Project="..\Common.props" />
37+
</ImportGroup>
38+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
39+
<Import Project="..\Common.props" />
40+
</ImportGroup>
41+
<PropertyGroup Label="UserMacros" />
42+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
43+
<OutDir>$(xrBinDir)</OutDir>
44+
<IntDir>$(xrIntDir)$(ProjectName)\</IntDir>
45+
<TargetName>glew32</TargetName>
46+
</PropertyGroup>
47+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
48+
<OutDir>$(xrBinDir)</OutDir>
49+
<IntDir>$(xrIntDir)$(ProjectName)\</IntDir>
50+
<TargetName>glew32</TargetName>
51+
</PropertyGroup>
52+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
53+
<ClCompile>
54+
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
55+
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
56+
<StringPooling>true</StringPooling>
57+
<FunctionLevelLinking>true</FunctionLevelLinking>
58+
<Optimization>MaxSpeed</Optimization>
59+
<SuppressStartupBanner>true</SuppressStartupBanner>
60+
<WarningLevel>Level3</WarningLevel>
61+
<AdditionalIncludeDirectories>glew/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
62+
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;WIN32_LEAN_AND_MEAN;GLEW_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
63+
</ClCompile>
64+
<ResourceCompile>
65+
<Culture>0x0409</Culture>
66+
<PreprocessorDefinitions>NDEBUG;GLEW_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
67+
</ResourceCompile>
68+
<Bscmake>
69+
<SuppressStartupBanner>true</SuppressStartupBanner>
70+
</Bscmake>
71+
<Lib>
72+
<SuppressStartupBanner>true</SuppressStartupBanner>
73+
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
74+
<TargetMachine>MachineX86</TargetMachine>
75+
</Lib>
76+
</ItemDefinitionGroup>
77+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
78+
<ClCompile>
79+
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
80+
<InlineFunctionExpansion>Default</InlineFunctionExpansion>
81+
<FunctionLevelLinking>false</FunctionLevelLinking>
82+
<Optimization>Disabled</Optimization>
83+
<SuppressStartupBanner>true</SuppressStartupBanner>
84+
<WarningLevel>Level3</WarningLevel>
85+
<AdditionalIncludeDirectories>glew/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
86+
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;WIN32_LEAN_AND_MEAN;GLEW_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
87+
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
88+
</ClCompile>
89+
<ResourceCompile>
90+
<Culture>0x0409</Culture>
91+
<PreprocessorDefinitions>_DEBUG;GLEW_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
92+
</ResourceCompile>
93+
<Bscmake>
94+
<SuppressStartupBanner>true</SuppressStartupBanner>
95+
</Bscmake>
96+
<Lib>
97+
<SuppressStartupBanner>true</SuppressStartupBanner>
98+
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
99+
<TargetMachine>MachineX86</TargetMachine>
100+
</Lib>
101+
</ItemDefinitionGroup>
102+
<ItemGroup>
103+
<ClCompile Include="glew\src\glew.c" />
104+
</ItemGroup>
105+
<ItemGroup>
106+
<ClInclude Include="glew\include\GL\glew.h" />
107+
<ClInclude Include="glew\include\GL\wglew.h" />
108+
</ItemGroup>
109+
<ItemGroup>
110+
<ResourceCompile Include="glew\build\glew.rc" />
111+
</ItemGroup>
112+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
113+
<ImportGroup Label="ExtensionTargets">
114+
</ImportGroup>
115+
</Project>

src/Layers/xrRender/R_DStreams.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ u16* _IndexStream::Lock ( u32 Count, u32& vOffset )
251251
}
252252
#if defined(USE_OGL)
253253
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, pIB);
254-
CHK_GL(pLockedData = (BYTE*)glMapBufferRange(GL_ELEMENT_ARRAY_BUFFER, mPosition * 2, Count * 2, (BufferAccessMask)dwFlags));
254+
CHK_GL(pLockedData = (BYTE*)glMapBufferRange(GL_ELEMENT_ARRAY_BUFFER, mPosition * 2, Count * 2, dwFlags));
255255
#elif defined(USE_DX11)
256256
D3D_MAP MapMode = (dwFlags==LOCKFLAGS_APPEND) ?
257257
D3D_MAP_WRITE_NO_OVERWRITE : D3D_MAP_WRITE_DISCARD;

src/Layers/xrRender/R_DStreams.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@
33
#pragma once
44

55
#ifdef USE_OGL
6-
const BufferAccessMask LOCKFLAGS_FLUSH = BufferAccessMask::GL_MAP_WRITE_BIT | BufferAccessMask::GL_MAP_INVALIDATE_BUFFER_BIT;
7-
const BufferAccessMask LOCKFLAGS_APPEND = BufferAccessMask::GL_MAP_WRITE_BIT; // TODO: Implement buffer object appending using glBufferSubData
6+
enum
7+
{
8+
LOCKFLAGS_FLUSH = GL_MAP_WRITE_BIT | GL_MAP_INVALIDATE_BUFFER_BIT,
9+
LOCKFLAGS_APPEND = GL_MAP_WRITE_BIT // TODO: Implement buffer object appending using glBufferSubData
10+
};
811
#else
912
enum
1013
{

src/Layers/xrRender/xrD3DDefs.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
// TODO: Get rid of D3D types.
88
#include <d3d9types.h>
99

10-
using namespace gl;
1110
class glState;
1211

1312
typedef enum D3D_CLEAR_FLAG {

0 commit comments

Comments
 (0)