@@ -126,7 +126,7 @@ GLuint CRender::texture_load(LPCSTR fRName, u32& ret_msize, GLenum& ret_desc)
126126
127127 glGenTextures (1 , &pTexture);
128128 glBindTexture (GL_TEXTURE_CUBE_MAP, pTexture);
129- CHK_GL (glTexStorage2D (GL_TEXTURE_CUBE_MAP, mip_cnt, fmt.Internal , dwWidth, dwHeight));
129+ CHK_GL (glTexStorage2D (GL_TEXTURE_CUBE_MAP, mip_cnt, (GLenum) fmt.Internal , dwWidth, dwHeight));
130130
131131 for (size_t face = 0 ; face < Texture.faces (); face++)
132132 {
@@ -135,11 +135,11 @@ GLuint CRender::texture_load(LPCSTR fRName, u32& ret_msize, GLenum& ret_desc)
135135 if (gli::is_compressed (Texture.format ()))
136136 {
137137 CHK_GL (glCompressedTexSubImage2D (GL_TEXTURE_CUBE_MAP_POSITIVE_X + face, i, 0 , 0 , Texture.dimensions (i).x , Texture.dimensions (i).y ,
138- fmt.Internal , Texture.size (i), Texture.data (0 , face, i)));
138+ (GLenum) fmt.Internal , Texture.size (i), Texture.data (0 , face, i)));
139139 }
140140 else {
141141 CHK_GL (glTexSubImage2D (GL_TEXTURE_CUBE_MAP_POSITIVE_X + face, i, 0 , 0 , Texture.dimensions (i).x , Texture.dimensions (i).y ,
142- fmt.External , fmt.Type , Texture.data (0 , face, i)));
142+ (GLenum) fmt.External , (GLenum) fmt.Type , Texture.data (0 , face, i)));
143143 }
144144 }
145145 }
@@ -165,17 +165,17 @@ GLuint CRender::texture_load(LPCSTR fRName, u32& ret_msize, GLenum& ret_desc)
165165
166166 glGenTextures (1 , &pTexture);
167167 glBindTexture (GL_TEXTURE_2D, pTexture);
168- CHK_GL (glTexStorage2D (GL_TEXTURE_2D, mip_cnt, fmt.Internal , dwWidth, dwHeight));
168+ CHK_GL (glTexStorage2D (GL_TEXTURE_2D, mip_cnt, (GLenum) fmt.Internal , dwWidth, dwHeight));
169169 for (size_t i = 0 ; i < mip_cnt; i++)
170170 {
171171 if (gli::is_compressed (Texture.format ()))
172172 {
173173 CHK_GL (glCompressedTexSubImage2D (GL_TEXTURE_2D, i, 0 , 0 , Texture.dimensions (i).x , Texture.dimensions (i).y ,
174- fmt.Internal , Texture.size (i), Texture.data (0 , 0 , i)));
174+ (GLenum) fmt.Internal , Texture.size (i), Texture.data (0 , 0 , i)));
175175 }
176176 else {
177177 CHK_GL (glTexSubImage2D (GL_TEXTURE_2D, i, 0 , 0 , Texture.dimensions (i).x , Texture.dimensions (i).y ,
178- fmt.External , fmt.Type , Texture.data (0 , 0 , i)));
178+ (GLenum) fmt.External , (GLenum) fmt.Type , Texture.data (0 , 0 , i)));
179179 }
180180 }
181181 FS.r_close (S);
0 commit comments