#define CONTEXT_H
-#include "glapi/glapi.h"
#include "imports.h"
#include "mtypes.h"
+struct _glapi_table;
+
+
/** \name Visual-related functions */
/*@{*/
const struct dd_function_table *driverFunctions,
void *driverContext );
+extern void
+_mesa_initialize_context_extra(GLcontext *ctx);
+
extern void
_mesa_free_context_data( GLcontext *ctx );
extern void
+_mesa_check_init_viewport(GLcontext *ctx, GLuint width, GLuint height);
+
+extern GLboolean
_mesa_make_current( GLcontext *ctx, GLframebuffer *drawBuffer,
GLframebuffer *readBuffer );
_mesa_get_dispatch(GLcontext *ctx);
+void
+_mesa_set_mvp_with_dp4( GLcontext *ctx,
+ GLboolean flag );
+
+
+extern GLboolean
+_mesa_valid_to_render(GLcontext *ctx, const char *where);
+
+
/** \name Miscellaneous */
/*@{*/
extern void
_mesa_record_error( GLcontext *ctx, GLenum error );
+
+extern void
+_mesa_finish(GLcontext *ctx);
+
+extern void
+_mesa_flush(GLcontext *ctx);
+
+
extern void GLAPIENTRY
_mesa_Finish( void );
/*@}*/
-
/**
* \name Macros for flushing buffered rendering commands before state changes,
* checking if inside glBegin/glEnd, etc.
(((CTX)->Light.Enabled && \
(CTX)->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR) \
|| (CTX)->Fog.ColorSumEnabled \
- || ((CTX)->VertexProgram._Enabled && \
- ((CTX)->VertexProgram.Current->Base.InputsRead & VERT_BIT_COLOR1)) \
- || ((CTX)->FragmentProgram._Enabled && \
- ((CTX)->FragmentProgram.Current->Base.InputsRead & FRAG_BIT_COL1)) \
+ || ((CTX)->VertexProgram._Current && \
+ ((CTX)->VertexProgram._Current != (CTX)->VertexProgram._TnlProgram) && \
+ ((CTX)->VertexProgram._Current->Base.InputsRead & VERT_BIT_COLOR1)) \
+ || ((CTX)->FragmentProgram._Current && \
+ ((CTX)->FragmentProgram._Current != (CTX)->FragmentProgram._TexEnvProgram) && \
+ ((CTX)->FragmentProgram._Current->Base.InputsRead & FRAG_BIT_COL1)) \
)