• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Default Can I use OpenGl drawing with major game engines

Providing you can run code on the GL thread then you can call API's and they will do stuff, but its probably a bad idea. If you change some of the GL state and the engine isn't expecting it, at best you will get weird artefacts.
What exactly are you trying to do?
 
I am trying to make an addon for game engines. It has a small user Interface. I do not want to redraw the user interface for every different game engine, so i wanted to use something that's more cross compatible. I wanted to draw the menu for my game addon with opengl because its common among all game engines.
 
You probably can't assume the renderer will be OpenGL. For example unity games can be built for all sorts of different targets, it may end up running on DirectX or Vulkan.

The complicated bit of building a UI toolkit is calculating how everything will get layed out, not the actual drawing. You could implement a simple routine in each engine that just draws a bitmap in a specific rectangle and collects user input, then the code to calculate where are the bitmaps should go on screen could still be common.
 
Back
Top Bottom