I am attempting to make some kind of OpenGL wrapper that can be used on both PC and on Android.
My approach is to have some kind of Abstract OpenGL class with all OpenGL functions and then extend that class with a specialized one for each platform. However, there seem to be no way to do this on Android as you need a GL10 object that only can be get from functions such as onDrawFrame() and so on. You cannot save that GL10 object and use that in my Android GL class that extends Abstract OpenGL. If I try, nothing will be rendered, I have no idea why.
So are there any work around for this? If an OpenGL function are being called in Android GL class I need to have some way to do all the calls in the onDrawFrame() in the renderer class.
blitmethod, the PC subclass uses calls such asglBindTextureand the Android subclass usesgl.glBindTexture, with theGL10objectglas subclass variable which you set as first thing in each onDrawFrame(). Can be done without problem, only you will have quite a bit of redundant code.