Skip to content

Commit

Permalink
Generate texture mipmaps.
Browse files Browse the repository at this point in the history
  • Loading branch information
johanfforsberg authored and ikskuh committed Mar 6, 2022
1 parent 40a0367 commit b2c0379
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions types.zig
Original file line number Diff line number Diff line change
Expand Up @@ -123,4 +123,6 @@ pub const Texture = enum(UInt) {

pub const subImage2D = gl.textureSubImage2D;
pub const subImage3D = gl.textureSubImage3D;

pub const generateMipmap = gl.generateTextureMipmap;
};
5 changes: 5 additions & 0 deletions zgl.zig
Original file line number Diff line number Diff line change
Expand Up @@ -1375,6 +1375,11 @@ pub fn generateMipmap(target: TextureTarget) void {
checkError();
}

pub fn generateTextureMipmap(texture: types.Texture) void {
c.glGenerateTextureMipmap(@enumToInt(texture));
checkError();
}

pub fn bindTextureUnit(texture: types.Texture, unit: u32) void {
c.glBindTextureUnit(unit, @enumToInt(texture));
checkError();
Expand Down

0 comments on commit b2c0379

Please sign in to comment.