Code review comment for lp:~gerboland/qtmir/refactor-opengl

Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

class GLConfiguration ...

I'm not sure of the design intent here.

The only reason for virtual functions appears to be supplying two ints. Inlining virtual functions is an unlikely design. And the implementations just supply constants. Note that copying (with slicing) is allowed.

How about a handle class:

class GLConfiguration
{
public:
    GLConfiguration(int depth_buffer_bits = 24, int stencil_buffer_bits = 8);
    ~GLConfiguration();

    int depth_buffer_bits() const;
    int stencil_buffer_bits() const;

    void operator()(mir::Server& server) const;

private:
    struct Self;
    std::shared_ptr<Self> self;
};

review: Needs Fixing

« Back to merge proposal