prog->RefCount = 1;
}
- fprintf(stderr, "%s %x %x\n", __FUNCTION__, target, prog);
return prog;
}
struct program *
_mesa_new_program(GLcontext *ctx, GLenum target, GLuint id)
{
- fprintf(stderr, "%s\n", __FUNCTION__);
switch (target) {
case GL_VERTEX_PROGRAM_ARB: /* == GL_VERTEX_PROGRAM_NV */
return _mesa_init_vertex_program( ctx, CALLOC_STRUCT(vertex_program),
{
GLuint i;
+ if (!paramList)
+ return NULL;
+
if (nameLen == -1) {
/* name is null-terminated */
for (i = 0; i < paramList->NumParameters; i++) {
{
GLint i;
+ if (!paramList)
+ return -1;
+
if (nameLen == -1) {
/* name is null-terminated */
for (i = 0; i < (GLint) paramList->NumParameters; i++) {
struct program_parameter_list *paramList)
{
GLuint i;
+
+ if (!paramList)
+ return;
+
for (i = 0; i < paramList->NumParameters; i++) {
if (paramList->Parameters[i].Type == STATE) {
_mesa_fetch_state(ctx, paramList->Parameters[i].StateIndexes,