3D Cube and Basic Info in GL2/GLES
BlitzMax Forums/Brucey's Modules/3D Cube and Basic Info in GL2/GLES
| ||
I'm playing around with some examples on the web and other code snippets here to be able to use GL2 with basic 3d stuff like spinning cube and checking hardware info. So far it works with BRL.GLGraphics on Win32. I'm wondering how I would use SDL/GL2 in replacement with Import BRL.GLGraphics So far the basic setup that works is: Import BRL.GLGraphics Import Pub.Glew so what is the equivalent import for GL2/GLES? I have passed with GL_VENDOR using sdl.sdlgraphics but I'm getting GL_MAX_TEXTURE_UNITS not found.. |
| ||
OpenGLES 2 <> OpenGL ;-) There is no glbegin/end. Generally you'd be using shaders and the like, much like mojo2/gl2max2d does. See Pub.OpenGLES for all the available functions/consts. In respect of GL_MAX_TEXTURE_UNITS, Google found this, http://cocoadesignpatterns.squarespace.com/learning-opengl-es-errata/post/2014015 Google also found this OpenGLES 1.0 3D cube example for Anddroid : https://androidcookbook.com/Recipe.seam?recipeId=1529 And here's something for OpenGLES 2 : https://github.com/googleglass/gdk-apidemo-sample/blob/master/app/src/main/java/com/google/android/glass/sample/apidemo/opengl/Cube.java I suggest going with OpenGLES 2 |
| ||
Thank you Brucey, that makes everything clear. So moving on to Mojo2, since it is already ported to BMX (is it a complete port?). Can I do GL calls particularly basic 3D stuff on it. I see that minib3d for Monkey is built on top of mojo1, is it possible to use Mojo2 as a base for a possible minib3d port? Just curious to know as I'm seeing OpenB3D for BMX is going in another direction in using wrappers. |