Re: [Warzone-dev] [PATCH] Don't use the texture rectangle extension for video display

2009-04-13 Thread Freddie Witherden
Hi all, On 12 Apr 2009, at 22:24, Dennis Schridde wrote: tmp = malloc(texture_width * texture_height * 4); glGenTextures(1, video_texture); glBindTexture(GL_TEXTURE_2D, video_texture); glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA,

Re: [Warzone-dev] [PATCH] Don't use the texture rectangle extension for video display

2009-04-13 Thread Christian Ohm
On Sunday, 12 April 2009 at 22:47, Per Inge Mathisen wrote: I don't understand this part of the patch (new since first version): tmp = malloc(texture_width * texture_height * 4); glGenTextures(1, video_texture);

Re: [Warzone-dev] [PATCH] Don't use the texture rectangle extension for video display

2009-04-13 Thread Christian Ohm
On Sunday, 12 April 2009 at 23:24, Dennis Schridde wrote: Why not use a PBO instead? Because I just adapted the existing code to use regular textures, since my main target for this patch is 2.2. I don't want to rewrite large part of the code, and I don't want to introduce newer GL functionality

Re: [Warzone-dev] [PATCH] Don't use the texture rectangle extension for video display

2009-04-13 Thread Per Inge Mathisen
On Mon, Apr 13, 2009 at 12:49 PM, Christian Ohm chr@gmx.net wrote: On Sunday, 12 April 2009 at 22:47, Per Inge Mathisen wrote: I don't understand this part of the patch (new since first version):                       tmp = malloc(texture_width * texture_height * 4);                      

Re: [Warzone-dev] [PATCH] Don't use the texture rectangle extension for video display

2009-04-13 Thread Christian Ohm
On Monday, 13 April 2009 at 14:59, Per Inge Mathisen wrote: Ah. But there is no need to upload an uninitialized buffer to do this. Just use glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, texture_width, texture_height, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL); Nice. I thought about that as well, but missed

Re: [Warzone-dev] [PATCH] Don't use the texture rectangle extension for video display

2009-04-11 Thread Christian Ohm
Argh. Forgot the patch, and replied to the wrong mail... Updated patch. I've moved texture creation from video_write() into seq_Play(), where it makes more sense, and added a check for the video size. I've also removed the radar warning message, and added a check for the YUV420 format (though