mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-24 17:10:36 +00:00
fixed the bug with black creatures in 3D
This commit is contained in:
parent
fe266d3485
commit
62214a26e1
@ -113,8 +113,6 @@ void geometry_information::shift_shape_orthogonally(hpcshape& sh, ld z) {
|
||||
|
||||
extern renderbuffer *floor_textures;
|
||||
|
||||
basic_textureinfo models_texture;
|
||||
|
||||
void geometry_information::add_texture(hpcshape& sh) {
|
||||
if(!floor_textures) return;
|
||||
auto& utt = models_texture;
|
||||
|
@ -1045,6 +1045,8 @@ EX void make_floor_textures() {
|
||||
dynamicval<int> vgp(global_projection, 0);
|
||||
check_cgi();
|
||||
cgi.make_floor_textures_here();
|
||||
/* update texture ID in existing cgi's */
|
||||
for(auto& c: cgis) c.second.models_texture.texture_id = floor_textures->renderedTexture;
|
||||
}
|
||||
|
||||
|
||||
|
@ -79,6 +79,11 @@ struct escher_floorshape : floorshape {
|
||||
ld scale;
|
||||
};
|
||||
|
||||
struct basic_textureinfo {
|
||||
int texture_id;
|
||||
vector<glvertex> tvertices;
|
||||
};
|
||||
|
||||
/** basic geometry parameters */
|
||||
struct geometry_information {
|
||||
|
||||
@ -375,6 +380,9 @@ hpcshape
|
||||
|
||||
int state;
|
||||
int usershape_state;
|
||||
|
||||
/** contains the texture point coordinates for 3D models */
|
||||
basic_textureinfo models_texture;
|
||||
|
||||
geometry_information() { last = NULL; state = usershape_state = 0; gpdata = NULL; }
|
||||
|
||||
|
@ -15,11 +15,6 @@ struct texture_triangle {
|
||||
texture_triangle(array<hyperpoint, 3> _v, array<hyperpoint, 3> _tv) : v(_v), tv(_tv) {}
|
||||
};
|
||||
|
||||
struct basic_textureinfo {
|
||||
int texture_id;
|
||||
vector<glvertex> tvertices;
|
||||
};
|
||||
|
||||
struct textureinfo : basic_textureinfo {
|
||||
transmatrix M;
|
||||
vector<texture_triangle> triangles;
|
||||
|
Loading…
Reference in New Issue
Block a user