Skip to content
This repository has been archived by the owner on Apr 17, 2022. It is now read-only.

[patch] Don't use TEXTURE_RECTANGLE for FMVs #375

Closed
wzdev-ci opened this issue Apr 11, 2009 · 7 comments
Closed

[patch] Don't use TEXTURE_RECTANGLE for FMVs #375

wzdev-ci opened this issue Apr 11, 2009 · 7 comments

Comments

@wzdev-ci
Copy link
Contributor

keyword_fmv resolution_fixed type_patch (an actual patch, not a request for one) | by Zarel


Since cybersphinx hasn't ticketed this, I shall:


Here's a patch to make Warzone use regular textures to display the videos. This is the "hacky" version, the one that only needs a small and localized amount of changed code.

It uses one texture with a fixed size for videos (the old code allocated a new texture once per frame). The texture size is set at 512x512, which is enough for the current 320x240 videos. I think at least for 2.2 that is acceptable, since we don't have larger videos anyway. There are no error checks yet, so any video larger than 512x512 will behave badly.

The proper way would be to use a struct for the video info that is set up for every video played, where the texture is allocated according to video size etc., but that might make things unstable, so not suitable for 2.2 imo.

I've changed the multiplier to the texcoords from 255 to 256, since the matrix is set up as 1/256. This should be changed any way, I guess.

In addition to this patch the message about the radar not working should probably be removed, and since the YUV converter seems YUV420 specific, a check for other formats.


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 those should be committed separately).


Issue migrated from trac:375 at 2022-04-15 18:08:20 -0700

@wzdev-ci
Copy link
Contributor Author

Zarel uploaded file wz-no-rectangular-textures-2.patch (6.8 KiB)

Don't use TEXTURE_RECTANGLE for rendering FMVs

@wzdev-ci
Copy link
Contributor Author

Buginator changed status from new to closed

@wzdev-ci
Copy link
Contributor Author

Buginator set resolution to fixed

@wzdev-ci
Copy link
Contributor Author

Buginator commented


and since it is fixed in [7071], closing.

@wzdev-ci
Copy link
Contributor Author

Buginator commented


I mean [7021]

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented May 8, 2010

Buginator removed milestone (was 2.2)

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented May 8, 2010

Buginator commented


Milestone 2.2 deleted

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant