PDA

View Full Version : SMART Debug Errors with DirectX and Opengl32 both running?



CRASH_OVERRIDE
07-31-2014, 02:57 AM
So if i have:
smartPlugins := ['D3d9.dll', 'OpenGL32.dll'];
disableSRLDebug := true;

When the client loads, it will have down the bottom:
DISABLE SMART | DISABLE DIRECT-X | DISABLE DEBUG | DISABLE OPENGL | ENABLE DEBUG

Why is it that the debug for Opengl32 is on by default and the debug for DirectX is off?

I have also tried:
smartSetDebug(true);
smartSetDebug(true);

twice, so it enables both but it doesn't has anyone else noticed this? Without it enabled i cannot see directx's TPA debug. Any fixes for this?

Brandon
07-31-2014, 05:53 AM
So if i have:
smartPlugins := ['D3d9.dll', 'OpenGL32.dll'];
disableSRLDebug := true;

When the client loads, it will have down the bottom:
DISABLE SMART | DISABLE DIRECT-X | DISABLE DEBUG | DISABLE OPENGL | ENABLE DEBUG

Why is it that the debug for Opengl32 is on by default and the debug for DirectX is off?

I have also tried:
smartSetDebug(true);
smartSetDebug(true);

twice, so it enables both but it doesn't has anyone else noticed this? Without it enabled i cannot see directx's TPA debug. Any fixes for this?


SMART's internal API is on github. When it was written, Direct-X plugin did NOT exist at that time.

However, it was written in such a way that any amount of plugins can be loaded at a single instance & each button is given an ID chosen by the developer. I purposely chose two ID's that clash to prevent users trying to simultaneously debug in both modes at the same time (I failed obviously). This also makes SRL button enabling easy. Any plugin can "replace" or "add" buttons on SMART itself. Since BOTH OpenGL & Direct-X plugins deal with SMART's graphics, it does NOT make sense to have BOTH of them replacing buttons and trying to do debug.

In fact, it isn't even possible. Why? Because Runescape itself decides what gets displayed. When RS calls: glSwapBuffers, the OpenGL debugging/buffer reading gets done. When RS calls: D3D9->EndScene or D3D9->Present, the Direct-X debugging/buffer reading gets done. RS decides what gets called based on whatever mode you are playing in.

BOTH cannot be done at the same time because RS would have to be rendering in both modes simultaneously and that in itself makes no sense at all.


And.. now you know why you cannot debug in BOTH modes at the exact same time. It's ONE or the OTHER. You can enable both buttons and whichever mode RS is in, that's the mode that debugging will happen in.

CRASH_OVERRIDE
08-03-2014, 07:52 AM
I see, cheers Brandon.