Metick / DMALibrary

Simple but extensive library for DMA users, made for gamehacking
MIT License
343 stars 74 forks source link

scatter read is slower ? #6

Closed dolodi closed 9 months ago

dolodi commented 9 months ago

In having trouble optimizing the read speed with scatter read. For example if i use scatter read for view matrix, it updates the viewpoint after 1second or so. Instead with normal reads i get it all correct and it updates correctly but obviously i get lower fps.

Could it be that i have to use -norefresh or change refresh settings ?

Or am i using scatter read wrong? Heres the code where i get the problem:

double a; double b; double c; mem.AddScatterReadRequest(ScatterHandle, cameraRotationPtr, &a, sizeof(double)); mem.AddScatterReadRequest(ScatterHandle, cameraRotationPtr + Offsets::BOffset, &b, sizeof(double)); mem.AddScatterReadRequest(ScatterHandle, cameraRotationPtr + Offsets::COffset, &c, sizeof(double)); mem.ExecuteReadScatter(ScatterHandle, ProcId);

Metick commented 9 months ago

Personally I don't see anything that you're doing wrong on the code you've provided above. Maybe it's somewhere else? also make sure ProcId is correct.