Ok,
I have a working JOGL application. I use a lot of OpenGL features in it including Textures, VBO's, Ray-Picking, etc. I like working with OpenGL directly and don't want to use any other 3D graphics libraries.
What I want to achieve is two fold:
I want to be able to embed this JOGL application in a subset window of a larger UI window. So alongside the JOGL window will be a photo viewer, text box and scrollable list.
I am designing this application to run on Windows 10, multi touch hardware.
What I have found so far:
Java's Swing toolkit is the only way that I have been able to embed a JOGL window. However, Swing is old and dated looking.
Incorporating multi touch into swing can be done but does require a lot of custom gesture detection. This is fine but maybe options exists that don't reinvent the wheel.
JavaFX looks great and i'd like to use it but I don't see any straightforward way of pairing it with JOGL.
Do any of you have suggestions? Has anyone done this before?
You can integrate JOGL into a JavaFX application by using the SwingNode.
https://docs.oracle.com/javase/8/javafx/api/javafx/embed/swing/SwingNode.html
The opposite (integrating some JavaFX into a Swing application) is also possible but I would not reccomend it.
Doing the JOGL integration this way will not be as performant as a native OpenGL window but for many application it will be sufficient.
There's a far better solution right now based on JOGL 2.4 RC NewtCanvasJFX, please have a look at my detailed tutorial.
Related
we are using Facebook's Unity SDK on the Facebook Web Platform (using Unity WebPlayer).
We went for the non-html approach so we only provide the .unity3d file url. (Unity Integration button is active)
Using this method we have this three problems:
1) we find no way to customize the Unity loading screen. This method and this method only work using old html integration way.
2) on Windows platforms, any Facebook floating div, such as chat windows or search dialog result, make the game to be invisible. (if fact facebook javascript sent the game canvas to -10000 x-position)
3) we can't use a custom html tiled background image. We might change the background after Unity is loaded but the transition doesn't look good
My questions are:
Is is possible to solve them and still using Unity Integration method?
Do you suggest us to go for the old html integration method?
Thanks!
We are working to resolve this soon.
Unfortunately for certain browsers, Unity will always draw on top of everything. That means when chat windows pop up they would appear under the game. We try to keep the game around if this isn't the case.
Does Application.ExternalEval() with JS not work for you?
The benefits you get from using the Unity Integration is that:
the dialogs will appear in game, so your players won't be kicked out of fullscreen if they are there.
cross platform would be easier, as you don't have to integrate a different SDK if you also export to Android and iOS
don't have to manage the web page on canvas
Unless you want more DOM control directly through JS/HTML before the game loads, it's probably better to stick with the Unity Integration.
I hope that helps your decision making.
I'm making a flash app for AIR. The app is mostly made, but I'm not happy with rendering speed on mobile (render mode - gpu).
I know there is a framework that allows user-friendly way to work with Stage3d called Starling, but I've never used it.
After looking into it and following through some tutorials I've noticed that I need to rename all package flash default classes, e.g flash.display.DisplayObject -> starling.display.DisplayObject.
But such action might be destructive to my code base, plus, I have other frameworks attached that work with some flash package classes.
Is there a way to attach Starling to a complete project without re-naming all the package names, changing assets and re-factoring all frameworks that work with default AIR API?
If you're thinking of switching to Starling, you'll have to redesign your whole rendering code. Starling is no drop-in solution. Just renaming classes in your existing code will not do because it completely replaces flash display list for Direct3D, which does all it's rendering with GPU, with all the differences it brings: bitmapped graphics, texture atlases, careful draw ordering. Learning curve can be a bit steep in the beginning but once you get familiar with basic concepts it's a breeze to work with.
IMHO, it's well worth the effort, especially on mobile. Code that ran in low 10s of FPS in classic display list can easily be made to run at solid 60fps with Starling. Basically, for flash on mobile, Stage3D is the only game in town. And Starling is the best supported and widely accepted framework for 2D stuff on Stage3D, with lots of supporting libraries and a very helpful community of developers.
Go on, take the plunge, you won't regret it.
You can run Starling and a native flash application layer at the same time but it wouldn't give you an optimum experience.
If you want to take full advantage of the gpu acceleration of Stage3d and Starling though it would be preferable to refactor your existing code to use Starling display objects rather than Flash display objects.
You might want to post this question on the Starling forum, they are very helpful guys and it's a thriving developer community! - http://forum.starling-framework.org
I am fairly new to actionscript and was wondering is it possible to create 3d shapes (cones, spheres, cubes) using actionscript.
I would like not to have to use a plugin.
The shapes must be 3d as I need to rotate them.
Here you will find Adobes documentation for what you are looking for:
http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS7D38179D-58B9-409c-9E5C-257DDECB1A02.html
Is there any specific reason that you don't want to use 3D libraries like away3D?
I think Matej's answer does not fully cover the topic as the link he gave only describes a classic display list approach to drawing 3D objects. Depending on your needs, drawing things using classic display list can be slow, as it is not GPU accelerated. If you want to utilize your GPU you can use Stage3D APIs - that does not require any external frameworks. Here's an excellent article for starters.
And even though you can render 3D content using 'raw' Context3D, I`d recommend using a framework like Away3D or Alternativa3D. Both are open source, by the way.
I would like to create a 3D navigation wall similar to http://www.dior.com/couture/en_us/The-House-of-Dior/THE-HOUSE-OF-DIOR.
I've seen a similar plugin in http://www.flashloaded.com/flashcomponents/3dwall/.
However, I want to create it from scratch as I need to customize it very much.
Any starting template you know would be helpful.
A template might be helpful, but if you truly need to customize it very much, I would suggest that you learn the ins and outs of a nice 3D code library. If you do find a template, you will probably spend just as much time tweaking it only to find that it doesn't allow for what you want.
There are many existing 3D libraries for ActionScript that could make this a pretty straightforward task. PaperVision3D, Away3D or even the native Stage3D API in the Flash Player could get you going in the right direction.
If you want to customize it and have full control over the content you better learn something from scratch: Alternativa3D, Away3D, Flare3D (quite yeasy), Minko.... Those are the most popular and depends on your needs.
I have been searching for about a week now and found such pure AS3 UI/components:
What I'm trying to create is (Adobe AIR mobile) options/settings menu for game and depending on the size/pixel density of a particular screen
may require scrolling down options, mimicking the scrolling lists of Android with visual indicator of list location and the visual clue when reaching the end of the list
with the inertia too
MinimalComps (minimalcomps.com)
Razorberry (razorberry.com/blog/components/)
But they are all optimised for mouse clicks and use scrollbars as the interaction area for example
(uses minimalcomps, try to use it in browser on mobile touchscreen, very fiddly to use, in fact had to zoom in just to get past the conditions screen(!!))
I've had no luck finding any information or tutorial to create menu system in Adobe AIR mobile in pure AS3 (it usually just links to Flex or AIR desktop applications)
I only found one example of game pure AS3 with source to show, http://blogs.adobe.com/cantrell/archives/2010/05/my_presentation_on_multiscreen_development.html
but it doesn't show you how to implement basic touch menus/UI or interface,
I've been meaning to give mad components a try, they look very promising. Not sure if they'll solve your particular problem, but they do seem to outperform a similarly equipped Flex app (based on other developer's comments ;)
Look at foxhole components :
source and example
And You can also look at this project i working on , its extension for MinimalComps that works like Flex display system and have databinding . With little style work and extend few components You can use it on touchscreens.
source: https://github.com/turbosqel/Extended-MinimalComps
example: http://turbosqel.pl/ExMinimalComps/simple/
Feathers UI powered by Starling (fully GPU-rendered UI)
Its officially supported by Adobe, 100% open source and skinnable. See apps and games that use it for their UI. Docs are here.
This is the recommended method as of 2014-2015. For example, foxhole components is now depreciated in favor of Feathers.