#ifndef _MGL_DISPLAYLIST_STRUCTS_H_ #define _MGL_DISPLAYLIST_STRUCTS_H_ /* * $Id: displaylist.c 200 2007-11-03 11:53:08Z hderuiter $ * * $Date: 2007-11-03 12:26:08 $ * $Revision: 000 $ * * (C) 2007 by Hans de Ruiter * All rights reserved * * This file is part of the MiniGL library project * See the file Licence.txt for more details * */ union DLOpData_u { GLboolean b; GLbitfield bf; GLclampd cd; GLubyte ub; GLshort s; GLushort us; GLint i; GLuint ui; GLenum e; GLfloat f; GLdouble d; GLvoid *data; }; typedef void(*DLOpFunc)(struct GLContextIFace *Self, const struct DLOperation_s *op); // Typedefed as DLOperation in struct DLOperation_s { DLOpFunc opFunc; union DLOpData_u opData; struct DLOperation_s *nextOp; }; typedef struct AlphaFuncData_s { GLenum func; GLclampf ref; } AlphaFuncData; typedef struct BindTextureData_s { GLenum target; GLuint texture; } BindTextureData; typedef struct BitmapData_s { GLsizei width; GLsizei height; GLfloat xorig; GLfloat yorig; GLfloat xmove; GLfloat ymove; const GLubyte bitmap[1]; // placeholder for a variable-length array } BitmapData; typedef struct CopyTexImage2DData_s { GLenum target; GLint level; GLenum internalFormat; GLint x; GLint y; GLsizei width; GLsizei height; GLint border; } CopyTexImage2DData; typedef struct CopyTexSubImage2DData_s { GLenum target; GLint level; GLint xoffset; GLint yoffset; GLint x; GLint y; GLsizei width; GLsizei height; } CopyTexSubImage2DData; typedef struct MaterialFVData_s { GLenum face; GLenum pname; GLfloat params[4]; } MaterialFVData; typedef struct MaterialIVData_s { GLenum face; GLenum pname; GLint params[4]; } MaterialIVData; typedef struct CallListsData_s { GLsizei n; GLenum type; GLuint lists[1]; // Placeholder for a variable-length array } CallListsData; typedef struct ClipPlaneData_s { GLenum plane; GLdouble equ[4]; } ClipPlaneData; typedef struct ColorTableData_s { GLenum target; GLenum internalformat; GLint width; GLenum format; GLenum type; GLubyte data[1]; // placeholder for a variable-length array; } ColorTableData; typedef struct DrawArraysData_s { GLenum mode; GLint first; GLsizei count; struct GLvertex_array_state vertex_array; } DrawArraysData; typedef struct DrawElementsData_s { GLenum mode; GLsizei count; GLenum type; struct GLvertex_array_state vertex_array; GLuint indices[1]; // a placeholder for a variable-length array } DrawElementsData; typedef struct FogfData_s { GLenum pname; GLfloat param; }FogfData; typedef struct FogfvData_s { GLenum pname; GLfloat params[1]; // Placehoder for a variable-length array } FogfvData; typedef struct LightfData_s { GLenum light; GLenum pname; GLfloat param; } LightfData; typedef struct LightfvData_s { GLenum light; GLenum pname; GLfloat params[4]; } LightfvData; typedef struct LightivData_s { GLenum light; GLenum pname; GLint params[4]; } LightivData; typedef struct LightModelfData_s { GLenum pname; GLfloat param; } LightModelfData; typedef struct LightModelfvData_s { GLenum pname; GLfloat params[4]; } LightModelfvData; typedef struct LightModelivData_s { GLenum pname; GLint params[4]; } LightModelivData; typedef struct LineStippleData_s { GLint factor; GLushort pattern; } LineStippleData; typedef struct MaterialfData_s { GLenum face; GLenum pname; GLfloat param; } MaterialfData; typedef struct MultiTexCoord2fData_s { GLenum target; GLfloat s; GLfloat t; } MultiTexCoord2fData; typedef struct MultiTexCoord4fData_s { GLenum target; GLfloat s; GLfloat t; GLfloat r; GLfloat q; } MultiTexCoord4fData; typedef struct PolygonStippleData_s { GLubyte pattern[32/8 * 32]; } PolygonStippleData; typedef struct PrioritizeTexturesData_s { GLsizei n; GLuint *textures; GLclampf *priorities; } PrioritizeTexturesData; typedef struct ScissorData_s { GLint x; GLint y; GLsizei width; GLsizei height; } ScissorData; typedef struct SetStateData_s { GLenum cap; GLboolean flag; } SetStateData; typedef struct StencilFuncData_s { GLenum func; GLint ref; GLuint mask; }StencilFuncData; typedef struct TexEnviData_s { GLenum target; GLenum pname; GLint param; } TexEnviData; typedef struct TexEnvfvData_s { GLenum target; GLenum pname; GLfloat params[4]; } TexEnvfvData; typedef struct TexGeniData_s { GLenum coord; GLenum pname; GLint param; } TexGeniData; typedef struct TexGenfvData_s { GLenum coord; GLenum pname; GLfloat params[4]; } TexGenfvData; typedef struct TexImage2DData_s { GLenum target; GLint level; GLint internalformat; GLsizei width; GLsizei height; GLint border; GLenum format; GLenum type; GLubyte pixels[1]; // Placeholder for a variaible-length array } TexImage2DData; typedef struct TexParameteriData_s { GLenum target; GLenum pname; GLint param; } TexParameteriData; typedef struct TexSubImage2D_s { GLenum target; GLint level; GLint xoffset; GLint yoffset; GLsizei width; GLsizei height; GLenum format; GLenum type; GLubyte pixels[1]; // Placeholder for a variaible-length array } TexSubImage2DData; typedef struct ViewportData_s { GLint x; GLint y; GLsizei width; GLsizei height; } ViewportData; typedef struct DrawPixelsData_s { GLsizei width; GLsizei height; GLenum format; GLenum type; GLubyte pixels[1]; // Placeholder, allocated with variable length } DrawPixelsData; typedef struct Map1fData_s { GLenum target; GLfloat u1; GLfloat u2; GLint order; GLfloat points[1]; } Map1fData; typedef struct Map1dData_s { GLenum target; GLdouble u1; GLdouble u2; GLint order; GLdouble points[1]; } Map1dData; typedef struct EvalCoord1Data_s { GLfloat arg; } EvalCoord1Data; typedef struct MapGrid1Data_s { GLint n; GLfloat u1; GLfloat u2; } MapGrid1Data; typedef struct EvalMesh1Data_s { GLenum mode; GLint p1; GLint p2; } EvalMesh1Data; typedef struct EvalPoint1Data_s { GLint p; } EvalPoint1Data; typedef struct Map2fData_s { GLenum target; GLfloat u1; GLfloat u2; GLint uorder; GLfloat v1; GLfloat v2; GLint vorder; GLfloat points[1]; } Map2fData; typedef struct Map2dData_s { GLenum target; GLdouble u1; GLdouble u2; GLint uorder; GLdouble v1; GLdouble v2; GLint vorder; GLdouble points[1]; } Map2dData; typedef struct EvalCoord2Data_s { GLfloat u; GLfloat v; } EvalCoord2Data; typedef struct MapGrid2Data_s { GLint nu; GLfloat u1; GLfloat u2; GLint nv; GLfloat v1; GLfloat v2; } MapGrid2Data; typedef struct EvalMesh2Data_s { GLenum mode; GLint p1; GLint p2; GLint q1; GLint q2; } EvalMesh2Data; typedef struct EvalPoint2Data_s { GLint p; GLint q; } EvalPoint2Data; typedef struct PixelTransferData_s { GLenum param; GLfloat value; } PixelTransferData; typedef struct PixelZoomData_s { GLfloat zoom_x; GLfloat zoom_y; } PixelZoomData; typedef struct CopyPixelData_s { GLint x; GLint y; GLsizei width; GLsizei height; GLenum type; } CopyPixelData; typedef struct LogicOpModeData_s { GLenum op; } LogicOpModeData; #endif