Hi, I'm porting my OpenGL ES 2.0 app to Tizen and ran into some problems; everything (textures from images & shader programs) loads OK, no errors from Tizen APIs and glGetError() returns 0 - but everything textured renders as total black (or not at all). I verified that things beyond that work OK by rendering with GL_LINES; this way the polygons (outlines) render correctly, therefore all the setup is correct otherwise. Also the app has been at a stable phase for almost a year, and is running 100% on several other platforms. I used GlPlayer because I did not want to include all the fugly EGL setup code; my question is, does GlPlayer actually set things up properly for OGL ES 2.0 or is it just for OGL ES 1.x? It does, anyway, have a construction flag for OGL ES 2.0..
Oh yes, and I'm running this on the emulator as I do not have the reference device for testing. The emulator has GPU support enabled. My development system is a Ubuntu 12.04 LTS 64 bit, with Nvidia drivers version 304 (the one from apt), OpenGL version 4.20.
This is how I'm setting things up (pretty much the code that gets generated for an opengl template app):
bool MMark13App::OnAppInitialized(void) { // TODO: // Add code to do after initialization here. // Create a Frame MMark13Frame* pMMark13Frame = new MMark13Frame(); pMMark13Frame->Construct(); pMMark13Frame->SetName(L"MMark13"); AddFrame(*pMMark13Frame); { __player = new Tizen::Graphics::Opengl::GlPlayer; __player->Construct(Tizen::Graphics::Opengl::EGL_CONTEXT_CLIENT_VERSION_2_X, pMMark13Frame); __player->SetFps(60); //__player->SetEglAttributePreset(Tizen::Graphics::Opengl::EGL_ATTRIBUTES_PRESET_RGB565); __player->SetEglAttributePreset(Tizen::Graphics::Opengl::EGL_ATTRIBUTES_PRESET_ARGB8888); __player->Start(); } __renderer = new MMarkTizenController(); //new GlRendererTemplate(); __player->SetIGlRenderer(__renderer); return true; }
After this, its just portable C++ / OpenGL code starting from InitializeGl() and Draw(). I assume GlPlayer calls some kind of swapBuffers() method and I do not need to do that in the end of Draw()?
Maybe I'll try going through the EGL jungle today as per the GlesShader example and see if it works any better.
Oh, and another (simpler) question: is there a way to force an app to be landscape orientation only? Couldnt find this in the documentation and there isnt a lot about Tizen yet on google.
thanks,
Matti