Skip to content

Creating OpenGL 2.0 backend on PowerPC OS X #1379

@doctashay

Description

@doctashay

gdb-output.txt

Hello,

I am attempting to port OpenMW to PowerPC Mac OS X. So far, I have been able to successfully build OpenMW and all required dependencies on Mac OS X 10.5 Leopard using gcc14. You can see my fork and the ongoing MR here: doctashay/openmw#1

I understand that PowerPC is a niche platform, there is no official support, and it is unlikely anyone will be able to meaningfully troubleshoot my issue. I can't even be sure this is an issue with OSG specifically. I have attached gdb output related to this crash in the hopes that someone with experience building OSG can reveal any additional troubleshooting steps for me - like a specific build option or fallback that I could try to get past this problem.

OpenMW creates a window and then crashes when creating an OpenGL 2.0 context.

osg::State::disableAllVertexArrays stops at VertexArrayState:131. You can see the inline it's executing:

inline void disable(ArrayDispatch* vad, osg::State& state) { vad->disable(state); ... }

then it jumps to null. so ArrayDispatch *vad is null or corrupted. If you actually look in osg::State it's getting valid GL entry points (despite glGetString failing for some strange reason) so I'm less inclined to believe this is a GL issue (although on Leopard, GL support is VERY hit or miss.)

One thing I noticed is that MyGUIPlatform::Drawable::drawImplementation (a separate dependency working with OSG) shows state = (class State*) 0x8, so basically just junk, despite the real osg::State existing at 0xc88ca00

I suppose due to our wonky development environment that there could be an ABI mismatch - but my build script for OpenMW is explicitly building MyGUI, OSG, and OpenMW (and all dependencies) with the same build flags.

I have tried statically linking OSG into OpenMW (which it is currently), and flipping a flag to run in singlethreaded mode - neither had any impact on the backtrace - it consistently fails on disableAllVertexArrays.

I can confirm that just creating a demo triangle with OpenGL 2.0 and SDL2 works fine. At the moment, I am building OSG in debug mode with example programs included, so that I can isolate further. It takes several hours to build OSG on PowerPC so in the meantime, any advice or pointer in the right direction would be greatly appreciated. At this point, even a dirty hack or bypass to get SOMETHING drawing would be better than where I am currently.

If this is unrelated to OSG (aka I'm lost) or there is no interest in troubleshooting please feel free to close this issue out. Thanks for your time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions