Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (499)
Games in Android Showcase (118)
games submitted by our members
Games in WIP (567)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Modern3D: low-level shader-centric 3D graphics library  (Read 3520 times)
0 Members and 1 Guest are viewing this topic.
Offline jezek2
« Posted 2009-10-23 04:59:47 »

Modern3D is low-level 3D graphics library (similar to OpenGL or Direct3D) written in Java. It's entirely shader centric, this means you set the shader, its inputs, how it interacts with frame buffer, setup geometry and draw. No fixed functionality is present except things that are not covered by shaders (like blending). There are no matrices stacks, it's entirely on you what inputs you feed into your shaders.

Features

  • easy to use low-level object oriented API, can be compared to OpenGL/Direct3D level
  • shaders are written in Cg language and precompiled (no Cg runtime required for your application)
  • currently supports Shader Model 2.0 and 2.0a/2.0b
  • uses OpenGL 1.4 with extensions for actual HW access (through LWJGL)
  • there is only one way to access HW features (like using VBOs exclusively)
  • geometry utilities for drawing primitives immediatelly (own implementation that uses VBOs) or for storing for later usage
  • provides Java2D API implementation that allows advanced 2D drawing (including text and non-trivial vector shapes)
  • utility classes for matrix stacks handling
  • support for conversion to and from half data type (16bit float)
  • batched geometry builder class for easy to use generation of optimized static geometry
  • open source, distributed under BSD license

Notes

  • currently only SM 2.0 and 2.0a/2.0b are supported, more profiles will be available in future
  • fixed function pipeline support (implemented as special "shader") is also considered for some future version
  • GLSL is currently unsupported, but will be added in some future version (using both runtime compilation and pre-compilation using Cg compiler)
  • it's currently using only OpenGL through LWJGL, but due to modular implementations it could use JOGL or even Direct3D when some binding for it will emerge
  • drawing of arbitrary shapes has antialiasing disabled currently, there is proof of concept implementation that can be enabled in sources
  • not all blend operators using Java2D API are correctly working
  • some less used features are currently missing (such as 3D textures)

You can download it on Modern3D homepage.
Offline gouessej
« Reply #1 - Posted 2009-10-23 21:56:32 »

It seems interesting, I'm going to look at your library now. Thanks.

Edit.: I don't know whether it would be difficult to use it with JOGL 2 and GLSL.

Online Nate

JGO Kernel


Medals: 148
Projects: 4
Exp: 14 years


Esoteric Software


« Reply #2 - Posted 2009-10-24 06:45:32 »

Sounds cool! It is definitely on my list to check it out.

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline CommanderKeith
« Reply #3 - Posted 2009-10-24 13:53:56 »

Sounds very interesting, the Java-2D alike API is a good idea. It'd be cool to see some demos of what it can do.

Offline zeyous

Junior Member


Projects: 1



« Reply #4 - Posted 2009-10-25 20:30:23 »

Wow dude that is awesome. The only way to have good performance these days with modern GPU is to use Shaders. We definitively need library like this.

What performance boost did you measure using Modern3d for Java2D drawing ?
Do you plan to support Geometric shaders ?

I'll rewrite sooner or later my 3d engine using shaders, I draw graphs, nothing complicated expect thousands of thousands lines and spheres, your library could be a great help !

Thanks again, great job !

Offline jezek2
« Reply #5 - Posted 2009-10-25 21:06:34 »

Wow dude that is awesome. The only way to have good performance these days with modern GPU is to use Shaders. We definitively need library like this.

While shaders can be used to some performance boost from fixed function pipeline (which is emulated using shaders on "modern" shader capable cards), it's mainly about different way of rendering and having much more freedom.

What performance boost did you measure using Modern3d for Java2D drawing ?

The arbitrary shape rendering in Java2D is pretty much "incompatible" with how 3D accelerators works, the geometry needs to be tesselated into triangles, or use bruteforce approach using stencil buffer. Modern3D uses the latter as polygon triangulation is very hard to be working for every case and also the time spent on triangulation can be slower than using bruteforce approach. This means there is probably not much good performance improvement against optimized software rendering, but the advantage is that for rendering such shapes you don't have to stall the GPU pipeline or even upload tons of data each frame from software renderer.

Do you plan to support Geometric shaders ?

Yes, at some point in future. But as I don't have HW to test on (have GF6600GT on AGP 4x) and it's highly unlikely I will upgrade in year or two, the support would be needed to be done by someone else.
Offline jezek2
« Reply #6 - Posted 2010-03-25 17:15:01 »

New version available on Modern3D homepage.

Changes in release 20100325:
- Fixed issue with broken characters
- Added clamping when drawing images
- Fixed compilation under Java 5
- Fixed setting of depth mask when clearing depth buffer
- Added TextureRect and Texture3D
- Fixed compiling of shaders when constant registers are explicit
- Fixed issue when not all vertex arrays are used in shader
- Added support for LUMINANCE8 and ALPHA8 textures for BufferedImages
- Fixed drawing of transformed fonts
- Added common API for external image flushing
- Added auto generation of NameID constants
- Added SHDC define so shaders can detect if they're processed using shdc
- Added support for 64bit on Windows for shdc
- Other bug fixes
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Pippogeek (36 views)
2014-09-24 16:13:29

Pippogeek (29 views)
2014-09-24 16:12:22

Pippogeek (18 views)
2014-09-24 16:12:06

Grunnt (41 views)
2014-09-23 14:38:19

radar3301 (24 views)
2014-09-21 23:33:17

BurntPizza (60 views)
2014-09-21 02:42:18

BurntPizza (30 views)
2014-09-21 01:30:30

moogie (35 views)
2014-09-21 00:26:15

UprightPath (48 views)
2014-09-20 20:14:06

BurntPizza (52 views)
2014-09-19 03:14:18
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
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!