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

Generate polys in cgame for non-models #135

Closed
zturtleman opened this issue Nov 8, 2013 · 5 comments
Closed

Generate polys in cgame for non-models #135

zturtleman opened this issue Nov 8, 2013 · 5 comments

Comments

@zturtleman
Copy link
Member

RT_RAIL_CORE and RT_LIGHTNING are really similar, I started merging them and adding more vars for cgame to control them.

It seems like cgame should just give the renderer the 4 vertexes for the rail core and 16 for the lightning. That way cgame has full control without having a bloated general structure holding the data.

Known loss: tcMod entityTranslate, rgbGen entity, alphaGen entity, and renderfx flags. Could actually support the "entity" *gen (now polys are growing toward refent..). Could add renderfx too. EDIT: The method implemented uses refent so these can still be used.

Only RT_MODEL and RT_PORTALSURFACE need to be given to the renderer, the rest just generate polys using refEntity_t and view axis/origin.

typedef enum {
    RT_MODEL,
    RT_POLY, // ZTM: not implemented
    RT_SPRITE,
    RT_BEAM,
    RT_RAIL_CORE,
    RT_RAIL_RINGS,
    RT_LIGHTNING,
    RT_PORTALSURFACE,       // doesn't draw anything, just info for portals

    RT_MAX_REF_ENTITY_TYPE
} refEntityType_t;

I don't want to add RTCW's RT_SPLASH in engine anyway. :3

Plus means can add all of Elite Force's new refent types without changing engine. Note: EF would need option to force drawing shader as double sided (cull CT_TWO_SIDED).


If really only going to use refEntity_t for model and portal info, might add a separate new trap for adding portal info.


mm, should probably fix poly buffers #37.

@zturtleman
Copy link
Member Author

Change the cgame code so that local entities may be a model (refentity) or random verts will probably be a pain... May also consider implementing RT_POLY as refEntity with custom verts, as that is what I really want. I think.

@zturtleman
Copy link
Member Author

Added RT_POLY, ported RT_SPRITE (doesn't mirror...), RT_BEAM, RT_RAIL_CORE, RT_RAIL_RINGS, and RT_LIGHTNING to cgame. Tested adding RTCW's RT_SPLASH to cgame too. Still few things to decide for sprites (should they be engine or cgame). Still need force two sided for Elite Force.

61459eb, a937f1b, 3965fb9.

@zturtleman
Copy link
Member Author

Um, old method generated polys for each mirror/portal separate from main view. This allowed polys to face camera in mirrors, instead of actually mirroring (which looks wrong for rail core and causes invisible sprites)...

What to do...

@zturtleman
Copy link
Member Author

autosprite!

@zturtleman
Copy link
Member Author

Fixed mirror/portal issues in e5135d9!

zturtleman pushed a commit that referenced this issue Sep 26, 2015
SDL_GetWindowDisplayIndex check
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant