PDA

View Full Version : Question Drawing flickers using EndScene



freax
07-01-2011, 06:13 PM
Hi guys, shortly back to update my hack to win some war's I've realized that EndScene is a much better drawing place than PaintTraverse.
Well, updating the code took a while, but now it works - with one big problem: the drawing flickers. If I draw a simple box for example, it jumps 2-5 times in a second through the screen to any (obviously random) place for one frame. So it looks like the drawing flickers.

Has anybody an idea how I can fix that?

Thanks!

how02
07-01-2011, 07:46 PM
Hi, I got no problem with render on EndScene, but I've given my hack to 2 friends and 1 of them got the same issue as you. I don't understand what is the problem, and he crash a LOT, but my other friend and me don't have this issue. If you get a solution, don't forget to post it here please :)

freax
07-01-2011, 07:52 PM
Interesting report. Thanks.

tzoz
07-01-2011, 08:19 PM
Just out of curiosity, what is so much better about using EndScene?

freax
07-02-2011, 03:56 AM
Drawing in the menu. Using images. Using vertex buffers.

Edit: Found the problem. Deactivatin multicore rendering fixes the flickering... Fuck off :/

darkcat
07-02-2011, 05:41 AM
Here's a fix.


There's another interesting concept about this. GetAbsOrigin is context sensitive (similar to pGlobals->curtime).
During CreateMove etc this value is exactly as you'd expect it.

However if you're doing things async (drawing in EndScene with multi-core rendering enabled in Source Engine games or doing it external) you might want to read the value directly from m_iv_vecOrigins. Otherwise your ESP starts skipping around :(

:D

0x6077
07-02-2011, 06:12 AM
Mh, what are m_iv_vecOrigins? Where can we find them?

how02
07-02-2011, 06:26 AM
Thanks darkcat for this quote, using CBaseEntity + 0x2CC seem to be ok :)

0x6077
07-02-2011, 06:30 AM
Yeah, CBaseEntity + 0x2CC seem to be okay but i think the vector is predicted because if the player walk by esp box is before the model.

freax
07-02-2011, 06:40 AM
Of course m_iv_vecOrigins is not predicted. Only solutions seems to be a rewrite of GetAbsOrigin. Fuck yeah. Thanks darkcat/Casual_Hacker

0x6077
07-02-2011, 06:44 AM
And why are my ESP-Boxes before the model if they walk?

3968
(click to enlarge)

Gumble
07-02-2011, 07:06 AM
And why are my ESP-Boxes before the model if they walk?

3968
(click to enlarge)

magnets.

freax
07-02-2011, 07:51 AM
m_iv_vecOrigins is not predicted

0x6077
07-02-2011, 08:21 AM
Oh, sorry. With prediction i got it working. Thanks :)

freax
07-02-2011, 08:23 AM
Erm, lol. How so fast?

walle
09-08-2011, 02:18 AM
easier way to just use C_BaseEntity::GetRenderOrigin() for drawing esp

0x6077
06-17-2012, 06:56 AM
easier way to just use C_BaseEntity::GetRenderOrigin() for drawing esp


const Vector& C_BaseEntity::GetRenderOrigin( void )
{
return GetAbsOrigin();
}

lol