Java-Gaming.org Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (799)
Games in Android Showcase (237)
games submitted by our members
Games in WIP (865)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1] 2 3
  ignore  |  Print  
  JGLOOm - Loading Every File Format for Every OpenGL Lib*  (Read 51401 times)
0 Members and 1 Guest are viewing this topic.
Offline Ecumene

JGO Kernel


Medals: 200
Projects: 4
Exp: 8 years


I did not hit her! I did not!


« Posted 2016-05-29 15:48:42 »



JGLOOm stands for Java openGL: Object Oriented (man!) it is Java library that wraps the functionality of the OpenGL API in a more object-oriented package. It puts OpenGL objects into Java interfaces, and their functions into static factories / container utils, allowing for code to be reactive to the user's OpenGL version/platform dependency. It also provides users higher-level utilities like tracker objects that follow OpenGL values (like a texture parameter) around, reducing API calls.

Repository for loading file formats into those objects (no work has been done here yet)
https://github.com/team-jgloom/jgloom

Currently the library is in pre-production and we're working on the standard for it. Here's some stuff we have done though:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
GLBuffers - Interface and LWJGL Containers
GLTextures - Interface and LWJGL Containers
GLFrameBuffers - Interface and LWJGL Containers
GLRenderBuffers - Interface and LWJGL Containers
GLSLShaders - Interface and LWJGL Containers
GLSLPrograms - Interface and LWJGL Containers

LWJGL Specific:
GLFWWindows - Interface and LWJGL Containers
GLFWMonitors - Interface and LWJGL Containers


Here's how an object looks in our library
1  
2  
3  
4  
public interface GLBuffer {
    /** @return The identifier for the buffer object */
    int getBuffer();
}


The focus of this library was not just the higher-level manipulation of OpenGL objects, but also loading popular file formats such as these:
Image formats
  • JPEG
  • PNG
  • TIFF
  • GIF
  • BMP


