简体   繁体   中英

OpenGL ES without GLkit. Analogs for GLKMatrix and functions in pure OpenGL ES

Im learning opengl es 2.0 by books and guides in the internet. BUT! All examples (like a standart example in XCODE) have GLkit.

For example: GLKMatrix4, GLKMatrix3, GLKView types and functions.

But i have to use pure OpenGL without GLKIT. Does OpenGL ES have itself analogs for this types and functions or i must implement it by myself ?

Thx for answer Andon. Can i write code for this types and functions by myself or its a hard work and only choice - using GLKIT?

As @Andon noted, there are no vector/matrix math features in OpenGL ES 2.0 and later. (And at this point you really shouldn't be writing ES 1.1 code anymore.) There are many ways of filling in the missing pieces, of which Apple's GLKit math library is one.

You could write your own math library for these functions -- it's a great educational exercise. Here's a university course that does a pretty good job of covering the requisite math and showing the equivalent C code.

However, in the graphics programming world, there's often a big difference between code that's easy to grok and code that runs fast on your target device. So, while educational exercises are great for educational purposes, for real work you're probably better off using someone else's math library. GLM is a popular one if you're doing cross-platform work in C++. If you're targeting iOS, GLKit is a good choice -- Apple's done the work of making sure it runs fast on iOS devices. (If you look at the headers you'll notice many of the functions are inline and use ARM NEON vector instructions.)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM