8000 Reference rasterizer rectf*() GL API not functional in flight demo · Issue #68 · lkesteloot/alice · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Reference rasterizer rectf*() GL API not functional in flight demo 8000 #68

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

Open
sgi-demos opened this issue Mar 20, 2023 · 4 comments
Open

Comments

@sgi-demos
Copy link

Hello!

In debugging the flight demo for sgi-demos project, I found the runways and taxiways were not drawing due to a bug in rectf_() in gl.c:

void rectf_(Coord x1, Coord y1, Coord x2, Coord y2) {
    pmv_(x1, y1, 0);
    pdr_(x1, y2, 0);
    pdr_(x2, y2, 0);
    pdr_(x2, y1, 0);
    end_polygon();
}

And this fixed it for me:

void rectf_(Coord x1, Coord y1, Coord x2, Coord y2) {
    bgnpolygon();
    pdr_(x1, y1, 0);
    pdr_(x1, y2, 0);
    pdr_(x2, y2, 0);
    pdr_(x2, y1, 0);
    endpolygon();
}

Thanks for the inspiration and the GL rasterizer!

@lkesteloot
Copy link
Owner

Nice! Yeah the flight code is clearly half-way through some larger change, unfortunately! It's a snapshot we found on some FTP site. I'm a little surprised we've not found a better version.

@bradgrantham
Copy link
Collaborator
bradgrantham commented Mar 20, 2023 via email

@sgi-demos
Copy link
Author

I'm a little surprised we've not found a better version.

I've got four versions of the source here, and I intend to port all of them. :^)

I wonder if "pclos" also has a bug.

Oh good point, that may help with another glitch I'm seeing in newave. Based on the GL reference, looks I could funnel pmv*() to bgnpolygon() + v3f() and pclos() to endpolygon().

Do you recall any gotchas with doing this? I realize it may have been a few years.

@bradgrantham
Copy link
Collaborator

I just mean it looks like pclos calls end_polygon and maybe should call endpolygon like you've changed in rectf_.

Sorry, I don't remember much about the gotchas. We didn't have a reference so we may have lost one or two small visual details that weren't obvious, and as Lawrence points out we never got the flight simulator working.

Great project, thanks for including us!

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

3 participants
0