Model formats (Planned)
  • MD5 - Animations and all
  • OBJ
  • FBX
  • Collada - We intend to use [JCollada](http://javacollada.sourceforge.net/)
  • Blend - In the very far future, as a tech demo (it would be very hard)

Behold the power of the higher level!


Lambdas:
1  
2  
3  
4  
public GLBuffer getMyBuffer(){
    int buffer = GL15.glGenBuffers();
    return () -> buffer;
}


Texture Loading into WebGL, JOGL, and LWJGL all at once!
1  
2  
3  
4  
// GLFTextureImage2D is a group of functions that represent an OpenGL texture that supports Image2D.
// It's class extends from GLFTexture, with defines basic functions like bind and delete
// Containers implement these functions as a sign of what their library supports (some libraries might not support GLFTextureImage3D for example)
TextureLoader.load(GLFTextureImage2D, InputStream)
1  
2  
3  
4  
// LWJGL's textures, as well as WebGL, JOGL and everything else supports Image2D, so their supported in their containers:
GLTextureContainer lwjglTexture = new GLTextureContainer(LWJGLTextures.createTexture())
JGLTextureContainer joglTexture = new JGLTextureContainer(JOGLTextures.createTexture())
WGLTextureContainer webTexture = new WGLTextureContainer(WGLTextures.createTexture())
1  
2  
3  
TextureLoader.load(lwjglTexture, new FileInputStream(...));
TextureLoader.load(joglTexture, new FileInputStream(...));
TextureLoader.load(lwebTexture, new FileInputStream(...));


What we're working on now is just that but with 3D models persecutioncomplex

More examples to come.

Offline Ecumene

JGO Kernel


Medals: 200
Projects: 4
Exp: 8 years


I did not hit her! I did not!


« Reply #1 - Posted 2016-05-29 15:55:41 »

Some information about helping with the project:

If you're interested and have some good insight on features, create an issue on either the io or main repository or simply make a pull request! If you're interested in making pull requests like that more frequent, email me to be added to the github team: mitchell.hynes@ecumene.xyz

Offline Hydroque

JGO Coder


Medals: 25
Exp: 5 years


I'm always inspiring a good time.


« Reply #2 - Posted 2016-05-31 02:39:49 »

A framework or a wrapper?

You think I haven't been monitoring the chat? http://pastebin.java-gaming.org/c47d35366491fHere is a compilation <3
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Ecumene

JGO Kernel


Medals: 200
Projects: 4
Exp: 8 years


I did not hit her! I did not!


« Reply #3 - Posted 2016-05-31 18:11:01 »

A framework or a wrapper?

Those are some very arbitrary definitions, but I'm guessing a wrapper and framework?

It depends. In the main repository (jgloom) you've got OpenGL objects wrapped into interfaces and containers for manipulating them, then in the other (jgloom-io) it's more like a framework for loading file formats and selecting draw call methods, stuff like that (which is not currently being worked on). This thread is mainly a placeholder till we can get our Travis-CI server setup and github wiki, seeing if anyone's interested.

Offline Hydroque

JGO Coder


Medals: 25
Exp: 5 years


I'm always inspiring a good time.


« Reply #4 - Posted 2016-05-31 20:03:10 »

My concern here is you are wrapping and acting like it's a framework. I think the goal should be a framework directly editing the wrapper that is lwjgl.

You think I haven't been monitoring the chat? http://pastebin.java-gaming.org/c47d35366491fHere is a compilation <3
Offline Ecumene

JGO Kernel


Medals: 200
Projects: 4
Exp: 8 years


I did not hit her! I did not!


« Reply #5 - Posted 2016-05-31 20:27:48 »

My concern here is you are wrapping and acting like it's a framework. I think the goal should be a framework directly editing the wrapper that is lwjgl.

The issue here is that OpenGL was made for C, all their objects are pointed with integers. I wanted to "wrap" them with interfaces so they become more object oriented and you can manipulate them easier, as well as extend from their type. Effectively creating an open-standard that people can use although if they want features like tracking a texture parameter they can for example code that into a "manipulator" or container. For ease of use I also bundle my own example containers into the library accommodating the interfaces, it's even in it's own package
jgloom.common.*


If anything it's more of a "wrapper". But has framework capabilities in a separate package. So they can be both.

Offline Hydroque

JGO Coder


Medals: 25
Exp: 5 years


I'm always inspiring a good time.


« Reply #6 - Posted 2016-05-31 22:26:51 »

I see, but this would be perfect to include bundled with lwjgl ie extending it.

You think I haven't been monitoring the chat? http://pastebin.java-gaming.org/c47d35366491fHere is a compilation <3
Offline Ecumene

JGO Kernel


Medals: 200
Projects: 4
Exp: 8 years


I did not hit her! I did not!


« Reply #7 - Posted 2016-05-31 22:55:00 »

I see, but this would be perfect to include bundled with lwjgl ie extending it.

It makes more sense to have it as a higher-level library, LWJGL is supposed to encompass bindings (not wrappings) to OpenGL, OpenCL, and OpenAL.

Offline ags1

JGO Kernel


Medals: 367
Projects: 7


Make code not war!


« Reply #8 - Posted 2016-05-31 23:42:07 »

A framework or a wrapper?

What is the sound of one hand clapping?

Offline basil_

« JGO Bitwise Duke »


Medals: 418
Exp: 13 years



« Reply #9 - Posted 2016-06-01 14:19:52 »

snap
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Ecumene

JGO Kernel


Medals: 200
Projects: 4
Exp: 8 years


I did not hit her! I did not!


« Reply #10 - Posted 2016-06-16 19:40:55 »

Update!

I wrote an issue on the github page explaining a feature on how JGLOOm can load file formats for WebGL, LWJGL, JOGL, and many other libraries seamlessly (write once run anywhere).
https://github.com/team-jgloom/jgloom/issues/34

It will be in JGLOOm 1.0 and after it, OpenGL query object support will follow, then the backbone for OBJ loading in JGLOOm 1.3.

Offline Ecumene

JGO Kernel


Medals: 200
Projects: 4
Exp: 8 years


I did not hit her! I did not!


« Reply #11 - Posted 2016-07-08 23:52:07 »

Another update!

We've finished implementing the GL function groups into interfaces, but it can be greatly improved to help set a better standard for file loading in Java OpenGL. We currently support all the primary image formats including TIFF, and we plan to support all the popular 3D model formats once me and zach decide on a good standard persecutioncomplex

1.0 is "technically" finished now, but the standard can change if we see fit and we're moving onto 1.1 which include these features:
  • Model formats MD5, OBJ, Collada (partially and through JCollada), FBX, and Blend (also partially, and probably in a later version too)
  • JOGL port

We also plan to port to WebGL4J, LWJGL 2, and other libraries.

Offline orange451

JGO Kernel


Medals: 544
Projects: 8
Exp: 8 years


Your face? Your ass? What's the difference?


« Reply #12 - Posted 2016-07-14 06:01:50 »

Pretty interesting project. Good luck with it!

First Recon. A java made online first person shooter!
Offline ziozio
« Reply #13 - Posted 2016-07-15 03:57:23 »

I see you support ImageIO for the image decoding. This is a project that creates its own plugins for the ImageIO repository

https://github.com/haraldk/TwelveMonkeys

They write the own versions of the standard supported image file formats and they extend to many other formats. I would give this a thumbs up for people to use, the plug in's are much better than the basic ones you get in Java (some of which have had no development for a very long time)

Offline Ecumene

JGO Kernel


Medals: 200
Projects: 4
Exp: 8 years


I did not hit her! I did not!


« Reply #14 - Posted 2016-07-15 04:17:08 »

They write the own versions of the standard supported image file formats and they extend to many other formats. I would give this a thumbs up for people to use, the plug in's are much better than the basic ones you get in Java (some of which have had no development for a very long time)

Thanks!

I'll make an issue for adding it, we may just have a separate class specifically for loading TwelveMonkey's ImageInputStreams called
TMTextureLoader#loadTexuture(GLFTextureImage2D, ImageInputStream)


EDIT: Here's the issue if anyone want's to track it's progress: https://github.com/team-jgloom/jgloom/issues/49

Offline Ecumene

JGO Kernel


Medals: 200
Projects: 4
Exp: 8 years


I did not hit her! I did not!


« Reply #15 - Posted 2016-07-15 04:27:58 »

Pretty interesting project. Good luck with it!

Thanks! It's still in it's early development cycle and we're progressing very very slowly. I'm updating the JGO thread to contain the new info about how it will load file formats for every Java OpenGL library out there, and do it well.

I'd love some fake Github internet points if you like the project persecutioncomplex

Offline Ecumene

JGO Kernel


Medals: 200
Projects: 4
Exp: 8 years


I did not hit her! I did not!


« Reply #16 - Posted 2016-07-15 04:36:04 »

Bam! Thread is updated.

Offline Hydroque

JGO Coder


Medals: 25
Exp: 5 years


I'm always inspiring a good time.


« Reply #17 - Posted 2016-07-16 03:57:49 »

Why is there no support for XM files?

You think I haven't been monitoring the chat? http://pastebin.java-gaming.org/c47d35366491fHere is a compilation <3
Offline SHC
« Reply #18 - Posted 2016-07-16 06:20:09 »

Why is there no support for XM files?

How did you think that it is popular formats?

Offline HeroesGraveDev

JGO Kernel


Medals: 383
Projects: 11
Exp: 4 years


┬─┬ノ(ಠ_ಠノ)(╯°□°)╯︵ ┻━┻


« Reply #19 - Posted 2016-07-17 05:53:20 »

Why is there no support for XM files?

I think you know the answer to that question, even if you don't want to admit it.

Offline Ecumene

JGO Kernel


Medals: 200
Projects: 4
Exp: 8 years


I did not hit her! I did not!


« Reply #20 - Posted 2016-07-17 16:03:50 »

Why is there no support for XM files?

We don't have an OpenAL implementation in yet, if you're talking about the Fasttracker file. If it's some sort of graphics file, you can certainly implement it yourself once issue #38 and #35 is finished!

https://github.com/team-jgloom/jgloom/issues/35
https://github.com/team-jgloom/jgloom/issues/38

Offline Hydroque

JGO Coder


Medals: 25
Exp: 5 years


I'm always inspiring a good time.


« Reply #21 - Posted 2016-07-18 07:08:27 »

... You're serious ...

You think I haven't been monitoring the chat? http://pastebin.java-gaming.org/c47d35366491fHere is a compilation <3
Offline Opiop
« Reply #22 - Posted 2016-07-18 12:44:15 »

Hydroque can you do something other than turning every thread into something about you/derailing? Thanks.

@Ecumene, clever idea! Would be very handy.
Offline Ecumene

JGO Kernel


Medals: 200
Projects: 4
Exp: 8 years


I did not hit her! I did not!


« Reply #23 - Posted 2016-08-12 03:54:12 »

JGLOOm has an official webpage now, if anyone wants to contribute we're looking for good documentation writers! You'll have your name on the home-page.

http://jgloom.org/

EDIT: We also need help in porting the (non-existant...) loaders to Vulkan, this wouldn't be too hard to accomplish, as we only have to write the wrappers for LWJGL. ( Unless someone knows where I can find some other java library supporting vulkan )

Offline gouessej
« Reply #24 - Posted 2016-08-12 13:56:57 »

I see you support ImageIO for the image decoding. This is a project that creates its own plugins for the ImageIO repository

https://github.com/haraldk/TwelveMonkeys

They write the own versions of the standard supported image file formats and they extend to many other formats. I would give this a thumbs up for people to use, the plug in's are much better than the basic ones you get in Java (some of which have had no development for a very long time)


I confirm that TwelveMonkeys is quite reliable and efficient, some plugins support some image formats not supported by ImageIO (ICO, ...). However, it means that JGLOOm has no chance to load images where Swing and AWT aren't available unlike JOGL 2 which contains its own decoder for several image formats including PNG.

Julien Gouesse | Personal blog | Website | Jogamp
Offline Ecumene

JGO Kernel


Medals: 200
Projects: 4
Exp: 8 years


I did not hit her! I did not!


« Reply #25 - Posted 2016-08-12 20:09:43 »

I confirm that TwelveMonkeys is quite reliable and efficient, some plugins support some image formats not supported by ImageIO (ICO, ...). However, it means that JGLOOm has no chance to load images where Swing and AWT aren't available unlike JOGL 2 which contains its own decoder for several image formats including PNG.

Good point! I had plans to make the default "TMImageDecoder" (Previously ImageDecoder) a singleton, and have all TextureLoader contain a 'ImageDecoder' interface that responds to InputStreams (Resource Interface) with FloatBuffers. They all select the TMImageDecoder as the default.

I'm not sure what this pattern is called, but it's a sort of hybrid between a singleton and a regular object, there's still one static instance but other instances can be made... ( They could both be singletons, Idk )

Offline Ecumene

JGO Kernel


Medals: 200
Projects: 4
Exp: 8 years


I did not hit her! I did not!


« Reply #26 - Posted 2016-08-12 20:38:14 »

Okay, I made a new issue! Thanks gouessej!

https://github.com/team-jgloom/jgloom/issues/61

Offline gouessej
« Reply #27 - Posted 2016-08-12 22:52:57 »

You're welcome.

Your utility to create NIO buffers creates only direct NIO buffers but you provide no mean of releasing their native memory. I advise you to read my answer on SO. My very last suggestion under a permissive license would allow you to solve this problem (I don't suggest you to use my source code as the license I use is incompatible with yours).

Julien Gouesse | Personal blog | Website | Jogamp
Offline Ecumene

JGO Kernel


Medals: 200
Projects: 4
Exp: 8 years


I did not hit her! I did not!


« Reply #28 - Posted 2016-08-15 02:24:02 »

The site is finished! (Except for a little animation I had planned for the bottom) The wiki was made with Jekyll, and so was the homepage.

Here's the two themes I used:
https://startbootstrap.com/template-overviews/freelancer/
https://github.com/Wiredcraft/carte

http://www.jgloom.org


Offline Catharsis

JGO Ninja


Medals: 76
Projects: 1
Exp: 21 years


TyphonRT rocks!


« Reply #29 - Posted 2016-08-15 03:52:51 »

Perhaps take a look at assimp / jassimp or consider incorporating it:
assimp
jassimp

Crazy! 40 formats supported, but no XM!

Edit: Oh yeah... Check out glTF as a prime format to support!

Check out the TyphonRT Video Suite:
http://www.typhonvideo.com/

Founder & Principal Architect; TyphonRT, Inc.
http://www.typhonrt.org/
http://www.egrsoftware.com/
https://plus.google.com/u/0/+MichaelLeahy/
Pages: [1] 2 3
  ignore  |  Print  
 
 

 
Riven (204 views)
2019-09-04 15:33:17

hadezbladez (4941 views)
2018-11-16 13:46:03

hadezbladez (1820 views)
2018-11-16 13:41:33

hadezbladez (5218 views)
2018-11-16 13:35:35

hadezbladez (1028 views)
2018-11-16 13:32:03

EgonOlsen (4402 views)
2018-06-10 19:43:48

EgonOlsen (5235 views)
2018-06-10 19:43:44

EgonOlsen (2977 views)
2018-06-10 19:43:20

DesertCoockie (3879 views)
2018-05-13 18:23:11

nelsongames (4311 views)
2018-04-24 18:15:36
Java Gaming Resources
by philfrei
2019-05-14 16:15:13

Deployment and Packaging
by philfrei
2019-05-08 15:15:36

Deployment and Packaging
by philfrei
2019-05-08 15:13:34

Deployment and Packaging
by philfrei
2019-02-17 20:25:53

Deployment and Packaging
by mudlee
2018-08-22 18:09:50

Java Gaming Resources
by gouessej
2018-08-22 08:19:41

Deployment and Packaging
by gouessej
2018-08-22 08:04:08

Deployment and Packaging
by gouessej
2018-08-22 08:03:45
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!