This should print "GLES2", but it doesn't. Is there a way to fix that?
#include <iostream>
#include <string>
using namespace std;
class Rasterizer {
protected:
virtual string get_driver_name() const { return "???"; }
Rasterizer();
};
class RasterizerGLES2 : public Rasterizer {
virtual string get_driver_name() const { return "GLES2"; }
};
Rasterizer::Rasterizer() {
cout << get_driver_name();
}
int main() {
RasterizerGLES2();
}