some effc++ fixes

This commit is contained in:
2015-01-23 15:43:06 +01:00
parent 701ccce857
commit 05bf47c678
5 changed files with 34 additions and 19 deletions

View File

@@ -24,7 +24,7 @@ static unsigned ilog2(unsigned in)
class Framebuffer {
public:
Framebuffer() {
Framebuffer() : _fbID(0) {
glGenFramebuffers(1, &_fbID);
}
@@ -51,7 +51,7 @@ private:
class TextureCubeMap {
public:
TextureCubeMap(unsigned size) {
TextureCubeMap(unsigned size) : _texID(0) {
glGenTextures(1, &_texID);
glBindTexture(GL_TEXTURE_CUBE_MAP, _texID);
@@ -106,11 +106,11 @@ private:
class Texture2D {
public:
Texture2D(unsigned width, unsigned height) {
Texture2D(unsigned width, unsigned height) : _texID(0) {
_glCreate(width, height);
}
Texture2D(std::string const& file) {
Texture2D(std::string const& file) : _texID(0) {
SDL_Surface *surf = IMG_Load(file.c_str());
if (!surf)
throw SDLException();