+
#include <stdbool.h>
#include "api_loopback.h"
unsigned int i;
GLdouble converted_equation[4];
- for (i = 0; i < Elements(converted_equation); i++) {
+ for (i = 0; i < ARRAY_SIZE(converted_equation); i++) {
converted_equation[i] = (GLdouble) (equation[i]);
}
unsigned int i;
GLdouble converted_equation[4];
- for (i = 0; i < Elements(converted_equation); i++) {
+ for (i = 0; i < ARRAY_SIZE(converted_equation); i++) {
converted_equation[i] = (GLdouble) (equation[i] / 65536.0);
}
unsigned int i;
GLfloat converted_coords[5];
- for (i = 0; i < Elements(converted_coords); i++) {
+ for (i = 0; i < ARRAY_SIZE(converted_coords); i++) {
converted_coords[i] = (GLfloat) (coords[i] / 65536.0f);
}
GLdouble converted_equation[4];
_mesa_GetClipPlane(plane, converted_equation);
- for (i = 0; i < Elements(converted_equation); i++) {
+ for (i = 0; i < ARRAY_SIZE(converted_equation); i++) {
equation[i] = (GLfloat) (converted_equation[i]);
}
}
GLdouble converted_equation[4];
_mesa_GetClipPlane(plane, converted_equation);
- for (i = 0; i < Elements(converted_equation); i++) {
+ for (i = 0; i < ARRAY_SIZE(converted_equation); i++) {
equation[i] = (GLfixed) (converted_equation[i] * 65536);
}
}
}
break;
case GL_TEXTURE_ENV:
- if (pname != GL_TEXTURE_ENV_COLOR && pname != GL_RGB_SCALE && pname != GL_ALPHA_SCALE && pname != GL_TEXTURE_ENV_MODE && pname != GL_COMBINE_RGB && pname != GL_COMBINE_ALPHA && pname != GL_SRC0_RGB && pname != GL_SRC1_RGB && pname != GL_SRC2_RGB && pname != GL_SRC0_ALPHA && pname != GL_SRC1_ALPHA && pname != GL_SRC2_ALPHA && pname != GL_OPERAND0_RGB && pname != GL_OPERAND1_RGB && pname != GL_OPERAND2_RGB && pname != GL_OPERAND0_ALPHA && pname != GL_OPERAND1_ALPHA && pname != GL_OPERAND2_ALPHA) {
+ if (pname != GL_TEXTURE_ENV_COLOR &&
+ pname != GL_RGB_SCALE &&
+ pname != GL_ALPHA_SCALE &&
+ pname != GL_TEXTURE_ENV_MODE &&
+ pname != GL_COMBINE_RGB &&
+ pname != GL_COMBINE_ALPHA &&
+ pname != GL_SRC0_RGB &&
+ pname != GL_SRC1_RGB &&
+ pname != GL_SRC2_RGB &&
+ pname != GL_SRC0_ALPHA &&
+ pname != GL_SRC1_ALPHA &&
+ pname != GL_SRC2_ALPHA &&
+ pname != GL_OPERAND0_RGB &&
+ pname != GL_OPERAND1_RGB &&
+ pname != GL_OPERAND2_RGB &&
+ pname != GL_OPERAND0_ALPHA &&
+ pname != GL_OPERAND1_ALPHA &&
+ pname != GL_OPERAND2_ALPHA) {
_mesa_error(_mesa_get_current_context(), GL_INVALID_ENUM,
"glGetTexEnvxv(target=0x%x)", target);
return;
unsigned int i;
GLfloat converted_m[16];
- for (i = 0; i < Elements(converted_m); i++) {
+ for (i = 0; i < ARRAY_SIZE(converted_m); i++) {
converted_m[i] = (GLfloat) (m[i] / 65536.0f);
}
unsigned int i;
GLfloat converted_m[16];
- for (i = 0; i < Elements(converted_m); i++) {
+ for (i = 0; i < ARRAY_SIZE(converted_m); i++) {
converted_m[i] = (GLfloat) (m[i] / 65536.0f);
}
unsigned int i;
GLfloat converted_params[4];
- for (i = 0; i < Elements(converted_params); i++) {
+ for (i = 0; i < ARRAY_SIZE(converted_params); i++) {
converted_params[i] = (GLfloat) (params[i] / 65536.0f);
}