summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGL/GLStruct.h
blob: 9b7785462fd4dee1d33df5c4b5b0c588dac49879 (plain)
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
/*
 * Copyright (c) 2021, Jesse Buhagiar <jooster669@gmail.com>
 *
 * SPDX-License-Identifier: BSD-2-Clause
 */

#pragma once

#include "GL/gl.h"
#include <LibGfx/Vector2.h>
#include <LibGfx/Vector4.h>

namespace GL {

struct GLColor {
    GLclampf r, g, b, a;
};

struct GLVertex {
    FloatVector4 position;
    FloatVector4 color;
    FloatVector2 tex_coord;
};

struct GLTriangle {
    GLVertex vertices[3];
};

struct GLEdge {
    GLfloat x1;
    GLfloat y1;
    GLfloat x2;
    GLfloat y2;
};

}