about summary refs log tree commit diff stats
path: root/includes/xmlrpc
Commit message (Collapse)AuthorAgeFilesLines
* Fixed permissionsStarla Insigna2008-11-199-0/+0
|
* Imported sourcesStarla Insigna2008-11-199-0/+6194
cbb26'>7f0e8c7 ^
44324ba ^
7f0e8c7 ^




1a392a7 ^
ea0a959 ^

da3df06 ^
7f0e8c7 ^



de5a458



de5a458

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37

                       








                  

  



                                   
                                




                                                   
                                                                                            

                               
 



                 



                           

      
#include <GL/glew.h>
#include <GLFW/glfw3.h>

#ifndef RENDERER_H
#define RENDERER_H

struct Rectangle {
  int x;
  int y;
  int w;
  int h;
};

class Texture {
  public:
    Texture(int width, int height);
    Texture(const char* file);
    Texture(const Texture& tex);
    Texture(Texture&& tex);
    ~Texture();
    Texture& operator= (Texture tex);
    friend void swap(Texture& tex1, Texture& tex2);
    void fill(Rectangle loc, int r, int g, int b);
    void blit(const Texture& src, Rectangle srcrect, Rectangle dstrect, double alpha = 1.0);
    void renderScreen() const;
    Rectangle entirety() const;

  private:
    GLuint texID;
    int width;
    int height;
};

GLFWwindow* initRenderer();
void destroyRenderer();

#endif