I have this class called ApplicationWindow
class ApplicationWindow
{
public:
ApplicationWindow();
virtual ~ApplicationWindow();
void *GetWindow();
int32_t GetWidth();
int32_t GetHeight();
protected:
void *windowHandle;
int32_t width;
int32_t height;
};
And I also have this class EGLDisplayWindow which will inherit ApplicationWindowclass EGLDisplayWindow : public ApplicationWindow
{
public:
EGLDisplayWindow();
~EGLDisplayWindow();
void CreateWindow(void *windowHandle);
private:
void CreateAndroidWindow();
void CreateIOSWindow();
void DestroyWindow();
};
As you can see ApplicationWindow has a private variable called windowHandle and a method called GetWindow()When a EGLDisplayWindow is created my idea is to create the proper window needed by each application. Then store that "window" into the windowHandle variable, where it can be accessed using the GetWindow() method
Is this a bad idea (including the void pointer part)? Is there a better solution?