#include "mtypes.h"
#include "texformat.h"
#include "texstore.h"
-#include "array_cache/acache.h"
+#include "vbo/vbo.h"
#include "swrast/swrast.h"
#include "swrast_setup/swrast_setup.h"
#include "swrast_setup/ss_context.h"
GLfloat ex,ey,fx,fy,cc; \
/* Get vars for later */ \
VB = &TNL_CONTEXT(ctx)->vb; \
- vbcolor = (GLchan (*)[4])VB->ColorPtr[1]->data; \
- if (VB->SecondaryColorPtr[1]) { \
- vbspec = (GLchan (*)[4])VB->SecondaryColorPtr[1]->data; \
+ vbcolor = (GLchan (*)[4])VB->BackfaceColorPtr->data; \
+ if (VB->BackfaceSecondaryColorPtr) { \
+ vbspec = (GLchan (*)[4])VB->BackfaceSecondaryColorPtr->data; \
} else { \
vbspec = NULL; \
} \
DWORD dwColor;
#define GLD_SETUP_3D_VERTEX(v) \
- p4f = VB->ObjPtr->data; \
+ p4f = VB->AttribPtr[_TNL_ATTRIB_POS]->data; \
pV->Position.x = p4f[##v][0]; \
pV->Position.y = p4f[##v][1]; \
pV->Position.z = p4f[##v][2];
#define GLD_SETUP_SMOOTH_COLOUR_3D(v) \
- p4f = (GLfloat (*)[4])VB->ColorPtr[0]->data; \
+ p4f = (GLfloat (*)[4])VB->AttribPtr[_TNL_ATTRIB_COLOR0]->data; \
pV->Diffuse = D3DCOLOR_COLORVALUE(p4f[##v][0], p4f[##v][1], p4f[##v][2], p4f[##v][3]);
#define GLD_SETUP_GET_FLAT_COLOUR_3D(v) \
- p4f = (GLfloat (*)[4])VB->ColorPtr[0]->data; \
+ p4f = (GLfloat (*)[4])VB->AttribPtr[_TNL_ATTRIB_COLOR0]->data; \
dwColor = D3DCOLOR_COLORVALUE(p4f[##v][0], p4f[##v][1], p4f[##v][2], p4f[##v][3]);
#define GLD_SETUP_USE_FLAT_COLOUR_3D \
pV->Diffuse = dwColor;
#define GLD_SETUP_TEX0_3D(v) \
- if (VB->TexCoordPtr[0]) { \
- tc = VB->TexCoordPtr[0]->data; \
+ if (VB->AttribPtr[_TNL_ATTRIB_TEX0]) { \
+ tc = VB->TnlAttribPtr[_TNL_ATTRIB_TEX0]->data; \
pV->TexUnit0.x = tc[##v][0]; \
pV->TexUnit0.y = tc[##v][1]; \
}
#define GLD_SETUP_TEX1_3D(v) \
- if (VB->TexCoordPtr[1]) { \
- tc = VB->TexCoordPtr[1]->data; \
+ if (VB->TnlAttribPtr[_TNL_ATTRIB_TEX1]) { \
+ tc = VB->TnlAttribPtr[_TNL_ATTRIB_TEX1]->data; \
pV->TexUnit1.x = tc[##v][0]; \
pV->TexUnit1.y = tc[##v][1]; \
}
//---------------------------------------------------------------------------
__inline DWORD _gldComputeFog(
- GLcontext *ctx,
+ struct gl_context *ctx,
SWvertex *swv)
{
// Full fog calculation.
//---------------------------------------------------------------------------
void gld_ResetLineStipple_DX8(
- GLcontext *ctx)
+ struct gl_context *ctx)
{
// TODO: Fake stipple with a 32x32 texture.
}
//---------------------------------------------------------------------------
void gld_Points2D_DX8(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLuint first,
GLuint last)
{
//---------------------------------------------------------------------------
void gld_Line2DFlat_DX8(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLuint v0,
GLuint v1)
{
//---------------------------------------------------------------------------
void gld_Line2DSmooth_DX8(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLuint v0,
GLuint v1)
{
//---------------------------------------------------------------------------
void gld_Triangle2DFlat_DX8(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLuint v0,
GLuint v1,
GLuint v2)
//---------------------------------------------------------------------------
void gld_Triangle2DSmooth_DX8(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLuint v0,
GLuint v1,
GLuint v2)
//---------------------------------------------------------------------------
void gld_Triangle2DFlatExtras_DX8(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLuint v0,
GLuint v1,
GLuint v2)
//---------------------------------------------------------------------------
void gld_Triangle2DSmoothExtras_DX8(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLuint v0,
GLuint v1,
GLuint v2)
//---------------------------------------------------------------------------
void gld_Quad2DFlat_DX8(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLuint v0,
GLuint v1,
GLuint v2,
//---------------------------------------------------------------------------
void gld_Quad2DSmooth_DX8(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLuint v0,
GLuint v1,
GLuint v2,
//---------------------------------------------------------------------------
void gld_Quad2DFlatExtras_DX8(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLuint v0,
GLuint v1,
GLuint v2,
//---------------------------------------------------------------------------
void gld_Quad2DSmoothExtras_DX8(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLuint v0,
GLuint v1,
GLuint v2,
//---------------------------------------------------------------------------
void gld_Points3D_DX8(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLuint first,
GLuint last)
{
//---------------------------------------------------------------------------
void gld_Line3DFlat_DX8(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLuint v0,
GLuint v1)
{
//---------------------------------------------------------------------------
void gld_Line3DSmooth_DX8(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLuint v0,
GLuint v1)
{
//---------------------------------------------------------------------------
void gld_Triangle3DFlat_DX8(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLuint v0,
GLuint v1,
GLuint v2)
//---------------------------------------------------------------------------
void gld_Triangle3DSmooth_DX8(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLuint v0,
GLuint v1,
GLuint v2)
//---------------------------------------------------------------------------
void gld_Quad3DFlat_DX8(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLuint v0,
GLuint v1,
GLuint v2,
//---------------------------------------------------------------------------
void gld_Quad3DSmooth_DX8(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLuint v0,
GLuint v1,
GLuint v2,
/*
-void gld_Points2DTwoside_DX8(GLcontext *ctx, GLuint first, GLuint last)
+void gld_Points2DTwoside_DX8(struct gl_context *ctx, GLuint first, GLuint last)
{
// NOTE: Two-sided lighting does not apply to Points
}
//---------------------------------------------------------------------------
-void gld_Line2DFlatTwoside_DX8(GLcontext *ctx, GLuint v0, GLuint v1)
+void gld_Line2DFlatTwoside_DX8(struct gl_context *ctx, GLuint v0, GLuint v1)
{
// NOTE: Two-sided lighting does not apply to Lines
}
//---------------------------------------------------------------------------
-void gld_Line2DSmoothTwoside_DX8(GLcontext *ctx, GLuint v0, GLuint v1)
+void gld_Line2DSmoothTwoside_DX8(struct gl_context *ctx, GLuint v0, GLuint v1)
{
// NOTE: Two-sided lighting does not apply to Lines
}
//---------------------------------------------------------------------------
-void gld_Triangle2DFlatTwoside_DX8(GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2)
+void gld_Triangle2DFlatTwoside_DX8(struct gl_context *ctx, GLuint v0, GLuint v1, GLuint v2)
{
}
//---------------------------------------------------------------------------
-void gld_Triangle2DSmoothTwoside_DX8(GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2)
+void gld_Triangle2DSmoothTwoside_DX8(struct gl_context *ctx, GLuint v0, GLuint v1, GLuint v2)
{
GLD_context *gldCtx = GLD_GET_CONTEXT(ctx);
GLD_driver_dx8 *gld = GLD_GET_DX8_DRIVER(gldCtx);
//---------------------------------------------------------------------------
-void gld_Quad2DFlatTwoside_DX8(GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3)
+void gld_Quad2DFlatTwoside_DX8(struct gl_context *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3)
{
GLD_context *gldCtx = GLD_GET_CONTEXT(ctx);
GLD_driver_dx8 *gld = GLD_GET_DX8_DRIVER(gldCtx);
//---------------------------------------------------------------------------
-void gld_Quad2DSmoothTwoside_DX8(GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3)
+void gld_Quad2DSmoothTwoside_DX8(struct gl_context *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3)
{
GLD_context *gldCtx = GLD_GET_CONTEXT(ctx);
GLD_driver_dx8 *gld = GLD_GET_DX8_DRIVER(gldCtx);