mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 10:07:35 +00:00
LibGL+LibSoftGPU: Move Vertex and Triangle structs to LibSoftGPU
This commit is contained in:
parent
73ba208ee7
commit
251f3c007f
9 changed files with 68 additions and 36 deletions
|
@ -17,17 +17,6 @@ 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;
|
||||
|
|
|
@ -500,7 +500,7 @@ void SoftwareGLContext::gl_vertex(GLdouble x, GLdouble y, GLdouble z, GLdouble w
|
|||
{
|
||||
APPEND_TO_CALL_LIST_AND_RETURN_IF_NEEDED(gl_vertex, x, y, z, w);
|
||||
|
||||
GLVertex vertex;
|
||||
SoftGPU::Vertex vertex;
|
||||
|
||||
vertex.position = { static_cast<float>(x), static_cast<float>(y), static_cast<float>(z), static_cast<float>(w) };
|
||||
vertex.color = m_current_vertex_color;
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
#include <LibGfx/Vector3.h>
|
||||
#include <LibSoftGPU/Clipper.h>
|
||||
#include <LibSoftGPU/SoftwareRasterizer.h>
|
||||
#include <LibSoftGPU/Vertex.h>
|
||||
|
||||
namespace GL {
|
||||
|
||||
|
@ -176,7 +177,7 @@ private:
|
|||
FloatVector4 m_current_vertex_tex_coord = { 0.0f, 0.0f, 0.0f, 1.0f };
|
||||
FloatVector3 m_current_vertex_normal = { 0.0f, 0.0f, 1.0f };
|
||||
|
||||
Vector<GLVertex, 96> m_vertex_list;
|
||||
Vector<SoftGPU::Vertex> m_vertex_list;
|
||||
|
||||
GLenum m_error = GL_NO_ERROR;
|
||||
bool m_in_draw_state = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue