You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
add function to get "Image", it will be a texture representation in the ram, in practice it will be act like "download image from gpu"
add DxSetImagePixels() with same syntax but with image at 1-st argument, it will effectivly do simple memset which is way way faster than what dxSetTexturePixel does
add function to upload image back to texture
Image will be basicly an array of byte in memory
localtexture=dxCreateTexture(128, 128)
localimage=dxGetTextureImage(texture)
dxSetTexturePixels(image, ...) -- simple memset under the hooddxSetTextureImage(texture, image)
simillar api is used in most of graphics engines, "image" sitting in ram, "texture" on gpu
if you want to set single, few pixels it can be still faster to use "setTexturePixels", but if you want to change 1000 of them than it will make significant difference.
Is your feature request related to a problem? Please describe.
dxSetTexturePixels is slow
Describe the solution you'd like
refactor it in following way:
Image will be basicly an array of byte in memory
simillar api is used in most of graphics engines, "image" sitting in ram, "texture" on gpu
if you want to set single, few pixels it can be still faster to use "setTexturePixels", but if you want to change 1000 of them than it will make significant difference.
Describe alternatives you've considered
/
Additional context
https://ogrecave.github.io/ogre-next/api/2.2/class_ogre_1_1_image2.html#details
Security Policy
The text was updated successfully, but these errors were encountered: