Skip to content

Commit

Permalink
Cleanup|Client: Untangled some GL header includes (wrt GL deferring)
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed May 1, 2014
1 parent 2e9b880 commit f52a94c
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 25 deletions.
2 changes: 1 addition & 1 deletion doomsday/client/include/gl/sys_opengl.h
Expand Up @@ -46,7 +46,7 @@

#if defined(UNIX) && defined(MACOSX)
# define GL_GLEXT_PROTOTYPES
# include <OpenGL/gl.h>
# include <de/graphics/opengl.h>
# include <OpenGL/glext.h>
# include <OpenGL/OpenGL.h>
# define GL_CALL
Expand Down
3 changes: 1 addition & 2 deletions doomsday/client/include/resource/bitmapfont.h
Expand Up @@ -21,7 +21,6 @@
#define CLIENT_RESOURCE_BITMAPFONT_H

#include "abstractfont.h"
#include "gl/gl_main.h"
#include <de/Rectangle>
#include <de/String>
#include <de/Vector>
Expand All @@ -41,7 +40,7 @@ class BitmapFont : public AbstractFont
void setFilePath(de::String resourcePath);

/// @return GL-texture name.
GLuint textureGLName() const;
uint textureGLName() const;
de::Vector2i const &textureDimensions() const;
de::Vector2ui const &textureMargin() const;

Expand Down
6 changes: 3 additions & 3 deletions doomsday/client/include/resource/texturevariantspec.h
Expand Up @@ -25,7 +25,7 @@
#endif

#include "dd_types.h"
#include "gl/sys_opengl.h"
//#include "gl/sys_opengl.h"
#include <de/String>

typedef enum {
Expand Down Expand Up @@ -111,8 +111,8 @@ struct variantspecification_t
/// Color palette translation.
int tClass, tMap;

GLint glMinFilter() const;
GLint glMagFilter() const;
int glMinFilter() const;
int glMagFilter() const;
int logicalAnisoLevel() const;

variantspecification_t();
Expand Down
4 changes: 1 addition & 3 deletions doomsday/client/src/dd_main.cpp
Expand Up @@ -54,9 +54,7 @@
#ifdef __CLIENT__
# include "gl/gl_defer.h"
# include "gl/gl_texmanager.h"
#endif

#ifdef __CLIENT__
# include "gl/gl_main.h"
# include "render/cameralensfx.h"
# include "render/r_draw.h" // R_InitViewWindow
# include "render/r_main.h" // R_Init, R_ResetViewer
Expand Down
6 changes: 3 additions & 3 deletions doomsday/client/src/gl/dgl_common.cpp
Expand Up @@ -24,6 +24,9 @@
#include <cstdlib>
#include <cmath>

#include <de/GLState>
#include <de/GLInfo>

#include "de_base.h"
#include "de_console.h"
#include "de_graphics.h"
Expand All @@ -35,9 +38,6 @@
#include "api_gl.h"
#include "gl/gl_texmanager.h"

#include <de/GLState>
#include <de/GLInfo>

using namespace de;

/**
Expand Down
2 changes: 1 addition & 1 deletion doomsday/client/src/render/projector.cpp
Expand Up @@ -19,7 +19,7 @@

#include "clientapp.h"
#include "render/projector.h"

#include "render/viewports.h"
#include "render/r_main.h"
#include "render/rend_main.h"

Expand Down
2 changes: 2 additions & 0 deletions doomsday/client/src/render/rend_particle.cpp
Expand Up @@ -27,6 +27,7 @@

#include "filesys/fs_main.h"

#include "gl/gl_main.h"
#include "gl/gl_texmanager.h"
#include "gl/texturecontent.h"

Expand All @@ -40,6 +41,7 @@
#include "resource/image.h"

#include "render/r_main.h"
#include "render/viewports.h"
#include "render/rend_main.h"
#include "render/rend_model.h"
#include "render/vlight.h"
Expand Down
9 changes: 1 addition & 8 deletions doomsday/client/src/render/sky.cpp
Expand Up @@ -26,6 +26,7 @@
#include "def_data.h"
#include "client/cl_def.h"

#include "gl/gl_main.h"
#include "gl/gl_tex.h"

#include "MaterialSnapshot"
Expand Down Expand Up @@ -351,8 +352,6 @@ DENG2_PIMPL(Sky)
}
}

#ifdef __CLIENT__

void drawModels()
{
DENG_ASSERT_IN_MAIN_THREAD();
Expand Down Expand Up @@ -409,8 +408,6 @@ DENG2_PIMPL(Sky)
glPopMatrix();
}

#endif // __CLIENT__

/// Observes Layer MaterialChange
void skyLayerMaterialChanged(Layer &layer)
{
Expand Down Expand Up @@ -623,8 +620,6 @@ void Sky::runTick()
}
}

#ifdef __CLIENT__

// Look up the precalculated vertex.
static inline Vector3f &skyVertex(int r, int c)
{
Expand Down Expand Up @@ -974,8 +969,6 @@ void Sky::draw()
if(usingFog) glDisable(GL_FOG);
}

#endif // __CLIENT__

static Sky sky;
Sky *theSky = &sky;

Expand Down
4 changes: 2 additions & 2 deletions doomsday/client/src/resource/bitmapfont.cpp
Expand Up @@ -22,7 +22,7 @@

#include "dd_main.h" // isDedicated
#include "filesys/fs_main.h"
#include "gl/gl_texmanager.h" // GL_NewTextureWithParams
#include "gl/gl_main.h" // GL_NewTextureWithParams
#include "sys_system.h" // novideo
#include "FontManifest"
#include "uri.hh"
Expand Down Expand Up @@ -362,7 +362,7 @@ void BitmapFont::setFilePath(String newFilePath)
}
}

GLuint BitmapFont::textureGLName() const
uint BitmapFont::textureGLName() const
{
return d->texGLName;
}
Expand Down
4 changes: 2 additions & 2 deletions doomsday/client/src/resource/texturevariant.cpp
Expand Up @@ -93,7 +93,7 @@ bool variantspecification_t::operator == (variantspecification_t const &other) c
return 1; // Equal.
}

GLint variantspecification_t::glMinFilter() const
int variantspecification_t::glMinFilter() const
{
if(minFilter >= 0) // Constant logical value.
{
Expand All @@ -103,7 +103,7 @@ GLint variantspecification_t::glMinFilter() const
return mipmapped? glmode[mipmapping] : GL_LINEAR;
}

GLint variantspecification_t::glMagFilter() const
int variantspecification_t::glMagFilter() const
{
if(magFilter >= 0) // Constant logical value.
{
Expand Down

0 comments on commit f52a94c

Please sign in to comment.