G
G
gibsonen2018-02-13 22:11:07
Java
gibsonen, 2018-02-13 22:11:07

I'm writing a viewer obj file using OPENGL and have problems?

1) obj file contains vertex coordinates, for example one of them: v -1.174286 32.706123 6.473185 how to represent it in the form from -1 to 1 as required by opengl? Is there a translation function? (I use the joml library to work with geometric transformation)
2) my obj does not contain normals, how can I set the direction of the vector? What should be done in this case?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Alexandrov, 2018-02-13
@jamakasi666

See what others have done? https://github.com/javagl/obj

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question