Index: trunk/src/gl/gl_context.cc
===================================================================
--- trunk/src/gl/gl_context.cc	(revision 492)
+++ trunk/src/gl/gl_context.cc	(revision 493)
@@ -317,6 +317,36 @@
 		glUseProgram( info->glid );
 		gdevice->update_uniforms( info );
-	}
-}
+		if ( !info->validated )
+		{
+			validate_program( p );
+		}
+	}
+}
+
+bool nv::gl_context::validate_program( program p )
+{
+	gl_device* gdevice = static_cast<gl_device*>( m_device );
+	gl_program_info* info = gdevice->m_programs.get( p );
+	if ( info )
+	{
+		info->validated = true;
+		const uint32 buffer_size = 1024;
+		char buffer[buffer_size] = { 0 };
+		int length;
+		int status;
+		glValidateProgram( info->glid );
+		glGetProgramiv( info->glid, GL_VALIDATE_STATUS, &status );
+
+		if ( status == GL_FALSE )
+		{
+			glGetProgramInfoLog( info->glid, buffer_size, &length, buffer );
+			NV_LOG_ERROR( "Program #", info->glid, " validation error : ", buffer );
+			return false;
+		}
+		return true;
+	}
+	return false;
+}
+
 
 // void nv::gl_context::bind( buffer b )
Index: trunk/src/gl/gl_device.cc
===================================================================
--- trunk/src/gl/gl_device.cc	(revision 492)
+++ trunk/src/gl/gl_device.cc	(revision 493)
@@ -34,4 +34,5 @@
 
 	info->glid = glCreateProgram();
+	info->validated = false;
 	compile( info, vs_source, fs_source );
 	prepare_program( result );
@@ -452,13 +453,4 @@
 	}
 
-	glValidateProgram( p->glid );
-	glGetProgramiv( p->glid, GL_VALIDATE_STATUS, &status );
-
-	if ( status == GL_FALSE )
-	{
-		glGetProgramInfoLog( p->glid, buffer_size, &length, buffer );
-		NV_LOG_ERROR( "Program #", p->glid, " validation error : ", buffer );
-		//return false;
-	}
 	load_attributes( p );
 	load_uniforms( p );
