mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-20 04:30:22 +01:00
check for invalid mode in glBegin(), bug 7142
This commit is contained in:
parent
a0daa1220f
commit
ee7e58e111
1 changed files with 5 additions and 0 deletions
|
|
@ -740,6 +740,11 @@ static void GLAPIENTRY _tnl_Begin( GLenum mode )
|
|||
{
|
||||
GET_CURRENT_CONTEXT( ctx );
|
||||
|
||||
if (mode > GL_POLYGON) {
|
||||
_mesa_error(ctx, GL_INVALID_ENUM, "glBegin(mode)");
|
||||
return;
|
||||
}
|
||||
|
||||
if (ctx->Driver.CurrentExecPrimitive == PRIM_OUTSIDE_BEGIN_END) {
|
||||
/* we're not inside a glBegin/End pair */
|
||||
TNLcontext *tnl = TNL_CONTEXT(ctx);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue