Lines Matching refs:param
182 void STATE_APIENTRY crStateLightModelfv (GLenum pname, const GLfloat *param)
200 l->lightModelLocalViewer = (GLboolean) (*param==0.0f?GL_FALSE:GL_TRUE);
203 l->lightModelTwoSide = (GLboolean) (*param==0.0f?GL_FALSE:GL_TRUE);
206 l->lightModelAmbient.r = param[0];
207 l->lightModelAmbient.g = param[1];
208 l->lightModelAmbient.b = param[2];
209 l->lightModelAmbient.a = param[3];
213 if (param[0] == GL_SEPARATE_SPECULAR_COLOR || param[0] == GL_SINGLE_COLOR)
215 l->lightModelColorControlEXT = (GLenum) param[0];
219 crStateError( __LINE__, __FILE__, GL_INVALID_ENUM, "LightModel: Invalid param for LIGHT_MODEL_COLOR_CONTROL: 0x%x", param[0] );
228 if( param[0] == GL_SEPARATE_SPECULAR_COLOR_EXT || param[0] == GL_SINGLE_COLOR_EXT )
230 l->lightModelColorControlEXT = (GLenum) param[0];
234 crStateError( __LINE__, __FILE__, GL_INVALID_ENUM, "LightModel: Invalid param for LIGHT_MODEL_COLOR_CONTROL: 0x%x", param[0] );
254 void STATE_APIENTRY crStateLightModeliv (GLenum pname, const GLint *param)
266 f_param = (GLfloat) (*param);
270 f_color.r = ((GLfloat)param[0])/CR_MAXINT;
271 f_color.g = ((GLfloat)param[1])/CR_MAXINT;
272 f_color.b = ((GLfloat)param[2])/CR_MAXINT;
273 f_color.a = ((GLfloat)param[3])/CR_MAXINT;
278 f_param = (GLfloat) (*param);
285 f_param = (GLfloat) (*param);
300 void STATE_APIENTRY crStateLightModelf (GLenum pname, GLfloat param)
302 crStateLightModelfv( pname, ¶m );
305 void STATE_APIENTRY crStateLightModeli (GLenum pname, GLint param)
307 GLfloat f_param = (GLfloat) param;
311 void STATE_APIENTRY crStateLightfv (GLenum light, GLenum pname, const GLfloat *param)
346 lt->ambient.r = param[0];
347 lt->ambient.g = param[1];
348 lt->ambient.b = param[2];
349 lt->ambient.a = param[3];
353 lt->diffuse.r = param[0];
354 lt->diffuse.g = param[1];
355 lt->diffuse.b = param[2];
356 lt->diffuse.a = param[3];
360 lt->specular.r = param[0];
361 lt->specular.g = param[1];
362 lt->specular.b = param[2];
363 lt->specular.a = param[3];
367 x = param[0];
368 y = param[1];
369 z = param[2];
370 w = param[3];
385 lt->spotDirection.x = param[0];
386 lt->spotDirection.y = param[1];
387 lt->spotDirection.z = param[2];
405 if (*param < 0.0f || *param > 180.0f)
407 crStateError(__LINE__, __FILE__, GL_INVALID_VALUE, "glLight: spot exponent out of range: %f", *param);
410 lt->spotExponent = *param;
414 if ((*param < 0.0f || *param > 90.0f) && *param != 180.0f)
416 crStateError(__LINE__, __FILE__, GL_INVALID_VALUE, "glLight: spot cutoff out of range: %f", *param);
419 lt->spotCutoff = *param;
423 if (*param < 0.0f)
425 crStateError(__LINE__, __FILE__, GL_INVALID_VALUE, "glLight: constant Attenuation negative: %f", *param);
428 lt->constantAttenuation = *param;
432 if (*param < 0.0f)
434 crStateError(__LINE__, __FILE__, GL_INVALID_VALUE, "glLight: linear Attenuation negative: %f", *param);
437 lt->linearAttenuation = *param;
441 if (*param < 0.0f)
443 crStateError(__LINE__, __FILE__, GL_INVALID_VALUE, "glLight: quadratic Attenuation negative: %f", *param);
446 lt->quadraticAttenuation = *param;
457 void STATE_APIENTRY crStateLightiv (GLenum light, GLenum pname, const GLint *param)
468 f_color.r = ((GLfloat)param[0])/CR_MAXINT;
469 f_color.g = ((GLfloat)param[1])/CR_MAXINT;
470 f_color.b = ((GLfloat)param[2])/CR_MAXINT;
471 f_color.a = ((GLfloat)param[3])/CR_MAXINT;
476 f_vector.x = (GLfloat) param[0];
477 f_vector.y = (GLfloat) param[1];
478 f_vector.z = (GLfloat) param[2];
479 f_vector.w = (GLfloat) param[3];
487 f_param = (GLfloat) (*param);
496 void STATE_APIENTRY crStateLightf (GLenum light, GLenum pname, GLfloat param)
498 crStateLightfv( light, pname, ¶m );
501 void STATE_APIENTRY crStateLighti (GLenum light, GLenum pname, GLint param)
503 GLfloat f_param = (GLfloat) param;
507 void STATE_APIENTRY crStateMaterialfv (GLenum face, GLenum pname, const GLfloat *param)
525 l->ambient[0].r = param[0];
526 l->ambient[0].g = param[1];
527 l->ambient[0].b = param[2];
528 l->ambient[0].a = param[3];
531 l->ambient[0].r = param[0];
532 l->ambient[0].g = param[1];
533 l->ambient[0].b = param[2];
534 l->ambient[0].a = param[3];
537 l->ambient[1].r = param[0];
538 l->ambient[1].g = param[1];
539 l->ambient[1].b = param[2];
540 l->ambient[1].a = param[3];
551 l->ambient[0].r = param[0];
552 l->ambient[0].g = param[1];
553 l->ambient[0].b = param[2];
554 l->ambient[0].a = param[3];
557 l->ambient[0].r = param[0];
558 l->ambient[0].g = param[1];
559 l->ambient[0].b = param[2];
560 l->ambient[0].a = param[3];
563 l->ambient[1].r = param[0];
564 l->ambient[1].g = param[1];
565 l->ambient[1].b = param[2];
566 l->ambient[1].a = param[3];
577 l->diffuse[0].r = param[0];
578 l->diffuse[0].g = param[1];
579 l->diffuse[0].b = param[2];
580 l->diffuse[0].a = param[3];
583 l->diffuse[0].r = param[0];
584 l->diffuse[0].g = param[1];
585 l->diffuse[0].b = param[2];
586 l->diffuse[0].a = param[3];
589 l->diffuse[1].r = param[0];
590 l->diffuse[1].g = param[1];
591 l->diffuse[1].b = param[2];
592 l->diffuse[1].a = param[3];
603 l->specular[0].r = param[0];
604 l->specular[0].g = param[1];
605 l->specular[0].b = param[2];
606 l->specular[0].a = param[3];
609 l->specular[0].r = param[0];
610 l->specular[0].g = param[1];
611 l->specular[0].b = param[2];
612 l->specular[0].a = param[3];
615 l->specular[1].r = param[0];
616 l->specular[1].g = param[1];
617 l->specular[1].b = param[2];
618 l->specular[1].a = param[3];
629 l->emission[0].r = param[0];
630 l->emission[0].g = param[1];
631 l->emission[0].b = param[2];
632 l->emission[0].a = param[3];
635 l->emission[0].r = param[0];
636 l->emission[0].g = param[1];
637 l->emission[0].b = param[2];
638 l->emission[0].a = param[3];
641 l->emission[1].r = param[0];
642 l->emission[1].g = param[1];
643 l->emission[1].b = param[2];
644 l->emission[1].a = param[3];
652 if (*param > 180.0f || *param < 0.0f)
654 crStateError(__LINE__, __FILE__, GL_INVALID_VALUE, "glMaterialfv: param out of range: %f", param);
661 l->shininess[0] = *param;
664 l->shininess[0] = *param;
667 l->shininess[1] = *param;
678 l->indexes[0][0] = (GLint) param[0];
679 l->indexes[0][1] = (GLint) param[1];
680 l->indexes[0][2] = (GLint) param[2];
683 l->indexes[0][0] = (GLint) param[0];
684 l->indexes[0][1] = (GLint) param[1];
685 l->indexes[0][2] = (GLint) param[2];
688 l->indexes[1][0] = (GLint) param[0];
689 l->indexes[1][1] = (GLint) param[1];
690 l->indexes[1][2] = (GLint) param[2];
705 void STATE_APIENTRY crStateMaterialiv (GLenum face, GLenum pname, const GLint *param)
717 f_color.r = ((GLfloat) param[0]) / ((GLfloat) CR_MAXINT);
718 f_color.g = ((GLfloat) param[1]) / ((GLfloat) CR_MAXINT);
719 f_color.b = ((GLfloat) param[2]) / ((GLfloat) CR_MAXINT);
720 f_color.a = ((GLfloat) param[3]) / ((GLfloat) CR_MAXINT);
724 f_param = (GLfloat) (*param);
728 f_param = (GLfloat) (*param);
737 void STATE_APIENTRY crStateMaterialf (GLenum face, GLenum pname, GLfloat param)
739 crStateMaterialfv( face, pname, ¶m );
742 void STATE_APIENTRY crStateMateriali (GLenum face, GLenum pname, GLint param)
744 GLfloat f_param = (GLfloat) param;
748 void STATE_APIENTRY crStateGetLightfv (GLenum light, GLenum pname, GLfloat *param)
775 param[0] = lt->ambient.r;
776 param[1] = lt->ambient.g;
777 param[2] = lt->ambient.b;
778 param[3] = lt->ambient.a;
781 param[0] = lt->diffuse.r;
782 param[1] = lt->diffuse.g;
783 param[2] = lt->diffuse.b;
784 param[3] = lt->diffuse.a;
787 param[0] = lt->specular.r;
788 param[1] = lt->specular.g;
789 param[2] = lt->specular.b;
790 param[3] = lt->specular.a;
793 param[0] = lt->position.x;
794 param[1] = lt->position.y;
795 param[2] = lt->position.z;
796 param[3] = lt->position.w;
799 param[0] = lt->spotDirection.x;
800 param[1] = lt->spotDirection.y;
801 param[2] = lt->spotDirection.z;
806 param[3] = lt->spotDirection.w;
810 *param = lt->spotExponent;
813 *param = lt->spotCutoff;
816 *param = lt->constantAttenuation;
819 *param = lt->linearAttenuation;
822 *param = lt->quadraticAttenuation;
831 void STATE_APIENTRY crStateGetLightiv (GLenum light, GLenum pname, GLint *param)
858 param[0] = (GLint) (lt->ambient.r * CR_MAXINT);
859 param[1] = (GLint) (lt->ambient.g * CR_MAXINT);
860 param[2] = (GLint) (lt->ambient.b * CR_MAXINT);
861 param[3] = (GLint) (lt->ambient.a * CR_MAXINT);
864 param[0] = (GLint) (lt->diffuse.r * CR_MAXINT);
865 param[1] = (GLint) (lt->diffuse.g * CR_MAXINT);
866 param[2] = (GLint) (lt->diffuse.b * CR_MAXINT);
867 param[3] = (GLint) (lt->diffuse.a * CR_MAXINT);
870 param[0] = (GLint) (lt->specular.r * CR_MAXINT);
871 param[1] = (GLint) (lt->specular.g * CR_MAXINT);
872 param[2] = (GLint) (lt->specular.b * CR_MAXINT);
873 param[3] = (GLint) (lt->specular.a * CR_MAXINT);
876 param[0] = (GLint) (lt->position.x);
877 param[1] = (GLint) (lt->position.y);
878 param[2] = (GLint) (lt->position.z);
879 param[3] = (GLint) (lt->position.w);
882 param[0] = (GLint) (lt->spotDirection.x);
883 param[1] = (GLint) (lt->spotDirection.y);
884 param[2] = (GLint) (lt->spotDirection.z);
889 param[3] = (GLint) (lt->spotDirection.w);
893 *param = (GLint) (lt->spotExponent);
896 *param = (GLint) (lt->spotCutoff);
899 *param = (GLint) (lt->constantAttenuation);
902 *param = (GLint) (lt->linearAttenuation);
905 *param = (GLint) (lt->quadraticAttenuation);
914 void STATE_APIENTRY crStateGetMaterialfv (GLenum face, GLenum pname, GLfloat *param)
932 param[0] = l->ambient[0].r;
933 param[1] = l->ambient[0].g;
934 param[2] = l->ambient[0].b;
935 param[3] = l->ambient[0].a;
938 param[0] = l->ambient[1].r;
939 param[1] = l->ambient[1].g;
940 param[2] = l->ambient[1].b;
941 param[3] = l->ambient[1].a;
953 param[0] = l->diffuse[0].r;
954 param[1] = l->diffuse[0].g;
955 param[2] = l->diffuse[0].b;
956 param[3] = l->diffuse[0].a;
959 param[0] = l->diffuse[1].r;
960 param[1] = l->diffuse[1].g;
961 param[2] = l->diffuse[1].b;
962 param[3] = l->diffuse[1].a;
974 param[0] = l->specular[0].r;
975 param[1] = l->specular[0].g;
976 param[2] = l->specular[0].b;
977 param[3] = l->specular[0].a;
980 param[0] = l->specular[1].r;
981 param[1] = l->specular[1].g;
982 param[2] = l->specular[1].b;
983 param[3] = l->specular[1].a;
995 param[0] = l->emission[0].r;
996 param[1] = l->emission[0].g;
997 param[2] = l->emission[0].b;
998 param[3] = l->emission[0].a;
1001 param[0] = l->emission[1].r;
1002 param[1] = l->emission[1].g;
1003 param[2] = l->emission[1].b;
1004 param[3] = l->emission[1].a;
1016 *param = l->shininess[0];
1019 *param = l->shininess[1];
1031 param[0] = (GLfloat) l->indexes[0][0];
1032 param[1] = (GLfloat) l->indexes[0][1];
1033 param[2] = (GLfloat) l->indexes[0][2];
1036 param[0] = (GLfloat) l->indexes[1][0];
1037 param[1] = (GLfloat) l->indexes[1][1];
1038 param[2] = (GLfloat) l->indexes[1][2];
1054 void STATE_APIENTRY crStateGetMaterialiv (GLenum face, GLenum pname, GLint *param)
1072 param[0] = (GLint) (l->ambient[0].r * CR_MAXINT);
1073 param[1] = (GLint) (l->ambient[0].g * CR_MAXINT);
1074 param[2] = (GLint) (l->ambient[0].b * CR_MAXINT);
1075 param[3] = (GLint) (l->ambient[0].a * CR_MAXINT);
1078 param[0] = (GLint) (l->ambient[1].r * CR_MAXINT);
1079 param[1] = (GLint) (l->ambient[1].g * CR_MAXINT);
1080 param[2] = (GLint) (l->ambient[1].b * CR_MAXINT);
1081 param[3] = (GLint) (l->ambient[1].a * CR_MAXINT);
1093 param[0] = (GLint) (l->diffuse[0].r * CR_MAXINT);
1094 param[1] = (GLint) (l->diffuse[0].g * CR_MAXINT);
1095 param[2] = (GLint) (l->diffuse[0].b * CR_MAXINT);
1096 param[3] = (GLint) (l->diffuse[0].a * CR_MAXINT);
1099 param[0] = (GLint) (l->diffuse[1].r * CR_MAXINT);
1100 param[1] = (GLint) (l->diffuse[1].g * CR_MAXINT);
1101 param[2] = (GLint) (l->diffuse[1].b * CR_MAXINT);
1102 param[3] = (GLint) (l->diffuse[1].a * CR_MAXINT);
1114 param[0] = (GLint) (l->specular[0].r * CR_MAXINT);
1115 param[1] = (GLint) (l->specular[0].g * CR_MAXINT);
1116 param[2] = (GLint) (l->specular[0].b * CR_MAXINT);
1117 param[3] = (GLint) (l->specular[0].a * CR_MAXINT);
1120 param[0] = (GLint) (l->specular[1].r * CR_MAXINT);
1121 param[1] = (GLint) (l->specular[1].g * CR_MAXINT);
1122 param[2] = (GLint) (l->specular[1].b * CR_MAXINT);
1123 param[3] = (GLint) (l->specular[1].a * CR_MAXINT);
1135 param[0] = (GLint) (l->emission[0].r * CR_MAXINT);
1136 param[1] = (GLint) (l->emission[0].g * CR_MAXINT);
1137 param[2] = (GLint) (l->emission[0].b * CR_MAXINT);
1138 param[3] = (GLint) (l->emission[0].a * CR_MAXINT);
1141 param[0] = (GLint) (l->emission[1].r * CR_MAXINT);
1142 param[1] = (GLint) (l->emission[1].g * CR_MAXINT);
1143 param[2] = (GLint) (l->emission[1].b * CR_MAXINT);
1144 param[3] = (GLint) (l->emission[1].a * CR_MAXINT);
1155 *param = (GLint) l->shininess[0];
1158 *param = (GLint) l->shininess[1];
1170 param[0] = (GLint) l->indexes[0][0];
1171 param[1] = (GLint) l->indexes[0][1];
1172 param[2] = (GLint) l->indexes[0][2];
1175 param[0] = (GLint) l->indexes[1][0];
1176 param[1] = (GLint) l->indexes[1][1];
1177 param[2] = (GLint) l->indexes[1][2];