Skip to content

udhos/go-obj

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-obj

OBJ file loader

Currently supported fields:

  • - comments , ignored

  • o - Object Name??
  • v - Vertex
  • vn - Vertex Normal
  • f - Face
  • vt - vertex texture coordinate indices

Everyting else is silently ignored

cmd/obj-renderer

This is a standard object renderer, using a simple GLSL shader (embedded) for lighting.

Usage:

$ obj-renderer <filename>

TODO

  • obj.Writer interface
  • The gometalinter says all the table based tests are the same. Try to abstract them?
  • Materials aren't supported.
  • Logging

Notes

Byte Array Usages

The majority of the obj.Reader is designed to use byte arrays, not strings. This is to keep the memory footprint low as each line is considered one contigious region of memory and never copied. In my opinion, it's a premature optimization but a good experiment.

About

OBJ file loader for golang

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 96.3%
  • GLSL 3.7%