Questions tagged [go-gl]
7 questions
                    
                    2
                    
            votes
                
                0 answers
            
        Even though I get a Shader compile error, all shaders work perfectly. How?
I am using Go and the go-gl package. My setup seems to be correct as everything else works (window creation, vertex buffers, etc). The problem is:-
I have created 4 shaders (2 vertex and 2 fragment) for 2 different triangles.
Vertex…
        
        Shardul Nalegave
        
- 419
 - 9
 - 16
 
                    1
                    
            vote
                
                0 answers
            
        I cannot get DrawElements to work properly in go-gl
my code is split into two files.
here's main.go:
package main
import (
    "fmt"
    "runtime"
    "github.com/go-gl/gl/v4.1-core/gl"
    "github.com/go-gl/glfw/v3.2/glfw"
)
const (
    width  = 500
    height = 500
)
func main() {
   …
        
        Joni Hammerson
        
- 11
 - 2
 
                    1
                    
            vote
                
                1 answer
            
        Memory error when calling gl.GenVertexArrays
I've been using Go's go-gl package for quite a while now. Everything was working 100% until I did some refactoring and now I'm getting the stranges error:
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation…
        
        FanManPro
        
- 1,076
 - 1
 - 13
 - 31
 
                    0
                    
            votes
                
                1 answer
            
        How do I get gl functions to load in go on windows?
I'm trying to get go-gl to work in Windows, but something seems to be going wrong with loading the gl functions. Here's the code I'm running :
package main
import (
    "log"
    "runtime"
    "github.com/go-gl/gl/v3.3-core/gl"
   …
        
        decitrig
        
- 778
 - 5
 - 23
 
                    0
                    
            votes
                
                1 answer
            
        OpenGL Vertex Attributes, position works but texcoord doesn't?
Vertex shader:
#version 130
in vec2 position;
in vec2 texcoord;
out vec3 Color;
out vec2 Texcoord;
void main() {
    Texcoord = texcoord;
    gl_Position = vec4(position, 0, 1);
}
Fragment shader:
#version 130
in vec2 Texcoord;
uniform…
        
        Corey Ogburn
        
- 24,072
 - 31
 - 113
 - 188
 
                    0
                    
            votes
                
                1 answer
            
        build google/gxui samples error on mac
I git clone code from github.com/google/gxui
and then
cd samples/hello_word
GOOS=windows go build
an error  occurred
it says
/d01/gopath/src/github.com/goxjs/gl/gl_opengl.go:10:2: no buildable Go
source files in…
        
        toalaska
        
- 1
 - 1
 
                    0
                    
            votes
                
                1 answer
            
        Go-GL "Project" method giving unexpected results
Go-GL's Project method is giving me unexpectedly large screen coordinates.
To summarize:
// Screen is 800x600.
projection := mgl32.Perspective(
    mgl32.DegToRad(45), // Field of view (45 degrees).
    800.0 / 600.0,      // Aspect ratio.
    0.1, …
        
        Jonathan
        
- 13,354
 - 4
 - 36
 - 32