Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into kivutar/newdesign
Browse files Browse the repository at this point in the history
  • Loading branch information
kivutar committed Jul 10, 2022
2 parents 56eab9d + 500c8ba commit 8a4c2b6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions video/font.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,11 +194,11 @@ func LoadTrueTypeFont(program uint32, r io.Reader, scale int32, low, high rune,

vertAttrib := uint32(gl.GetAttribLocation(f.program, gl.Str("vert\x00")))
gl.EnableVertexAttribArray(vertAttrib)
gl.VertexAttribPointer(vertAttrib, 2, gl.FLOAT, false, 4*4, gl.PtrOffset(0))
gl.VertexAttribPointerWithOffset(vertAttrib, 2, gl.FLOAT, false, 4*4, 0)

texCoordAttrib := uint32(gl.GetAttribLocation(f.program, gl.Str("vertTexCoord\x00")))
gl.EnableVertexAttribArray(texCoordAttrib)
gl.VertexAttribPointer(texCoordAttrib, 2, gl.FLOAT, false, 4*4, gl.PtrOffset(2*4))
gl.VertexAttribPointerWithOffset(texCoordAttrib, 2, gl.FLOAT, false, 4*4, 2*4)

gl.BindBuffer(gl.ARRAY_BUFFER, 0)
bindVertexArray(0)
Expand Down
4 changes: 2 additions & 2 deletions video/video.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,11 +187,11 @@ func (video *Video) Configure(fullscreen bool) {

vertAttrib := uint32(gl.GetAttribLocation(video.program, gl.Str("vert\x00")))
gl.EnableVertexAttribArray(vertAttrib)
gl.VertexAttribPointer(vertAttrib, 2, gl.FLOAT, false, 4*4, gl.PtrOffset(0))
gl.VertexAttribPointerWithOffset(vertAttrib, 2, gl.FLOAT, false, 4*4, 0)

texCoordAttrib := uint32(gl.GetAttribLocation(video.program, gl.Str("vertTexCoord\x00")))
gl.EnableVertexAttribArray(texCoordAttrib)
gl.VertexAttribPointer(texCoordAttrib, 2, gl.FLOAT, false, 4*4, gl.PtrOffset(2*4))
gl.VertexAttribPointerWithOffset(texCoordAttrib, 2, gl.FLOAT, false, 4*4, 2*4)

// Some cores won't call SetPixelFormat, provide default values
if video.pixFmt == 0 {
Expand Down

0 comments on commit 8a4c2b6

Please sign in to comment.