Comments (8)
Did you try drawing just a square or a line as a test? Does that work?
from oshgui.
Did you try drawing just a square or a line as a test? Does that work?
Yes I did. Drawing a line, text, rectangle works completely fine.
from oshgui.
Did you draw these with my renderer or directly from the surface?
from oshgui.
I tried directly from the surface, which worked.
I sadly can't get it working with your renderer.
Would it be possible for you to evaluate me how you have gotten it working or maybe send me the implementation source code?
from oshgui.
I use the CSGO renderer only for ESP and other visuals but not for the GUI.
My PaintTraverse hook looks like this:
auto panelName = thisPanel->GetName(panel);
if (panelName == "MatSystemTopPanel")
{
using namespace OSHGui;
using namespace OSHGui::Drawing;
static bool once = true;
if (once)
{
once = false;
auto surface = reinterpret_cast<IMatSystemSurface*>(...);
module.rendererCSGO = std::make_unique<CSGORenderer>(surface, module.GetEngine());
module.fontCSGO = std::make_shared<CSGOFont>(surface, _xor_("Arial"), 14);
}
module.rendererCSGO->BeginRendering();
auto geometry = module.rendererCSGO->CreateGeometryBuffer();
{
Graphics g(*geometry);
// draw stuff
if (module.IsIngame())
{
// draw esp
}
}
auto &renderTarget = module.rendererCSGO->GetDefaultRenderTarget();
renderTarget->Activate();
renderTarget->Draw(*geometry);
renderTarget->Deactivate();
module.rendererCSGO->EndRendering();
}
from oshgui.
Thanks for the source code!
Well my problem is that the GUI is sometimes randomly crashing due to CSGO's render multi threading, thats why I'm trying to implement it using the surface.
from oshgui.
I don't use it for the GUI because my GUI uses some textures and I did not implement that in the CSGO renderer. Normal stuff should just work.
from oshgui.
I'm doing the same right now. Just using OSH for the GUI.
Though it's crashing the same like in #9
from oshgui.
Related Issues (20)
- .exe app HOT 1
- Still getting mouse inputs while the window is not visible HOT 10
- unresolved external symbol for Drawing::Direct3D9Renderer HOT 27
- Errors with OSHGui HOT 2
- Can't set viewports HOT 7
- Can't remove controls HOT 9
- [SUGGESTION] Support dynamic resizing
- [SUGGESTION] Update FreeType from `2.5.2` to `2.10.1`
- Dynamically 'anchoring' elements is broken due to mistake in the code
- Fail to compile library with latest c++ standard HOT 2
- DDS Image Support HOT 1
- Crashing when trying to draw a text HOT 1
- OSHGui Externally? HOT 1
- Unicode Characters
- Replacing with new form HOT 2
- I cant Compiling via vs 2019 oshgui :( HOT 1
- OSHGui for DirectX 7? HOT 11
- Compiling Sample Project (to test) HOT 1
- Crashing when moving form HOT 14
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from oshgui.