minor adjustments

This commit is contained in:
Jack Andersen 2015-04-18 13:36:57 -10:00
parent 0d1fae7aae
commit 25168216b9
8 changed files with 77 additions and 3 deletions

View File

@ -6,7 +6,19 @@
class CCGLContext final : public IContext
{
public:
CCGLContext();
virtual ~CCGLContext() {}
const std::string version() const override;
const std::string name() const override;
int depthSize() const override;
int redDepth() const override;
int greenDepth() const override;
int blueDepth() const override;
private:
int m_minVersion;
int m_majVersion;
};
#endif // CCGLCONTEXT_HPP

9
include/CSurface.hpp Normal file
View File

@ -0,0 +1,9 @@
#ifndef CSURFACE_HPP
#define CSURFACE_HPP
#include "ISurface.hpp"
ISurface* CSurfaceNewWindow();
ISurface* CSurfaceNewQWidget();
#endif // CSURFACE_HPP

View File

@ -6,11 +6,10 @@
class IContext
{
public:
virtual ~IContext() {}
virtual void setMinVersion (const int& min)=0;
virtual void setMajorVersion(const int& maj)=0;
virtual void create();
virtual void create()=0;
virtual const std::string version() const=0;
virtual const std::string name() const=0;
virtual int depthSize() const=0;

View File

@ -3,6 +3,7 @@
class ISurface
{
public:
};

View File

@ -7,8 +7,10 @@ HEADERS += \
unix:HEADERS += \
$$PWD/include/CGLXContext.hpp \
mac:HEADERS -= \
$$PWD/include/CGLXContext.hpp
mac:HEADERS += \
$$PWD/include/CCGLContext.hpp \
$$PWD/include/CCGLContext.hpp
win32:HEADERS += \
$$PWD/include/CWGLContext.hpp \
@ -22,6 +24,8 @@ SOURCES += \
unix:SOURCES += \
$$PWD/src/CGLXContext.cpp \
mac:SOURCES -= \
$$PWD/src/CGLXContext.cpp
mac:OBJECTIVE_SOURCES += \
$$PWD/src/CCGLCocoaView.mm

View File

@ -0,0 +1,37 @@
#include "CCGLContext.hpp"
#include <iostream>
CCGLContext::CCGLContext()
{
std::cout << "Hello from CGL" << std::endl;
}
const std::string CCGLContext::version() const
{
return "Invalid version";
}
const std::string CCGLContext::name() const
{
return "GLX Context";
}
int CCGLContext::depthSize() const
{
return -1;
}
int CCGLContext::redDepth() const
{
return -1;
}
int CCGLContext::greenDepth() const
{
return -1;
}
int CCGLContext::blueDepth() const
{
return -1;
}

View File

@ -0,0 +1,11 @@
#include "CSurface.hpp"
ISurface* CSurfaceNewWindow()
{
}
ISurface* CSurfaceNewQWidget()
{
}

View File

@ -4,5 +4,6 @@
int main(int argc, char** argv)
{
return 0;
}