Rendering Java Android OpenGL ES on Windows - java

Background :
I'm currently making an Android Native game only using Java and OpenGL ES 3.0 and I wanted to make a simple Game Engine without copying my full Java project in C++ so I could have the same project on my Windows PC.
I would like to use some of my existing Java files my Android Studio Project is using, and to run them on a different window context on my PC. I would certainly make some separate Classes to set a OpenGL window and to have a main function.
My questions are :
What API should I use to create an OpenGL context in Java?
Will the included libraries in my Android Project Files (like android.opengl.GLES30) be found if I used a different IDE (like IntelliJ)?

Related

Writing an App with Android Studio to watch a Live Video which is provided by a Camera

I am currently working on a project. I have learned Java for ~4 years and am completely new to Android Studio.
In this project, a camera with artificial intelligence should recognize people within a certain radius.
With an Android app that I want to program using Java via Android Studio, I want to access the camera and query the information.
My question would be, with which tool or library can I program such an app and what else do i need?
I tried to use OpenCV and also Exoplayer, watched several different tutorials, but nothing really worked out for me.
My question would be, with which tool or library can I program such an app and what else do i need?
I thought using histograms might be the right apporach. I looked around and found this intersting project. https://isl.cs.technion.ac.il/wp-content/uploads/2020/11/Face_Recognition_Project.pdf
Introduction
Our goal was to create a fully operational mobile application which could detect,
recognize and track human faces.
In order to do that, we have decided to use the Android[3] platform combined
with the opencv library[4][5].
The development of the application was made on Qualcomm MSM8960[6] mobile device which run a 4.0.3 Android OS.
In addition to the application we have built, we also did a research about how
well we can use LDA[1] and PCA[2] in order to recognize faces and also about
the use of LDA in order to do basic pose estimation.
This is also interesting: https://towardsdatascience.com/face-recognition-how-lbph-works-90ec258c3d6b

Making iOS app using Android Studio and LibGDX

I want to make an app (not a game) for both Android and iOS. I have used LibGDX to make a game before and I like this because with one Java code it makes the app for both Android and iOS. However, I want to make an app that is not a game for iOS and Android with one Java code. Is my only solution to use the game engine LibGDX to make the app or is there another was I can do this.
I want to use one code in Java on a windows computer to make the app.
Intel has recently introduced INDE Multi-OS Engine early access programm: https://software.intel.com/en-us/intel-inde-multi-os-early-access
It allows to write you app for both Android and iOS in Java. Good technical overview is here: https://software.intel.com/en-us/blogs/2015/07/30/multi-os-engine-of-intel-inde-technical-overview
It let's to create Java applications in Android Studio for both iOS and Android platforms with a possibility to share logic between them.
Also there is a way to develop an app on Windows-host with Mac build server in LAN.

Render game objects in android app

Is there a way to render game objects in android app by using game engine ?
I have tried using unity but the problem is that, it require to export app as jar and use that lib in game development.
What I am trying to accomplish is to develop app using android studio and render game components which are built using game engine.
so Is it possible to do that and if yes which tool to use?

Questions regarding Windows/Android development (Java:APK/JAR)

I'm planning to write a software (with GUI and sounds) that should run under Android and Windows 7/8
I guess the best approach for this is to use Java?
I am new to Android and Java development so my questions are:
-So can I use one development platform to create both (APK & JAR), namely Java?
-As far as I understand for Android I need to compile (from same source?) a .APK file and for Windows a .JAR file ?
(The .JAR will run in the Java Runtime that is installed in Windows)
-If I use Java what would be the best IDE, something like Google's Android Studio (will it allow to create .JAR?) or Oracle's JDK (Java SE Development Kit) ?
thank you
I don't think it is possible to write an app that will run on both OS's, since all GUI components are part of different frameworks (Android SDK for Android, SWT/Swing/... on Windows), and not compatible with all OS's.
You best bet is probably a web-based app. You can run it in the browser on dektop and either on a mobile browser on Android, or package it as a fullscreen WebView running your web app. The best part is it would also work on iOS.
You could also write your app for desktop in Swing and then convert it to an Android app, you can find questions on StackOverflow on the subject, such as this one.
Hope this helps ;)

Using libGdx desktop port as emulator of Android GLES20

My Android OpenGL-ES 2.0 project don't even run on Android emulator (GPU host) or virtual machines (Androidx86.iso + VirtualBox), but no problem with physical android devices.
so, can i use libGdx desktop port for emulation of Android GLES20 without integrating other libGdx stuff in my android project?
if yes, then how to load shaders from android's RAW folder without libGdx framework?!
beside libGdx, i find a working wrapper
but if i have to maintain a wrapper by myself, then NDK+GLUT isn't faster option?
You can do something like that. It is what libgdx wiki says:
Clearly there's no OpenGL ES implementation on the desktop useable via
Java. Well, there is now. Libgdx emulates OpenGL ES via the standard
OpenGL API on Windows and Linux. Nearly all features are supported
such as fixed point math and so on. The only feature missing at the
moment is support for fixed point vertex buffer objects and some minor
getter methods.
Here is tutorial how you can use libgdx with lwjgl backend.
Here is how shader programs are initialized.
You can see from the link above how shaders are loaded from resources.
Here is what ShaderProgram does under the hood.
You can see what it calls some functions of gl object which contains methods emulating opengl es 2.0.

Categories