colgreen / box2dx

Automatically exported from code.google.com/p/box2dx
22 stars 11 forks source link

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

Open SoftwelSanjog opened 6 years ago

SoftwelSanjog commented 6 years ago

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 commented 6 years ago

Yeh the text rendering support was removed from this particular github repo in changeset d4035bca5aeb433dfd2dfb61d03a9c54a6799c2f 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 commented 6 years ago

Thank u so much for repling. Drawpoint is working perfectly on distancetest.test but when i try to create a point in simpletest.ca then no point is shown.

I need to add text drawing feature to show changes in the body ,torque , acceleration And velocity for my research project. Can you please suggest me how to add such feature? I have tried it using FTclass.cs refering another version of box2dx but i found no luck. Please help me.

Best regards...

On Thu, Sep 6, 2018 at 1:49 AM Colin Green notifications@github.com wrote:

Yeh the text rendering support was removed from this particular github repo in changeset d4035bc https://github.com/colgreen/box2dx/commit/d4035bca5aeb433dfd2dfb61d03a9c54a6799c2f 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().

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/colgreen/box2dx/issues/24#issuecomment-418863275, or mute the thread https://github.com/notifications/unsubscribe-auth/ALhQYx-7m8WaqUA3c0jCwOxeX2I_hD-7ks5uYC43gaJpZM4WahbI .

--



Sanjog Shakya

Civil Engineer/Software Developer

Softwel Pvt. Ltd

254 EkataMarga, Baneswor, Kathmandu , Nepal

Phone: +977-1-4104307

Cell Phone: +977-9841133698


Postal Address:

GPO Box 86, Kathmandu

Nepal

colgreen commented 6 years ago

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 commented 6 years ago

Thank you so much for supporting. The Drawpoint method is working with the above snippet. While i must compromise text rendering till now because i have 64 bit system now.

Thank you so much for such a great library. I will be in touch with you.

Best Regards...



Sanjog Shakya

Civil Engineer/Software Developer

Softwel Pvt. Ltd

254 EkataMarga, Baneswor, Kathmandu , Nepal

Phone: +977-1-4104307

Cell Phone: +977-9841133698


Postal Address:

GPO Box 86, Kathmandu

Nepal

On Fri, Sep 7, 2018 at 4:45 AM Colin Green notifications@github.com wrote:

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.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/colgreen/box2dx/issues/24#issuecomment-419268566, or mute the thread https://github.com/notifications/unsubscribe-auth/ALhQYxUTX6pszVmqkmLZDw-skZVXgVllks5uYaj0gaJpZM4WahbI .