Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RwRasterRenderFast: Expand supported types #59

Open
SK83RJOSH opened this issue Feb 19, 2021 · 1 comment
Open

RwRasterRenderFast: Expand supported types #59

SK83RJOSH opened this issue Feb 19, 2021 · 1 comment

Comments

@SK83RJOSH
Copy link
Contributor

Found this while working with render targets (rwRASTERTYPECAMERATEXTURE); it currently only supports copying from rwRASTERTYPECAMERA.

It appears that it should support all available raster types based on:
https://github.com/GTAmodding/rw37/blob/master/src/driver/d3d8/d3d8raster.c#L1469
https://github.com/GTAmodding/rw37/blob/master/src/driver/d3d9/d3d9raster.c#L1591

The only problem I see with this, is that we'll have to use the slower glCopyImageSubData instead of glCopyTexSubImage2D. Though we can probably limit that just to the types that require it, and avoid any functional changes.

For reference:

rasterRenderFast(Raster *raster, int32 x, int32 y)

@SK83RJOSH
Copy link
Contributor Author

From the RenderWare Userguide:

" RwRasterRenderFast(), performs a faster blit operation, but takes no
account of the alpha channel. This makes it considerably faster on most
platforms. "

This also causes me a bit of concern, as I know direct way to do this kind of operation in GL without taking into account alpha. So feedback welcome on that bit. :)

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

No branches or pull requests

1 participant