Skip to content

Commit

Permalink
Remove OpenGL 2.1 code from the project
Browse files Browse the repository at this point in the history
  • Loading branch information
fluffyfreak committed Sep 16, 2018
1 parent 225c6e8 commit 026ae2d
Show file tree
Hide file tree
Showing 58 changed files with 20 additions and 5,468 deletions.
2 changes: 1 addition & 1 deletion contrib/imgui/Makefile.am
Expand Up @@ -5,5 +5,5 @@ AM_CFLAGS += $(SDL2_CFLAGS)

AM_CPPFLAGS += -DIMGUI_IMPL_OPENGL_LOADER_GLEW=1 -I$(top_srcdir)/contrib/imgui -I$(top_srcdr)/contrib/glew -I$(top_srcdir)/contrib/imgui/examples/ -std=c++11
noinst_LIBRARIES = libimgui.a
libimgui_a_SOURCES = imgui.cpp imgui_draw.cpp imgui_widgets.cpp imgui_demo.cpp examples/imgui_impl_opengl3.cpp examples/imgui_impl_opengl2.cpp examples/imgui_impl_sdl.cpp
libimgui_a_SOURCES = imgui.cpp imgui_draw.cpp imgui_widgets.cpp imgui_demo.cpp examples/imgui_impl_opengl3.cpp examples/imgui_impl_sdl.cpp
noinst_HEADERS = imgui.h examples/imgui_impl_opengl3.h examples/imgui_impl_opengl3.h examples/imgui_impl_sdl.h
212 changes: 0 additions & 212 deletions contrib/imgui/examples/imgui_impl_opengl2.cpp

This file was deleted.

28 changes: 0 additions & 28 deletions contrib/imgui/examples/imgui_impl_opengl2.h

This file was deleted.

20 changes: 4 additions & 16 deletions src/CityOnPlanet.cpp
Expand Up @@ -381,22 +381,10 @@ void CityOnPlanet::Render(Graphics::Renderer *r, const Graphics::Frustum &frustu
++uCount;
}

if(r->SupportsInstancing())
{
// render the building models using instancing
for(Uint32 i=0; i<s_buildingList.numBuildings; i++) {
if(!transform[i].empty())
s_buildingList.buildings[i].resolvedModel->Render(transform[i]);
}
}
else
{
// render the buildings individually
for(Uint32 i=0; i<s_buildingList.numBuildings; i++) {
for(auto t : transform[i]) {
s_buildingList.buildings[i].resolvedModel->Render(t);
}
}
// render the building models using instancing
for(Uint32 i=0; i<s_buildingList.numBuildings; i++) {
if(!transform[i].empty())
s_buildingList.buildings[i].resolvedModel->Render(transform[i]);
}

r->GetStats().AddToStatCount(Graphics::Stats::STAT_BUILDINGS, uCount);
Expand Down
2 changes: 0 additions & 2 deletions src/Makefile.am
Expand Up @@ -313,7 +313,6 @@ pioneer_LDADD = \
gui/libgui.a \
graphics/libgraphics.a \
graphics/opengl/libgraphicsopengl.a \
graphics/gl2/libgraphicsgl2.a \
galaxy/libgalaxy.a \
scenegraph/libscenegraph.a \
text/libtext.a \
Expand Down Expand Up @@ -404,7 +403,6 @@ uitest_LDADD = \
text/libtext.a \
graphics/libgraphics.a \
graphics/opengl/libgraphicsopengl.a \
graphics/gl2/libgraphicsgl2.a \
posix/libposix.a \
../contrib/jenkins/libjenkins.a \
../contrib/PicoDDS/libpicodds.a \
Expand Down
14 changes: 4 additions & 10 deletions src/ModelViewer.cpp
Expand Up @@ -3,7 +3,6 @@

#include "ModelViewer.h"
#include "FileSystem.h"
#include "graphics/gl2/GL2Renderer.h"
#include "graphics/opengl/RendererGL.h"
#include "graphics/Graphics.h"
#include "graphics/Light.h"
Expand Down Expand Up @@ -148,20 +147,15 @@ void ModelViewer::Run(const std::string &modelName)

ModManager::Init();

Graphics::RendererGL2::RegisterRenderer();
Graphics::RendererOGL::RegisterRenderer();

// determine what renderer we should use, default to Opengl 3.x
const std::string rendererName = config->String("RendererName", Graphics::RendererNameFromType(Graphics::RENDERER_OPENGL_3x));
Graphics::RendererType rType = Graphics::RENDERER_OPENGL_3x;
if(rendererName == Graphics::RendererNameFromType(Graphics::RENDERER_OPENGL_21))
{
rType = Graphics::RENDERER_OPENGL_21;
}
else if(rendererName == Graphics::RendererNameFromType(Graphics::RENDERER_OPENGL_3x))
{
rType = Graphics::RENDERER_OPENGL_3x;
}
//if(rendererName == Graphics::RendererNameFromType(Graphics::RENDERER_OPENGL_3x))
//{
// rType = Graphics::RENDERER_OPENGL_3x;
//}

//video
Graphics::Settings videoSettings = {};
Expand Down
14 changes: 4 additions & 10 deletions src/Pi.cpp
Expand Up @@ -74,7 +74,6 @@
#include "galaxy/StarSystem.h"
#include "gameui/Lua.h"
// ------------------------------------------------------------
#include "graphics/gl2/GL2Renderer.h"
#include "graphics/opengl/RendererGL.h"
// ------------------------------------------------------------
#include "graphics/Graphics.h"
Expand Down Expand Up @@ -473,20 +472,15 @@ void Pi::Init(const std::map<std::string,std::string> &options, bool no_gui)

OutputVersioningInfo();

Graphics::RendererGL2::RegisterRenderer();
Graphics::RendererOGL::RegisterRenderer();

// determine what renderer we should use, default to Opengl 3.x
const std::string rendererName = config->String("RendererName", Graphics::RendererNameFromType(Graphics::RENDERER_OPENGL_3x));
Graphics::RendererType rType = Graphics::RENDERER_OPENGL_3x;
if(rendererName == Graphics::RendererNameFromType(Graphics::RENDERER_OPENGL_21))
{
rType = Graphics::RENDERER_OPENGL_21;
}
else if(rendererName == Graphics::RendererNameFromType(Graphics::RENDERER_OPENGL_3x))
{
rType = Graphics::RENDERER_OPENGL_3x;
}
//if(rendererName == Graphics::RendererNameFromType(Graphics::RENDERER_OPENGL_3x))
//{
// rType = Graphics::RENDERER_OPENGL_3x;
//}

// Do rest of SDL video initialization and create Renderer
Graphics::Settings videoSettings = {};
Expand Down

0 comments on commit 026ae2d

Please sign in to comment.