Exemple #1
0
//----------------------------------------------------------------------------//
OpenGLRenderer::OpenGLRenderer(const TextureTargetType tt_type) :
    d_displayDPI(96, 96),
    d_initExtraStates(false),
    d_activeBlendMode(BM_INVALID)
{
    // get rough max texture size
    GLint max_tex_size;
    glGetIntegerv(GL_MAX_TEXTURE_SIZE, &max_tex_size);
    d_maxTextureSize = max_tex_size;

    // initialise display size
    GLint vp[4];
    glGetIntegerv(GL_VIEWPORT, vp);
    d_displaySize = Sizef(static_cast<float>(vp[2]), static_cast<float>(vp[3]));

    initialiseGLExtensions();
    initialiseTextureTargetFactory(tt_type);

    // we _really_ need separate rgb/alpha blend modes, if this support is not
    // available, add a note to the renderer ID string so that this fact is
    // logged.
    if (!GLEW_VERSION_1_4 && !GLEW_EXT_blend_func_separate)
        d_rendererID += "  No glBlendFuncSeparate(EXT) support.";

    d_defaultTarget = new OpenGLViewportTarget(*this);
}
Exemple #2
0
//----------------------------------------------------------------------------//
OpenGL3Renderer::OpenGL3Renderer() :
    d_displayDPI(96, 96),
    d_initExtraStates(false),
    d_activeBlendMode(BM_INVALID),
    d_shaderStandard(0),
    d_viewProjectionMatrix(0),
    d_activeRenderTarget(0),
    d_openGLStateChanger(0),
    d_shaderManager(0)
{
    // get rough max texture size
    GLint max_tex_size;
    glGetIntegerv(GL_MAX_TEXTURE_SIZE, &max_tex_size);
    d_maxTextureSize = max_tex_size;

    // initialise display size
    GLint vp[4];
    glGetIntegerv(GL_VIEWPORT, vp);
    d_displaySize = Sizef(static_cast<float>(vp[2]), static_cast<float>(vp[3]));

    initialiseGLExtensions();
    initialiseTextureTargetFactory();
    initialiseOpenGLShaders();

    d_defaultTarget = new OpenGL3ViewportTarget(*this);
    d_openGLStateChanger = new OpenGL3StateChangeWrapper(*this);

    d_viewProjectionMatrix = new mat4Pimpl();
}
//----------------------------------------------------------------------------//
OpenGLRenderer::OpenGLRenderer(const TextureTargetType tt_type) :
    OpenGLRendererBase(false)
{
    initialiseRendererIDString();
    initialiseGLExtensions();
    initialiseTextureTargetFactory(tt_type);

    // we _really_ need separate rgb/alpha blend modes, if this support is not
    // available, add a note to the renderer ID string so that this fact is
    // logged.
    if (!GLEW_VERSION_1_4 && !GLEW_EXT_blend_func_separate)
        d_rendererID += "  No glBlendFuncSeparate(EXT) support.";
}
Exemple #4
0
//----------------------------------------------------------------------------//
OpenGLRenderer::OpenGLRenderer(const Sizef& display_size,
                               const TextureTargetType tt_type) :
    d_displaySize(display_size),
    d_displayDPI(96, 96),
    d_initExtraStates(false),
    d_activeBlendMode(BM_INVALID)
{
    // get rough max texture size
    GLint max_tex_size;
    glGetIntegerv(GL_MAX_TEXTURE_SIZE, &max_tex_size);
    d_maxTextureSize = max_tex_size;

    initialiseGLExtensions();
    initialiseTextureTargetFactory(tt_type);

    d_defaultTarget = new OpenGLViewportTarget(*this);
}
Exemple #5
0
//----------------------------------------------------------------------------//
OpenGL3Renderer::OpenGL3Renderer(const Sizef& display_size) :
    d_displaySize(display_size),
    d_displayDPI(96, 96),
    d_initExtraStates(false),
    d_activeBlendMode(BM_INVALID),
    d_shaderStandard(0),
    d_openGLStateChanger(0),
    d_shaderManager(0)
{
    // get rough max texture size
    GLint max_tex_size;
    glGetIntegerv(GL_MAX_TEXTURE_SIZE, &max_tex_size);
    d_maxTextureSize = max_tex_size;

    initialiseGLExtensions();
    initialiseTextureTargetFactory();
    initialiseOpenGLShaders();


    d_defaultTarget = new OpenGL3ViewportTarget(*this);
    d_openGLStateChanger = new OpenGL3StateChangeWrapper(*this);

    d_viewProjectionMatrix = new mat4Pimpl();
}