|
Thema |
Forum |
Letzter Beitrag |
Beiträge |
Zugriffe |
 |
[Help] [OSHGUI] directx , reset hook minimize and maximize game
Erstellt am: Mo 12. Dez 2016, 19:31
_or_75
Vorschau
Go To Post
TEXT Code: unique_ptr<Drawing::Direct3D9Renderer> gui_renderer; void Initialize() { unique_ptr<Drawing::Direct3D9Renderer> renderer( new Drawing::Direct3D9Renderer( g_pDevice ) ); gui_renderer = std::move( renderer ); Application::Initialize( std::move( gui_renderer ) ); auto &app = Application::Instance(); Drawing::FontPtr font = Drawing::FontManager::LoadFont( "Tahoma" , 8.0f , true ); app.SetDefaultFont( font ); auto form = std::make_shared<form1>(); app.Run( form ); app.Enable(); app.RegisterHotkey( Hotkey( Key::Insert , [] { Application::Instance().Toggle(); } ) ); } HRESULT WINAPI Hook_Reset( LPDIRECT3DDEVICE9 pDevice , D3DPRESENT_PARAMETERS* pPresentationParameters ) { if ( gui_renderer ) gui_renderer->PreD3DReset(); HRESULT hRes = Reset_o( pDevice , pPresentationParameters ); if ( gui_renderer ) gui_renderer->PostD3DReset(); return hRes; } HRESULT WINAPI Hook_EndScene( IDirect3DDevice9* pDevice ) { static bool InitalizeGUI = false; if ( !InitalizeGUI ) { Initialize(); messageHookHandle = SetWindowsHookExW( WH_GETMESSAGE , KeyboardHook , 0 , GetCurrentThreadId() ); InitalizeGUI = true; } if ( InitalizeGUI ) { auto &app = Application::Instance(); auto &renderer = app.GetRenderer(); renderer.BeginRendering(); app.Render(); renderer.EndRendering(); } return EndScene_o( pDevice ); }
if minimize game(csgo) and maximize game then game freeze (minimize and maximize is work) , how to fix?
|
VB, C/C++, Delphi, etc |
Mo 12. Dez 2016, 19:31
von _or_75
|
0 |
784 |
 |
[Question] Drawing::Graphics EndScene Draw
Erstellt am: So 11. Dez 2016, 12:04
_or_75
Vorschau
Go To Post
TEXT Code: void Initialize() { std::unique_ptr<Drawing::Direct3D9Renderer> renderer( new Drawing::Direct3D9Renderer( g_pDevice ) ); Application::Initialize( std::move( renderer ) ); auto &app = Application::Instance(); Drawing::FontPtr font = Drawing::FontManager::LoadFont( "Tahoma" , 8.0f , true ); app.SetDefaultFont( font ); auto form = std::make_shared<form1>(); app.Run( form ); app.Enable(); app.RegisterHotkey( Hotkey( Key::Insert , [] { Application::Instance().Toggle(); } ) ); } HRESULT WINAPI Hook_EndScene( IDirect3DDevice9* pDevice ) { static bool InitalizeGUI = false; static Drawing::Graphics* Draw = nullptr; if ( !InitalizeGUI ) { Initialize(); Draw = new Drawing::Graphics( *Application::Instance().GetRenderer().CreateGeometryBuffer() ); messageHookHandle = SetWindowsHookExW( WH_GETMESSAGE , KeyboardHook , 0 , GetCurrentThreadId() ); InitalizeGUI = true; } if ( InitalizeGUI && Draw ) { auto &app = Application::Instance(); auto &renderer = app.GetRenderer(); renderer.BeginRendering(); app.Render(); //Draw->DrawRectangle( Drawing::Color::Blue() , 150 , 10 , 100 , 100 ); //Draw->FillRectangle( Drawing::Color::Green() , 10 , 10 , 100 , 100 ); renderer.EndRendering(); } return EndScene_o( pDevice ); }
Draw->DrawRectangle and etc crash why ?
|
VB, C/C++, Delphi, etc |
So 11. Dez 2016, 12:04
von _or_75
|
0 |
327 |
 |
[Help] [GUI] wie Sie mit OpenGL32 Drawing
Erstellt am: Mi 24. Jul 2013, 17:54
_or_75
Vorschau
Go To Post
TEXT Code: #include <d3dx9.h> #include "GUI/OSHGui.hpp" #include "GUI/Input/WindowsMessage.hpp" #include "GUI/Drawing/OpenGL/RendererOpenGL.hpp" #include "GUI/form1.hpp"
TEXT Code: void APIENTRY Hooked_glBegin( GLenum mode ) { // was ist der Code ??? (*pglBegin)( mode ); }
TEXT Code: void APIENTRY Hooked_glEnd( void ) { // was ist der Code ??? (*pglEnd)(); }
|
VB, C/C++, Delphi, etc |
Di 30. Jul 2013, 12:50
von KN4CK3R
|
5 |
329 |
 |
[Help] [GUI] wie Sie mit OpenGL32 Drawing
Erstellt am: Mi 24. Jul 2013, 17:54
_or_75
Vorschau
Go To Post
Zitat von Dovahkiin Was soll das sein? how to draw using opengl32 ? NOT DIRECTX ! Wie zeichnet man mit OpenGL32 ? NICHT DIRECTX ! google translate fail
|
VB, C/C++, Delphi, etc |
Di 30. Jul 2013, 12:50
von KN4CK3R
|
5 |
329 |
 |
[Help] [GUI] wie Sie mit OpenGL32 Drawing
Erstellt am: Mi 24. Jul 2013, 17:54
_or_75
Vorschau
Go To Post
Zitat von KN4CK3R Genauso wie bei DirectX auch, nur dass du statt dem RendererDX... einen RendererOpenGL erzeugst. Der Rest bleibt exakt gleich, das ist ja der Sinn der Abstraktion.
Der Code kommt wahrscheinlich dann in Hooked_glEnd. Den DX Include brauchst du dann sicher auch nicht.
MVS 2010/2012 Drawing::IRenderer* GL = new Drawing::RendererOpenGL(); // ERROR C2259 Application::Instance()->Create(GL); Application::Instance()->Run(std::shared_ptr<Form>(new MainForm())); Application::Instance()->Enable();
|
VB, C/C++, Delphi, etc |
Di 30. Jul 2013, 12:50
von KN4CK3R
|
5 |
329 |