mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-29 21:00:06 +00:00
In OpenGL, texture coordinates can have up to 4 values. This change
will help with easy application of texture coordinate matrix
transformations in the future.
Additionally, correct the initial value for texture coordinates to
`{ 0.f, 0.f, 0.f, 1.f}`.
39 lines
555 B
C++
39 lines
555 B
C++
/*
|
|
* 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/Vector3.h>
|
|
#include <LibGfx/Vector4.h>
|
|
|
|
namespace GL {
|
|
|
|
struct GLColor {
|
|
GLclampf r, g, b, a;
|
|
};
|
|
|
|
struct GLVertex {
|
|
FloatVector4 position;
|
|
FloatVector4 color;
|
|
FloatVector4 tex_coord;
|
|
FloatVector3 normal;
|
|
};
|
|
|
|
struct GLTriangle {
|
|
GLVertex vertices[3];
|
|
};
|
|
|
|
struct GLEdge {
|
|
GLfloat x1;
|
|
GLfloat y1;
|
|
GLfloat x2;
|
|
GLfloat y2;
|
|
};
|
|
|
|
}
|