Q:

OpenGL texture appears to big on the screen

Okay so I am working on a toy 2d engine.  I initially used regular SDL_Surfaces for rendering and the built in SDL_Renderer.  But I thought why not use OpenGL, get some experience with that. 
But I am stuck now.  I have a context and things are rendered to the screen, but it looks like the textures I am trying to display are way to big to fit in the screen.  Like I only see a couple of pixels, but not really. 
The texture class can be found here:
#include "texture.h"

Texture::Texture(std::string path, bool loadNow) {
    //Initialize texture ID
    mTextureID = 0;

    //Initialize texture dimensions
    width = 0;
    height = 0;

    this->path = path;

    if(loadNow) {
        loadTexture(path);
    }
}

Texture::~Texture() {
    freeTexture();
}

bool Texture::loadTexture(std::string path) {
    //Texture loading success
    loaded = false;

    SDL_Surface *image = IMG_Load(path.c_str());

    //Image loaded successfully
    if(image ! = NULL) {
        if((image->w & (image->w - 1)) == 0) {
            printf("Warning: image width not power of 2 -> %s\n", path.c_str());
        }
        if((image->h & (image->h - 1)) == 0) {
            printf("Warning: image height not power of 2 -> %s\n", path.c_str());
        }
        loaded = loadTextureFromPixels32(image, (GLuint)image->w, (GLuint)image->h);
    }

    //Report error
    if(!loaded) {
        printf( "Unable to load %s\n", path.c_str() );
    }

    return loaded;
}

bool Texture::loadTextureFromPixels32(SDL_Surface *image, GLuint width, GLuint height ) {
    //Free texture if it exists
    freeTexture();

    //Get texture dimensions
    this->width = width;
    this->height = height;

    //Generate texture ID
    glGenTextures(1, &mTextureID);

    //Bind texture ID
    glBindTexture(GL_TEXTURE_2D, mTextureID);

    //Generate texture
    glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, image->pixels);

    //Set texture parameters
    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);

    //Unbind texture
    glBindTexture(GL_TEXTURE_2D, 0);

    //Check for error
    GLenum error = glGetError();
    if(error ! = GL_NO_ERROR) {
        printf("Error loading texture from %p pixels!\n", image->pixels);
        return false;
    }

    return true;
}

void Texture::render(GLfloat x, GLfloat y) {
    if(loaded) {
        //If the texture exists
        if(mTextureID ! = 0) {
            GLfloat realX = x;// - (this->width / 2);
            GLfloat realY = y;// - (this->height / 2);

            //Remove any previous transformations
            glLoadIdentity();

            //Move to rendering point
            glTranslatef(realX, realY, 0.f);
            glClearDepth(1.0f); 

            //Set texture ID
            glBindTexture(GL_TEXTURE_2D, mTextureID);

            //Render textured quad
            glBegin(GL_QUADS);
                glTexCoord2f( 0.f, 0.f ); glVertex2f(0.f,   0.f);
                glTexCoord2f( 1.f, 0.f ); glVertex2f(width, 0.f);
                glTexCoord2f( 1.f, 1.f ); glVertex2f(width, height);
                glTexCoord2f( 0.f, 1.f ); glVertex2f(0.f,   height);
            glEnd();
        }
    } else {
        // do nothing
    }
}

GLuint Texture::getWidth() {
    return this->width;
}

GLuint Texture::getHeight() {
    return this->height;
}

void Texture::freeTexture() {
    //Delete texture
    if(mTextureID ! = 0) {
        glDeleteTextures(1, &mTextureID);
        mTextureID = 0;
    }

    width = 0;
    height = 0;
}

I am guessing the problem is here, but it could also be in how I initialize OpenGL so here is that:
void Main::initGL() {
    /* Request opengl 3.2 context. 
     * SDL doesn't have the ability to choose which profile at this time of writing,
     * but it should default to the core profile */
    SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3);
    SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 2);

    /* Turn on double buffering with a 24bit Z buffer. 
     * You may need to change this to 16 or 32 for your system */
    SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
    SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 32);

    glContext = SDL_GL_CreateContext(this->window);

    glViewport(0.0, 0.0, SCREEN_WIDTH, SCREEN_HEIGHT);
    glOrtho( 0.0, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0, 1.0, -1.0 );

    SDL_GL_SetSwapInterval(0);

    //Initialize clear color
    glClearColor( 0.f, 0.f, 0.f, 1.f );

    //Enable texturing
    glEnable( GL_TEXTURE_2D );

    //Check for error
    GLenum error = glGetError();
    if(error ! = GL_NO_ERROR) {
        printf("Error initializing OpenGL!\n");
    }
}

SDL is correctly initialized otherwise there wouldn't be anything on the screen.  I am completely new to OpenGL so any help would be appreciated. 

A:

You mix ordinate GL_TEXTURE_2D stuff with GL_TEXTURE_RECTANGLE, and enabling both is a very bad idea.  You are using texcoords in the range [0,1], so you actually seem to  want to use GL_TEXTURE_2D. You should rewrite your texture code to use that, and dropt those rectangle textures entirely. 
The next thing is that your projection setup is wrong.  Your glOrtho call has no effect since you completely overwrite this by loading the identity matrix a few lines later.  You should make yourself familiar with the stae machine approach the GL is using.  As your matrices are set up currently, you draw a huge quad with most of it completely ot of the screen. 
Now that part is completely strange:
/* Request opengl 3.2 context. 
 * SDL doesn't have the ability to choose which profile at this time of writing,
 * but it should default to the core profile */
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 2);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 1);

This code is will never create a core profile, because core profiles didn't even exist in GL2.1, they were introduced in GL3.2.  It is unclear what SDL version you are using, but modern SDL is capable of selecting the profile. 
However, your code is using completely outdated ande deprecated OpenGL, there is no way this will work with a core profile.  If you learn OpenGL in this decade, I'd strongly suggest that you forget about all that and start with some documentation/tutorial on modern GL, and actually use a core profiel.