glu32: Return GLU_INVALID_ENUM for illegal pixel types.
This commit is contained in:
parent
3b61019b8c
commit
ee1e15ac9d
2 changed files with 2 additions and 4 deletions
|
@ -3448,10 +3448,10 @@ GLint WINAPI gluScaleImage( GLenum format, GLint widthin, GLint heightin, GLenum
|
|||
return GLU_INVALID_ENUM;
|
||||
}
|
||||
if (!isLegalFormatForPackedPixelType(format, typein)) {
|
||||
return GLU_INVALID_OPERATION;
|
||||
return GLU_INVALID_ENUM;
|
||||
}
|
||||
if (!isLegalFormatForPackedPixelType(format, typeout)) {
|
||||
return GLU_INVALID_OPERATION;
|
||||
return GLU_INVALID_ENUM;
|
||||
}
|
||||
if (!wglGetCurrentContext()) {
|
||||
return GL_OUT_OF_MEMORY; /* windows returns this if no gl context (not glu error) */
|
||||
|
|
|
@ -72,14 +72,12 @@ static void test_gluScaleImage(HDC hdc, HGLRC hglrc)
|
|||
DIMOUT, DIMOUT, ~0, bufout);
|
||||
ok(err == GLU_INVALID_ENUM, "got %x\n", err);
|
||||
|
||||
todo_wine {
|
||||
err = gluScaleImage(GL_RGBA, DIMIN, DIMIN, GL_UNSIGNED_BYTE_3_3_2, bufin,
|
||||
DIMOUT, DIMOUT, GL_UNSIGNED_BYTE, bufout);
|
||||
ok(err == GLU_INVALID_ENUM, "got %x\n", err);
|
||||
err = gluScaleImage(GL_RGBA, DIMIN, DIMIN, GL_UNSIGNED_BYTE, bufin,
|
||||
DIMOUT, DIMOUT, GL_UNSIGNED_BYTE_3_3_2, bufout);
|
||||
ok(err == GLU_INVALID_ENUM, "got %x\n", err);
|
||||
}
|
||||
|
||||
/* valid arguments */
|
||||
memset(bufout, 0, SIZEOUT);
|
||||
|
|
Loading…
Add table
Reference in a new issue