Subversion Repositories gelsvn

Rev

Rev 369 | Rev 449 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 369 Rev 373
Line 1714... Line 1714...
1714
	/*  bind an OpenGL texture ID	*/
1714
	/*  bind an OpenGL texture ID	*/
1715
	glBindTexture( opengl_texture_type, tex_ID );
1715
	glBindTexture( opengl_texture_type, tex_ID );
1716
	/*	do this for each face of the cubemap!	*/
1716
	/*	do this for each face of the cubemap!	*/
1717
	for( cf_target = ogl_target_start; cf_target <= ogl_target_end; ++cf_target )
1717
	for( cf_target = ogl_target_start; cf_target <= ogl_target_end; ++cf_target )
1718
	{
1718
	{
1719
		if( buffer_index + DDS_full_size <= buffer_length )
1719
		if( buffer_index + DDS_full_size <= (unsigned int)buffer_length )
1720
		{
1720
		{
1721
			unsigned int byte_offset = DDS_main_size;
1721
			unsigned int byte_offset = DDS_main_size;
1722
			memcpy( (void*)DDS_data, (const void*)(&buffer[buffer_index]), DDS_full_size );
1722
			memcpy( (void*)DDS_data, (const void*)(&buffer[buffer_index]), DDS_full_size );
1723
			buffer_index += DDS_full_size;
1723
			buffer_index += DDS_full_size;
1724
			/*	upload the main chunk	*/
1724
			/*	upload the main chunk	*/
1725
			if( uncompressed )
1725
			if( uncompressed )
1726
			{
1726
			{
1727
				/*	and remember, DXT uncompressed uses BGR(A),
1727
				/*	and remember, DXT uncompressed uses BGR(A),
1728
					so swap to RGB(A) for ALL MIPmap levels	*/
1728
					so swap to RGB(A) for ALL MIPmap levels	*/
1729
				for( i = 0; i < DDS_full_size; i += block_size )
1729
				for( i = 0; i < (int)DDS_full_size; i += block_size )
1730
				{
1730
				{
1731
					unsigned char temp = DDS_data[i];
1731
					unsigned char temp = DDS_data[i];
1732
					DDS_data[i] = DDS_data[i+2];
1732
					DDS_data[i] = DDS_data[i+2];
1733
					DDS_data[i+2] = temp;
1733
					DDS_data[i+2] = temp;
1734
				}
1734
				}