OpenGL or OpenGL ES [duplicate]

﹥>﹥吖頭↗ 提交于 2019-12-04 02:52:41

Yes, definitely start with OpenGL ES 2.0. In fact, I would say start with WebGL (which is almost like OpenGL ES 2.0). The public wiki over here is a good place to start. The nice thing about WebGL is that you don't have to deal with things like compiling/linking and you avoid a lot of boilerplate code to setup a lot of stuff. So you get to focus on the actual drawing (which really is the fun bit :) ). If you have an OpenGL ES 2.0 book, that should still map over well to WebGL.

Plus there are a lot of demos in the repository which you can run immediately (and click your browser's 'View Source' to jump right into the code). Start with the simple ones like: image-texture-test, Colored Box, Textured Box

Those examples, together with your OpenGL ES 2.0 book, should get you started right away. Have fun!

EDIT: I should probably also point out that if you do decide to go the OpenGL 4.1 route, you probably don't need to wait for an OpenGL 4.1 book. An OpenGL 3.3 or 4.0 book would do just fine.

OpenGL versions generally add new functionalities to previous versions, so I'd say that learning OpenGL 4.1 is in fact learning OpenGL 3.0, as the base is the same, especially if you're beginning 3d programming.

OpenGL ES 2.0 is a kind of subset of OpenGL 3.x.

With these 'facts' in mind, I'd say that learning OpenGL 3+ or OpenGL ES 2+ is about the same, with differences in details.

Note that depending on your desktop platform (OS, graphics card), you may not have access to an OpenGL 3 implementation.

An implementation of OpenGL ES 2 on desktop may also not be available.

Shezan Baig suggestion to startin with WebGL may help you with this, as it delegates the OpenGL init. problem to the browser - some even implement WebGL over DirectX to improve its availability.

My suggestion is that, while you learn, you focus on 3d principles, algorithms, and maths. These are the hardest to get right. Implementation 'details' don't vary much with OpenGL (ES or not) or DirectX, or whatever.

More precisely, I'd suggest that you start in the programming language you're most familiar with. I'd go with OpenGL 1.x/2.x in this language : these 'old' versions of GL contain lot of helper functions (glBegin/glVertex/glEnd ; glMultMatrix ; etc.) that are 'deprecated' in 3.x+. Using these, you'll be more 'productive' for testing algorithms.

There are many things in 3d programming, you can find reference books that have become freely available, and select what information is interesting for your use-case.

Yes use GLES2.

1) Its portable.

2) Even for the PC follow the GLES2 way of doing things. (Unless your advanced and need GL3/4 features).

3) You want to use shaders period and GLES2 is good for learning the proper way.

Keep in mind OpenGL sucks on windows. The drivers are usually crap. Take the netbook, it support hlsl 2.0 but doesn't support GLSL shaders and only runs GL-1.3

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!