This might be a trivial question, but here is this issue I wonder about cocos2d-x in general. I've read somewhere cocos2d and cocos2dx are based on OpenGL ES (2.0 i guess?). And also from the creators of cocos2dx that OpenGL ES 2.0 is not yet enabled in it.
This sounds to me like someone saying Obj-C is written based on C, but C is not yet enables in Obj-C!
is there anyway (coz I couldn't find any nice tutorial on the net anywhere) to integrate OpenGL ES 1.0/2.0 in cocos2dx?
If not, write OpenGL ES 2.0 in Obj-C and integrate in cocos2dx, .cpp files. (use classes etc, maybe wrapping objects from Obj-C, but how would I wrap a large class inherited from UIView [to alter draw() method] to be able to use in .cpp file in my cocos2dx project?)
Very much appreciate your help in advance,
P.S. I have been like a sitting duck for the past month, thanks to this issue.
The link you referred to in a comment is one year older. Check this one out instead: http://www.cocos2d-x.org/projects/cocos2d-x/wiki/Download
OpenGL ES 2.0 is now supported now in cocos2dX.
Cocos2d-x is written in C++ and OpenGL ES 1.1/2.0, so OpenGL ES is already supported (integrated).
Related
I am in the process of reading WebGL and going through some tutorials .
But I think I had to learn OpenGL explicitly in order to work with WebGL more efficiently.
But there are many versions of OpenGL and this wiki link shows that WebGL uses OpenGL 2.0 but the latest version of OpenGL is 4.5 .
Can anybody suggest how to know which version of OpenGL is supported through some script in WebGL ,if possible.
WebGL is based on the OpenGL ES 2.0 API, however, there are some limitations they have adopted for increased availability.
The APIs of (modern) OpenGL, OpenGL ES, and WebGL, while not the same, are all closely related. If you know one, the usage of the other two is quite similar. In fact, you may be able to reuse a large amount of code between the three. So, knowing OpenGL would certainly help you implement a WebGL application, however, learning WebGL first is also plausible.
WebGL is not based on OpenGL. It is based on OpenGL ES 2.0. The same OpenGL ES found on Android and iOS.
There's significant differences between OpenGL and OpenGL ES. While OpenGL ES is a subset of OpenGL it is missing the old deprecated fixed function pipeline that so many people continue to use and so many outdated tutorials (like Nehe GL, still teach)
What's the fixed function pipeline? Anything having to do with glVertex, glColor, glNormal, glLight, glPushMatrix, glPopMatrix, glMatrixMode, etc... in GLSL using any of the variables that access the fixed function data like gl_Vertex, gl_Normal, gl_Color, gl_MultiTexCoord, gl_FogCoord, gl_ModelViewMatrix and the various other matrices from the fixed function pipeline.
Those are all removed from OpenGL ES 2.0 and therefore don't exist in WebGL
WebGL is based on OpenGL-ES 2.0
Recently I want to learn OpenGL ES. But I don't know which version should I learn.
I have tried OpenGL ES 2.0. You have to implement much functions that build-in OpenGL ES 1.0.
The Programmable Pipeline is trouble, despite it's powerful.
OpenGL ES 2.0 have been used in cocos2d 2.0.
Which version is widely in use?
Which one should I learn.
I'm a iOS developer.
As an iOS developer, you should probably allow yourself not to worry about devices on versions of the OS prior to iOS 5, meaning that you can really on Apple's GLKit to provide all the functionality that's in 1.1 but removed from 2.0. iOS device sales continue to grow exponentially and iOS 5 is available for devices from the 3GS onwards and so by the time you're up to speed you'll be losing very little in terms of potential audience.
GLKit supplies:
as many matrix stacks as you want (plus quaternions)
prepackaged shaders that match most of the ES 1.1 fixed functionality effects
standard bindings between OpenGL and UIKit (so you never need write your own UIView subclass for OpenGL again)
prebaked code for texture loading, synchronously and asynchronously
This is Apple's head documentation page for GLKit (and it's worth expanding the 'more'). iOS 5 and GLKit is quite new so external resources are still a little disorganised, but this one looks good enough.
Apple's intention is explicitly to allow someone who would otherwise stick with ES 1.1 because it does so much for you to get a working ES 2.0 implementation with very limited extra effort, with which they can then take advantage of the programmable pipeline in any way they see fit as they learn more about it. So I'd say that you should put your faith in Apple, take advantage of their code and learn ES 2.0 + GLKit right off the bat.
GLES2 does not support glPush*/glPop*. Does anyone know if there is an implementation of a state stack for OpenGL ES 2.0? Any solution to my problem is welcome.
glPushAttrib/glPopAttrib managed fixed-function state that was not moved over from the older versions of OpenGL. Programmable shaders replaced all of the fixed-function functionality in GLES, and newer versions of OpenGL.
State is now something you manage yourself via inputs to shader programs.
If you need a quick solution, you may be interested in this library (Github repository). It only emulates small subset of OpenGL 1.x, glPush*/glPop* included. Note, that mentioned project is still very much WIP, so don't expect everything to work out of box.
Is it possible and not too complicated to use OpenGL ES for OS X development. I have been writing Mac applications for three years now and I am ready to start learning about OpenGL, but I want use OpenGL ES because there is a lot of information about using it with Xcode and Objective-C and from some of the code samples I found it seems easier to learn than the full OpenGL.
Thanks!
OpenGL-ES 1.1 is a true subset of OpenGL-2, ES-2 is a subset of OpenGL-3, the main difference is, how the context is created and managed. However context creation and management happen outside of OpenGL actually. So as long as you stick to OpenGL-ES, minus extensions specific to ES (i.e. OES extensions) you can do with an ordinary OpenGL context of the right version.
There are OpenGL-ES compatibility profiles, but those just disable functionality, don't add new one.
I am trying to get an OpenGL ES demo app to build on Windows with Mesa. I'm confused about the EGL side of things.
When my project links, it can't find eglTerminate() (and other EGL functions).
I've checked for a libEGL.lib file but I don't have one. Do I have to build the src\egl code into a library as well?
Unless something changed recently, I'm not even sure how you got an ES DLL in the first place.