summaryrefslogtreecommitdiff
path: root/main.h
diff options
context:
space:
mode:
authorFox Caminiti <fox@foxcam.net>2022-08-10 21:24:03 -0400
committerFox Caminiti <fox@foxcam.net>2022-08-10 21:24:03 -0400
commitbc5375149c0ecb416848a2d3657ea41ae97177b3 (patch)
tree8868395241d523bb96ea90d2846cd6ffefcae766 /main.h
parentf1e12e108869c560d92eb8803e4b5104c7d8f85d (diff)
path rasterization started with opengl
Diffstat (limited to 'main.h')
-rw-r--r--main.h37
1 files changed, 28 insertions, 9 deletions
diff --git a/main.h b/main.h
index 8a6c7ca..e77042f 100644
--- a/main.h
+++ b/main.h
@@ -30,6 +30,7 @@ enum memory_table_list {
P_AVInfo,
P_SourceBitmapTable,
+ P_VectorPoints,
P_MiscCache, // don't put this in final
F_Layers,
@@ -127,23 +128,39 @@ enum blend_mode
blend_difference
};
-struct gl_vertex_shader {
-};
struct gl_effect {
- uint32 FragmentShader;
uint32 ShaderProgram;
- uint32 VertexShader;
- uint32 EBO;
- uint32 VBO;
};
-static gl_effect TGL;
+struct gl_vertex_shader {
+ uint32 VertexArrayObject;
+ uint32 VertexBufferObject;
+};
+
+struct default_gl_vertex_object {
+ uint32 VertexArrayObject;
+ uint32 VertexBufferObject;
+ uint32 ElementBufferObject;
+};
+
+static default_gl_vertex_object DefaultVerts;
+static uint32 DefaultVertexShader;
+static uint32 DefaultShaderProgram;
+static uint32 MaskShaderProgram;
+
+float DefaultVertices[] = {
+ 1.0f, 1.0f, 0.0f, 1.0f, 1.0f,
+ 1.0f, -1.0f, 0.0f, 1.0f, 0.0f,
+ -1.0f, -1.0f, 0.0f, 0.0f, 0.0f,
+ -1.0f, 1.0f, 0.0f, 0.0f, 1.0f,
+};
+
struct gl_effect_layer {
GLuint Texture;
- GLuint FBO;
- GLuint RBO;
+ GLuint FramebufferObject;
+ uint32 Color_Renderbuffer;
};
static gl_vertex_shader GL_Vertices;
@@ -313,6 +330,8 @@ struct mask_point {
struct mask {
mask_point Point[16];
uint16 NumberOfPoints;
+ void *TriangulatedPointCache;
+ uint32 NumberOfVerts;
};
struct project_layer {