ladybird/Userland/Libraries/LibGL/GLStruct.h
Jesse Buhagiar 4807d32139 LibGL: Implement a basic OpenGL 1.x compatible library
This currently (obviously) doesn't support any actual 3D hardware,
hence all calls are done via software rendering.

Note that any modern constructs such as shaders are unsupported,
as this driver only implements Fixed Function Pipeline functionality.

The library is split into a base GLContext interface and a software
based renderer implementation of said interface. The global glXXX
functions serve as an OpenGL compatible c-style interface to the
currently bound context instance.

Co-authored-by: Stephan Unverwerth <s.unverwerth@gmx.de>
2021-05-08 10:13:22 +02:00

35 lines
433 B
C++

/*
* Copyright (c) 2021, Jesse Buhagiar <jooster669@gmail.com>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include "GL/gl.h"
namespace GL {
struct GLColor {
GLclampf r, g, b, a;
};
struct GLVertex {
GLfloat x, y, z, w;
GLfloat r, g, b, a;
GLfloat u, v;
};
struct GLTriangle {
GLVertex vertices[3];
};
struct GLEdge {
GLfloat x1;
GLfloat y1;
GLfloat x2;
GLfloat y2;
};
}