Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenGLDebugDraw.DrawString,OpenGLDebugDraw.DrawPoints are not working. #24

Open
SoftwelSanjog opened this issue Sep 5, 2018 · 4 comments

Comments

@SoftwelSanjog
Copy link

I am currently working of Box2Dx library and i found the OpenGLDebugDraw.DrawString doesnot show any text in the screen as the OpenDLDebugDraw Drawstring function doesnot use str argument.Same as the Draw point is not working too.

@colgreen
Copy link
Owner

colgreen commented Sep 5, 2018

Yeh the text rendering support was removed from this particular github repo in changeset d4035bc because it relied upon 32bit only native DLLs, and I only created this repo as a home for a version of Box2D that could be used in .NET generally, i.e. regardless of whether tarting a 32bit or 64 bit Windows (+I only use it in 64 bit mode, so this change was needed to make it work at all or my needs).

If anyone can figure out how to get text rending working in both 32 and 64bit mode them I'm open to suggestions or pull requests!

As for DrawPoint, it is working on my PC, e.g. there's is a red point rendered in DistanceTest.cs that I can see. So this might be a problem with your particular set up or how you are calling DrawPoint().

@SoftwelSanjog
Copy link
Author

SoftwelSanjog commented Sep 6, 2018 via email

@colgreen
Copy link
Owner

colgreen commented Sep 6, 2018

but when i try to create a point in simpletest.ca then no point is shown.

I am guessing that you have added code to the constructor, but the OpenGL calls need to be made per update frame, which you do my overriding Step(), e.g. add this and you should see a red point:

    public override void Step(Settings settings)
    {
        base.Step(settings);
        OpenGLDebugDraw.DrawPoint(new Vec2(0.0f, 4.0f), 4.0f, new Color(1, 0, 0));
    }

As for the text rendering, if you are happy to run in 32bit mode I think you can just get a copy of this repository before I removed support for text rendering. Otherwise it will take a lot of time for me to figure out what text renderers are available, and how to make them work, and I probably won't have time to get into that for a while.

@SoftwelSanjog
Copy link
Author

SoftwelSanjog commented Sep 7, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants