Subversion Repositories seema-scanner

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1 jakw 1
//
2
//  OpenGLContext.h
3
//  OpenGLContext
4
//
5
//  Created by Jakob Wilm on 18/03/13.
6
//  Copyright (c) 2013 Jakob Wilm. All rights reserved.
7
//
8
 
9
#ifndef OPENGLCONTEXT_H
10
#define OPENGLCONTEXT_H
11
 
12
#include <iostream>
13
#include <vector>
14
#include <sys/types.h>
15
 
16
struct ScreenInfo {
17
    unsigned int resX, resY;
18
    unsigned int posX, posY;
19
    std::string name;
20
    ScreenInfo(): resX(0), resY(0), posX(0), posY(0){}
21
};
22
 
23
// Platform dependent OpenGLContext class
24
class OpenGLContext{
25
    public:
26
        // Static "class" methods
27
        static std::vector<ScreenInfo> GetScreenInfo();
28
        // Interface function
29
        OpenGLContext(unsigned int _screenNum = 0);
30
        void setGamma(float gamma);
31
        unsigned int getScreenResX(){return screenResX;}
32
        unsigned int getScreenResY(){return screenResY;}
33
        ~OpenGLContext();
34
        void makeContextCurrent();
35
        void flush();
36
    private:
37
        unsigned int screenNum;
38
        unsigned int screenResX, screenResY;
39
        // Opaque data type defined in platform specific files
40
        struct OpenGLContextInfo;
41
        OpenGLContextInfo *contextInfo;
42
};
43
 
44
#endif