Commit c40d1dd6 authored by Kendall Bennett's avatar Kendall Bennett

Added GLAPIENTRY decorations for all first level OpenGL API function entry

points so that the calling conventions will work correctly with the assembler
stubs with the Open Watcom compiler.
parent b1ca87a5
This source diff could not be displayed because it is too large. You can view the blob instead.
#!/usr/bin/env python
# $Id: gltable.py,v 1.3 2001/11/18 22:42:57 brianp Exp $
# $Id: gltable.py,v 1.4 2003/10/21 22:22:18 kendallb Exp $
# Mesa 3-D graphics library
# Version: 4.1
......@@ -77,7 +77,7 @@ def PrintRecords():
pass
prevk = int(k)
(name, returnType, argList) = records[k]
print ' %s (*%s)(%s); /* %d */' % (returnType, name, argList, k)
print ' %s (GLAPIENTRYP %s)(%s); /* %d */' % (returnType, name, argList, k)
#endef
......
......@@ -32,7 +32,7 @@
#include "mtypes.h"
void
void GLAPIENTRY
_mesa_ClearAccum( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha )
{
GLfloat tmp[4];
......@@ -53,7 +53,7 @@ _mesa_ClearAccum( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha )
/* Should really be a driver-supplied function?
*/
void
void GLAPIENTRY
_mesa_Accum( GLenum op, GLfloat value )
{
GET_CURRENT_CONTEXT(ctx);
......
......@@ -42,11 +42,11 @@
#if _HAVE_FULL_GL
extern void
extern void GLAPIENTRY
_mesa_Accum( GLenum op, GLfloat value );
extern void
extern void GLAPIENTRY
_mesa_ClearAccum( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha );
extern void
......
This diff is collapsed.
......@@ -44,7 +44,7 @@
#include "nvvertprog.h"
void
void GLAPIENTRY
_mesa_EnableVertexAttribArrayARB(GLuint index)
{
GET_CURRENT_CONTEXT(ctx);
......@@ -62,7 +62,7 @@ _mesa_EnableVertexAttribArrayARB(GLuint index)
}
void
void GLAPIENTRY
_mesa_DisableVertexAttribArrayARB(GLuint index)
{
GET_CURRENT_CONTEXT(ctx);
......@@ -80,7 +80,7 @@ _mesa_DisableVertexAttribArrayARB(GLuint index)
}
void
void GLAPIENTRY
_mesa_GetVertexAttribdvARB(GLuint index, GLenum pname, GLdouble *params)
{
GLfloat fparams[4];
......@@ -99,7 +99,7 @@ _mesa_GetVertexAttribdvARB(GLuint index, GLenum pname, GLdouble *params)
}
void
void GLAPIENTRY
_mesa_GetVertexAttribfvARB(GLuint index, GLenum pname, GLfloat *params)
{
GET_CURRENT_CONTEXT(ctx);
......@@ -143,7 +143,7 @@ _mesa_GetVertexAttribfvARB(GLuint index, GLenum pname, GLfloat *params)
}
void
void GLAPIENTRY
_mesa_GetVertexAttribivARB(GLuint index, GLenum pname, GLint *params)
{
GLfloat fparams[4];
......@@ -162,7 +162,7 @@ _mesa_GetVertexAttribivARB(GLuint index, GLenum pname, GLint *params)
}
void
void GLAPIENTRY
_mesa_GetVertexAttribPointervARB(GLuint index, GLenum pname, GLvoid **pointer)
{
GET_CURRENT_CONTEXT(ctx);
......@@ -182,7 +182,7 @@ _mesa_GetVertexAttribPointervARB(GLuint index, GLenum pname, GLvoid **pointer)
}
void
void GLAPIENTRY
_mesa_ProgramStringARB(GLenum target, GLenum format, GLsizei len,
const GLvoid *string)
{
......@@ -215,7 +215,7 @@ _mesa_ProgramStringARB(GLenum target, GLenum format, GLsizei len,
}
void
void GLAPIENTRY
_mesa_ProgramEnvParameter4dARB(GLenum target, GLuint index,
GLdouble x, GLdouble y, GLdouble z, GLdouble w)
{
......@@ -224,7 +224,7 @@ _mesa_ProgramEnvParameter4dARB(GLenum target, GLuint index,
}
void
void GLAPIENTRY
_mesa_ProgramEnvParameter4dvARB(GLenum target, GLuint index,
const GLdouble *params)
{
......@@ -234,7 +234,7 @@ _mesa_ProgramEnvParameter4dvARB(GLenum target, GLuint index,
}
void
void GLAPIENTRY
_mesa_ProgramEnvParameter4fARB(GLenum target, GLuint index,
GLfloat x, GLfloat y, GLfloat z, GLfloat w)
{
......@@ -264,7 +264,7 @@ _mesa_ProgramEnvParameter4fARB(GLenum target, GLuint index,
}
void
void GLAPIENTRY
_mesa_ProgramEnvParameter4fvARB(GLenum target, GLuint index,
const GLfloat *params)
{
......@@ -273,7 +273,7 @@ _mesa_ProgramEnvParameter4fvARB(GLenum target, GLuint index,
}
void
void GLAPIENTRY
_mesa_GetProgramEnvParameterdvARB(GLenum target, GLuint index,
GLdouble *params)
{
......@@ -290,7 +290,7 @@ _mesa_GetProgramEnvParameterdvARB(GLenum target, GLuint index,
}
void
void GLAPIENTRY
_mesa_GetProgramEnvParameterfvARB(GLenum target, GLuint index,
GLfloat *params)
{
......@@ -325,7 +325,7 @@ _mesa_GetProgramEnvParameterfvARB(GLenum target, GLuint index,
/**
* Note, this function is also used by the GL_NV_fragment_program extension.
*/
void
void GLAPIENTRY
_mesa_ProgramLocalParameter4fARB(GLenum target, GLuint index,
GLfloat x, GLfloat y, GLfloat z, GLfloat w)
{
......@@ -367,7 +367,7 @@ _mesa_ProgramLocalParameter4fARB(GLenum target, GLuint index,
/**
* Note, this function is also used by the GL_NV_fragment_program extension.
*/
void
void GLAPIENTRY
_mesa_ProgramLocalParameter4fvARB(GLenum target, GLuint index,
const GLfloat *params)
{
......@@ -379,7 +379,7 @@ _mesa_ProgramLocalParameter4fvARB(GLenum target, GLuint index,
/**
* Note, this function is also used by the GL_NV_fragment_program extension.
*/
void
void GLAPIENTRY
_mesa_ProgramLocalParameter4dARB(GLenum target, GLuint index,
GLdouble x, GLdouble y,
GLdouble z, GLdouble w)
......@@ -392,7 +392,7 @@ _mesa_ProgramLocalParameter4dARB(GLenum target, GLuint index,
/**
* Note, this function is also used by the GL_NV_fragment_program extension.
*/
void
void GLAPIENTRY
_mesa_ProgramLocalParameter4dvARB(GLenum target, GLuint index,
const GLdouble *params)
{
......@@ -405,7 +405,7 @@ _mesa_ProgramLocalParameter4dvARB(GLenum target, GLuint index,
/**
* Note, this function is also used by the GL_NV_fragment_program extension.
*/
void
void GLAPIENTRY
_mesa_GetProgramLocalParameterfvARB(GLenum target, GLuint index,
GLfloat *params)
{
......@@ -450,7 +450,7 @@ _mesa_GetProgramLocalParameterfvARB(GLenum target, GLuint index,
/**
* Note, this function is also used by the GL_NV_fragment_program extension.
*/
void
void GLAPIENTRY
_mesa_GetProgramLocalParameterdvARB(GLenum target, GLuint index,
GLdouble *params)
{
......@@ -463,7 +463,7 @@ _mesa_GetProgramLocalParameterdvARB(GLenum target, GLuint index,
}
void
void GLAPIENTRY
_mesa_GetProgramivARB(GLenum target, GLenum pname, GLint *params)
{
struct program *prog;
......@@ -670,7 +670,7 @@ _mesa_GetProgramivARB(GLenum target, GLenum pname, GLint *params)
}
void
void GLAPIENTRY
_mesa_GetProgramStringARB(GLenum target, GLenum pname, GLvoid *string)
{
struct program *prog;
......
......@@ -27,101 +27,101 @@
#define ARBPROGRAM_H
extern void
extern void GLAPIENTRY
_mesa_EnableVertexAttribArrayARB(GLuint index);
extern void
extern void GLAPIENTRY
_mesa_DisableVertexAttribArrayARB(GLuint index);
extern void
extern void GLAPIENTRY
_mesa_GetVertexAttribdvARB(GLuint index, GLenum pname, GLdouble *params);
extern void
extern void GLAPIENTRY
_mesa_GetVertexAttribfvARB(GLuint index, GLenum pname, GLfloat *params);
extern void
extern void GLAPIENTRY
_mesa_GetVertexAttribivARB(GLuint index, GLenum pname, GLint *params);
extern void
extern void GLAPIENTRY
_mesa_GetVertexAttribPointervARB(GLuint index, GLenum pname, GLvoid **pointer);
extern void
extern void GLAPIENTRY
_mesa_ProgramStringARB(GLenum target, GLenum format, GLsizei len,
const GLvoid *string);
extern void
extern void GLAPIENTRY
_mesa_ProgramEnvParameter4dARB(GLenum target, GLuint index,
GLdouble x, GLdouble y, GLdouble z, GLdouble w);
extern void
extern void GLAPIENTRY
_mesa_ProgramEnvParameter4dvARB(GLenum target, GLuint index,
const GLdouble *params);
extern void
extern void GLAPIENTRY
_mesa_ProgramEnvParameter4fARB(GLenum target, GLuint index,
GLfloat x, GLfloat y, GLfloat z, GLfloat w);
extern void
extern void GLAPIENTRY
_mesa_ProgramEnvParameter4fvARB(GLenum target, GLuint index,
const GLfloat *params);
extern void
extern void GLAPIENTRY
_mesa_ProgramLocalParameter4dARB(GLenum target, GLuint index,
GLdouble x, GLdouble y,
GLdouble z, GLdouble w);
extern void
extern void GLAPIENTRY
_mesa_ProgramLocalParameter4dvARB(GLenum target, GLuint index,
const GLdouble *params);
extern void
extern void GLAPIENTRY
_mesa_ProgramLocalParameter4fARB(GLenum target, GLuint index,
GLfloat x, GLfloat y, GLfloat z, GLfloat w);
extern void
extern void GLAPIENTRY
_mesa_ProgramLocalParameter4fvARB(GLenum target, GLuint index,
const GLfloat *params);
extern void
extern void GLAPIENTRY
_mesa_GetProgramEnvParameterdvARB(GLenum target, GLuint index,
GLdouble *params);
extern void
extern void GLAPIENTRY
_mesa_GetProgramEnvParameterfvARB(GLenum target, GLuint index,
GLfloat *params);
extern void
extern void GLAPIENTRY
_mesa_GetProgramLocalParameterdvARB(GLenum target, GLuint index,
GLdouble *params);
extern void
extern void GLAPIENTRY
_mesa_GetProgramLocalParameterfvARB(GLenum target, GLuint index,
GLfloat *params);
extern void
extern void GLAPIENTRY
_mesa_GetProgramivARB(GLenum target, GLenum pname, GLint *params);
extern void
extern void GLAPIENTRY
_mesa_GetProgramStringARB(GLenum target, GLenum pname, GLvoid *string);
......
......@@ -65,7 +65,7 @@ new_attrib_node( GLbitfield kind )
}
void
void GLAPIENTRY
_mesa_PushAttrib(GLbitfield mask)
{
struct gl_attrib_node *newnode;
......@@ -783,7 +783,7 @@ pop_texture_group(GLcontext *ctx, const struct gl_texture_attrib *texAttrib)
* We could at least check if the value to restore equals the current value
* and then skip the Mesa call.
*/
void
void GLAPIENTRY
_mesa_PopAttrib(void)
{
struct gl_attrib_node *attr, *next;
......@@ -1138,7 +1138,7 @@ _mesa_PopAttrib(void)
#define GL_CLIENT_UNPACK_BIT (1<<21)
void
void GLAPIENTRY
_mesa_PushClientAttrib(GLbitfield mask)
{
struct gl_attrib_node *newnode;
......@@ -1190,7 +1190,7 @@ _mesa_PushClientAttrib(GLbitfield mask)
void
void GLAPIENTRY
_mesa_PopClientAttrib(void)
{
struct gl_attrib_node *attr, *next;
......
......@@ -43,16 +43,16 @@
#if _HAVE_FULL_GL
extern void
extern void GLAPIENTRY
_mesa_PushAttrib( GLbitfield mask );
extern void
extern void GLAPIENTRY
_mesa_PopAttrib( void );
extern void
extern void GLAPIENTRY
_mesa_PushClientAttrib( GLbitfield mask );
extern void
extern void GLAPIENTRY
_mesa_PopClientAttrib( void );
extern void
......
......@@ -50,7 +50,7 @@
* flushes the vertices and notifies the driver via
* dd_function_table::BlendFunc callback.
*/
void
void GLAPIENTRY
_mesa_BlendFunc( GLenum sfactor, GLenum dfactor )
{
......@@ -144,7 +144,7 @@ _mesa_BlendFunc( GLenum sfactor, GLenum dfactor )
* On a change, flush the vertices and notify the driver via
* dd_function_table::BlendFuncSeparate.
*/
void
void GLAPIENTRY
_mesa_BlendFuncSeparateEXT( GLenum sfactorRGB, GLenum dfactorRGB,
GLenum sfactorA, GLenum dfactorA )
{
......@@ -285,7 +285,7 @@ _mesa_BlendFuncSeparateEXT( GLenum sfactorRGB, GLenum dfactorRGB,
/* This is really an extension function! */
void
void GLAPIENTRY
_mesa_BlendEquation( GLenum mode )
{
GET_CURRENT_CONTEXT(ctx);
......@@ -358,7 +358,7 @@ _mesa_BlendEquation( GLenum mode )
* change, flushes the vertices and notifies the driver via
* dd_function_table::BlendColor callback.
*/
void
void GLAPIENTRY
_mesa_BlendColor( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha )
{
GLfloat tmp[4];
......@@ -391,7 +391,7 @@ _mesa_BlendColor( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha )
* On a change, flushes the vertices and notifies the driver via
* dd_function_table::AlphaFunc callback.
*/
void
void GLAPIENTRY
_mesa_AlphaFunc( GLenum func, GLclampf ref )
{
GET_CURRENT_CONTEXT(ctx);
......@@ -436,7 +436,7 @@ gl_colorbuffer_attrib::LogicOp.
* On a change, flushes the vertices and notifies the driver via the
* dd_function_table::LogicOpcode callback.
*/
void
void GLAPIENTRY
_mesa_LogicOp( GLenum opcode )
{
GET_CURRENT_CONTEXT(ctx);
......@@ -476,7 +476,7 @@ _mesa_LogicOp( GLenum opcode )
}
#if _HAVE_FULL_GL
void
void GLAPIENTRY
_mesa_IndexMask( GLuint mask )
{
GET_CURRENT_CONTEXT(ctx);
......@@ -508,7 +508,7 @@ _mesa_IndexMask( GLuint mask )
* change, flushes the vertices and notifies the driver via the
* dd_function_table::ColorMask callback.
*/
void
void GLAPIENTRY
_mesa_ColorMask( GLboolean red, GLboolean green,
GLboolean blue, GLboolean alpha )
{
......
......@@ -36,39 +36,39 @@
#include "mtypes.h"
extern void
extern void GLAPIENTRY
_mesa_BlendFunc( GLenum sfactor, GLenum dfactor );
extern void
extern void GLAPIENTRY
_mesa_BlendFuncSeparateEXT( GLenum sfactorRGB, GLenum dfactorRGB,
GLenum sfactorA, GLenum dfactorA );
extern void
extern void GLAPIENTRY
_mesa_BlendEquation( GLenum mode );
extern void
extern void GLAPIENTRY
_mesa_BlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
extern void
extern void GLAPIENTRY
_mesa_AlphaFunc( GLenum func, GLclampf ref );
extern void
extern void GLAPIENTRY
_mesa_LogicOp( GLenum opcode );
extern void
extern void GLAPIENTRY
_mesa_IndexMask( GLuint mask );
extern void
extern void GLAPIENTRY
_mesa_ColorMask( GLboolean red, GLboolean green,
GLboolean blue, GLboolean alpha );
extern void
extern void
_mesa_init_color( GLcontext * ctx );
#endif
......@@ -367,7 +367,7 @@ _mesa_init_buffer_objects( GLcontext *ctx )
/* API Functions */
/**********************************************************************/
void
void GLAPIENTRY
_mesa_BindBufferARB(GLenum target, GLuint buffer)
{
GET_CURRENT_CONTEXT(ctx);
......@@ -436,7 +436,7 @@ _mesa_BindBufferARB(GLenum target, GLuint buffer)
* \param n Number of buffer objects to delete.
* \param buffer Array of \c n buffer object IDs.
*/
void
void GLAPIENTRY
_mesa_DeleteBuffersARB(GLsizei n, const GLuint *ids)
{
GET_CURRENT_CONTEXT(ctx);
......@@ -511,7 +511,7 @@ _mesa_DeleteBuffersARB(GLsizei n, const GLuint *ids)
* \param n Number of IDs to generate.
* \param buffer Array of \c n locations to store the IDs.
*/
void
void GLAPIENTRY
_mesa_GenBuffersARB(GLsizei n, GLuint *buffer)
{
GET_CURRENT_CONTEXT(ctx);
......@@ -560,7 +560,7 @@ _mesa_GenBuffersARB(GLsizei n, GLuint *buffer)
* \return \c GL_TRUE if \c id is the name of a buffer object,
* \c GL_FALSE otherwise.
*/
GLboolean
GLboolean GLAPIENTRY
_mesa_IsBufferARB(GLuint id)
{
struct gl_buffer_object * bufObj;
......@@ -578,7 +578,7 @@ _mesa_IsBufferARB(GLuint id)
}
void
void GLAPIENTRY
_mesa_BufferDataARB(GLenum target, GLsizeiptrARB size,
const GLvoid * data, GLenum usage)
{
......@@ -626,7 +626,7 @@ _mesa_BufferDataARB(GLenum target, GLsizeiptrARB size,
}
void
void GLAPIENTRY
_mesa_BufferSubDataARB(GLenum target, GLintptrARB offset,
GLsizeiptrARB size, const GLvoid * data)
{
......@@ -651,7 +651,7 @@ _mesa_BufferSubDataARB(GLenum target, GLintptrARB offset,
}
void
void GLAPIENTRY
_mesa_GetBufferSubDataARB(GLenum target, GLintptrARB offset,
GLsizeiptrARB size, void * data)
{
......@@ -676,7 +676,7 @@ _mesa_GetBufferSubDataARB(GLenum target, GLintptrARB offset,
}
void *
void * GLAPIENTRY
_mesa_MapBufferARB(GLenum target, GLenum access)
{
GET_CURRENT_CONTEXT(ctx);
......@@ -717,7 +717,7 @@ _mesa_MapBufferARB(GLenum target, GLenum access)
}
GLboolean
GLboolean GLAPIENTRY
_mesa_UnmapBufferARB(GLenum target)
{
GET_CURRENT_CONTEXT(ctx);
......@@ -747,7 +747,7 @@ _mesa_UnmapBufferARB(GLenum target)
}
void
void GLAPIENTRY
_mesa_GetBufferParameterivARB(GLenum target, GLenum pname, GLint *params)
{
GET_CURRENT_CONTEXT(ctx);
......@@ -780,7 +780,7 @@ _mesa_GetBufferParameterivARB(GLenum target, GLenum pname, GLint *params)
}
void
void GLAPIENTRY
_mesa_GetBufferPointervARB(GLenum target, GLenum pname, GLvoid **params)
{
GET_CURRENT_CONTEXT(ctx);
......
......@@ -84,37 +84,37 @@ _mesa_buffer_map( GLcontext *ctx, GLenum target, GLenum access,
* API functions
*/
extern void
extern void GLAPIENTRY
_mesa_BindBufferARB(GLenum target, GLuint buffer);
extern void
extern void GLAPIENTRY
_mesa_DeleteBuffersARB(GLsizei n, const GLuint * buffer);
extern void
extern void GLAPIENTRY
_mesa_GenBuffersARB(GLsizei n, GLuint * buffer);
extern GLboolean
extern GLboolean GLAPIENTRY
_mesa_IsBufferARB(GLuint buffer);
extern void
extern void GLAPIENTRY
_mesa_BufferDataARB(GLenum target, GLsizeiptrARB size, const GLvoid * data, GLenum usage);
extern void
extern void GLAPIENTRY
_mesa_BufferSubDataARB(GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid * data);
extern void
extern void GLAPIENTRY
_mesa_GetBufferSubDataARB(GLenum target, GLintptrARB offset, GLsizeiptrARB size, void * data);
extern void *
extern void * GLAPIENTRY
_mesa_MapBufferARB(GLenum target, GLenum access);
extern GLboolean
extern GLboolean GLAPIENTRY
_mesa_UnmapBufferARB(GLenum target);
extern void
extern void GLAPIENTRY
_mesa_GetBufferParameterivARB(GLenum target, GLenum pname, GLint *params);
extern void
extern void GLAPIENTRY
_mesa_GetBufferPointervARB(GLenum target, GLenum pname, GLvoid **params);
#endif
......@@ -41,7 +41,7 @@
#if _HAVE_FULL_GL
void
void GLAPIENTRY
_mesa_ClearIndex( GLfloat c )
{
GET_CURRENT_CONTEXT(ctx);
......@@ -75,7 +75,7 @@ _mesa_ClearIndex( GLfloat c )
* change, flushes the vertices and notifies the driver via the
* dd_function_table::ClearColor callback.
*/
void
void GLAPIENTRY
_mesa_ClearColor( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha )
{
GLfloat tmp[4];
......@@ -110,7 +110,7 @@ _mesa_ClearColor( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha )
* etc. If the rasterization mode is set to GL_RENDER then requests the driver
* to clear the buffers, via the dd_function_table::Clear callback.
*/
void
void GLAPIENTRY
_mesa_Clear( GLbitfield mask )
{
GET_CURRENT_CONTEXT(ctx);
......@@ -176,7 +176,7 @@ _mesa_Clear( GLbitfield mask )
* __GLcontextRec::NewState and notifies the driver via the
* dd_function_table::DrawBuffer callback.
*/
void
void GLAPIENTRY
_mesa_DrawBuffer( GLenum mode )
{
GET_CURRENT_CONTEXT(ctx);
......@@ -327,7 +327,7 @@ _mesa_DrawBuffer( GLenum mode )
* new pixel state in __GLcontextRec::NewState and notifies the driver via
* dd_function_table::ReadBuffer.
*/
void
void GLAPIENTRY
_mesa_ReadBuffer( GLenum mode )
{
GET_CURRENT_CONTEXT(ctx);
......@@ -436,7 +436,7 @@ _mesa_ReadBuffer( GLenum mode )
* \note This function may be called from within Mesa or called by the
* user directly (see the GL_MESA_resize_buffers extension).
*/
void
void GLAPIENTRY
_mesa_ResizeBuffersMESA( void )
{
GLcontext *ctx = _mesa_get_current_context();
......@@ -488,7 +488,7 @@ _mesa_ResizeBuffersMESA( void )
/*
* XXX move somewhere else someday?
*/
void
void GLAPIENTRY
_mesa_SampleCoverageARB(GLclampf value, GLboolean invert)
{
GLcontext *ctx = _mesa_get_current_context();
......@@ -520,7 +520,7 @@ _mesa_SampleCoverageARB(GLclampf value, GLboolean invert)
* change flushes the vertices and notifies the driver via
* the dd_function_table::Scissor callback.
*/
void
void GLAPIENTRY
_mesa_Scissor( GLint x, GLint y, GLsizei width, GLsizei height )
{