mc 1.9
[vg.git] / src / vg / vg_tex.h
index 4c14540ca431a4b5404534dc5d44f27938e04467..33e074ef59b6736f8f45186028e8a4d78a8d6c56 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2021 Harry Godden (hgn) - All Rights Reserved
+/* Copyright (C) 2021-2022 Harry Godden (hgn) - All Rights Reserved */
 
 #define VG_TEXTURE_NO_MIP      0x1
 #define VG_TEXTURE_REPEAT      0x2
@@ -42,7 +42,8 @@ static inline void vg_tex2d_nearest(void)
 
 static inline void vg_tex2d_linear_mipmap(void)
 {
-       glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR );
+       glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, 
+         GL_LINEAR_MIPMAP_LINEAR );
        glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR );
 }
 
@@ -72,7 +73,8 @@ static GLuint vg_tex2d_rgba( const char *path )
                qoi_desc info;
                u8 *tex_buffer = qoi_decode( src_data, length, &info, 4 );
                
-               glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, info.width, info.height, 0, GL_RGBA, GL_UNSIGNED_BYTE, tex_buffer );
+               glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, info.width, info.height, 
+            0, GL_RGBA, GL_UNSIGNED_BYTE, tex_buffer );
                
                free( tex_buffer );
                free( src_data );
@@ -88,7 +90,8 @@ static GLuint vg_tex2d_rgba( const char *path )
                };
        
                vg_error( "Loading texture failed (%s)\n", path );
-               glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, 2, 2, 0, GL_RGBA, GL_UNSIGNED_BYTE, tex_err );
+               glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, 2, 2, 
+            0, GL_RGBA, GL_UNSIGNED_BYTE, tex_err );
        }
        
        return texture_name;