mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-06-02 17:41:10 +00:00
[sw] Take advantage of the ECS for edge rendering
This fixes the segfault due to the world entity not actually existing, without adding a world entity. It takes advantage of the ECS in that the edge renderer needs only the world matrix, brush model pointer, and the animation frame number (which is just 0/1 for brush models), thus the inherent SOA of ECS helps out, though benchmarking is needed to see if it made any real difference. With this, all 4 renderers are working again.
This commit is contained in:
parent
2a9fcf4f5f
commit
20c861027e
18 changed files with 168 additions and 82 deletions
|
@ -99,7 +99,7 @@ typedef struct surf_s {
|
|||
// start)
|
||||
int flags; // currentface flags
|
||||
void *data; // associated data like msurface_t
|
||||
entity_t entity;
|
||||
uint32_t render_id;
|
||||
float nearzi; // nearest 1/z on surface, for mipmapping
|
||||
qboolean insubmodel;
|
||||
float d_ziorigin, d_zistepu, d_zistepv;
|
||||
|
@ -163,4 +163,6 @@ typedef struct edge_s
|
|||
extern float r_avertexnormals[NUMVERTEXNORMALS][3];
|
||||
extern vec3_t ambientcolor;
|
||||
|
||||
uint32_t SW_AddEntity (entity_t ent);
|
||||
|
||||
#endif // _R_SHARED_H
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue