Golang Begin Examples
文章推薦指數: 80 %
Golang Begin - 3 examples found. These are the top rated real world Golang examples of github.com/zombiezen/Go-OpenGL/gl.Begin extracted from open source ...
Togglenavigation
HotExamplesENENRUDEFRESPTITJPZH
GoPHPC#JavaGoC++PythonJSTS
SearchGolangBeginExamplesGolangBegin-3examplesfound.ThesearethetopratedrealworldGolangexamplesofgithub.com/zombiezen/Go-OpenGL/gl.Beginextractedfromopensourceprojects.Youcanrateexamplestohelpusimprovethequalityofexamples.ProgrammingLanguage:GolangNamespace/PackageName:github.com/zombiezen/Go-OpenGL/glMethod/Function:BeginExamplesathotexamples.com:3RelatedNewReaderSetLoggerNewFilterBuilderDumpAsJsonBlendFuncMakeProgramChunkSizeFileTypeAddOrUpdateCertAndKeyToCamelCaseRelatedinlangsr_get_collection_icon(PHP)ObjectManagerInterface(PHP)RegType(C#)IVisibilityBuilder(C#)image_HandlerCreate(C++)convertInputCoords(C++)PsiExpression(Java)L2DatabaseFactory(Java)jr16(Python)mkdir(Python)Example#10ShowfileFile:
asteroids.go
Project:
zombiezen/Go-GLUTfuncdrawShip(anglefloat32){
gl.PushMatrix()
gl.Translatef(x,y,0.0)
gl.Rotatef(angle,0.0,0.0,1.0)
ifthrust{
gl.Color3f(1.0,0.0,0.0)
gl.Begin(gl.LINE_STRIP)
gl.Vertex2f(-0.75,-0.5)
gl.Vertex2f(-1.75,0)
gl.Vertex2f(-0.75,0.5)
gl.End()
}
gl.Color3f(1.0,1.0,0.0)
gl.Begin(gl.LINE_LOOP)
gl.Vertex2f(2.0,0.0)
gl.Vertex2f(-1.0,-1.0)
gl.Vertex2f(-0.5,0.0)
gl.Vertex2f(-1.0,1.0)
gl.Vertex2f(2.0,0.0)
gl.End()
ifshield{
gl.Color3f(0.1,0.1,1.0)
gl.Begin(gl.LINE_LOOP)
forrad:=0.0;rad<12.0;rad+=1.0{
gl.Vertex2f(
float32(2.3*math.Cos(2*float64(rad)/math.Pi)+0.2),
float32(2.0*math.Sin(2*float64(rad)/math.Pi)))
}
gl.End()
}
gl.PopMatrix()
}Example#20ShowfileFile:
asteroids.go
Project:
zombiezen/Go-GLUTfuncdrawBullets(){
gl.Begin(gl.POINTS)
gl.Color3f(1.0,0.0,1.0)
fori:=0;i
延伸文章資訊
- 1Learn Opengl Golang
OpenGL Tutorial in Go. Based on the excellent tutorial by Joey de Vries; uses go-gl for all OpenG...
- 2Vitali Baumtrok / opengl-go-example - GitLab
simple OpenGL example with GLFW3 in Go. ... opengl-go-example. Project ID: 19237990. simple golan...
- 3vbsw/opengl-go-example - Giters
Vitali Baumtrok opengl-go-example: simple OpenGL example with GLFW3 in Go.
- 4Game programming with Go and OpenGL? : r/golang - Reddit
go-qml lets you create Qt QML widgets in Go that you can "paint" with OpenGL. Take a look at http...
- 5Games With Go 39 - Intro OpenGL & Golang - YouTube
For more info on games with go, see: https://gameswithgo.org/The error around halfway with shader...