jzy3d / jgl Goto Github PK
View Code? Open in Web Editor NEWA pure Java implementation of OpenGL
A pure Java implementation of OpenGL
I did not find yet a way to cleanly pass pixels to jGL (see my code mess in EmulGLPainter.glDrawPixels).
Moreover : rendering an image with a viewport discard the ability to render something else in another viewport.
For the moment I skipped the traditional GL approach and replaced with AWT image rendering in
GL.appendImageToDraw(BufferedImage image, int x, int y)
Occurs on : Mac OS Catalina (10.15.3) / Intel Iris Graphics 6100 1536 Mo / JDK 11.0.4 / Jzy3d 2.0
Does not occur on : Mac OS Sierra (10.12.6) / Intel HD Graphics 4000 1536 Mo / AdoptOpenJDK 14 / Jzy3d 2.0
See this suggestion to use a JVM based font rendering to avoid portability issues.
Functions like glutDisplayFunc
that accepts callback function name as an argument could have overloaded counterparts that accept lambda as an argument.
I.e. instead of
public void glutDisplayFunc(String func)
one could have public void glutDisplayFunc(Callable func)
- this would increase performance (of course marginally) and code readability due to IDE code navigation support
when invoking gl.glColor4f( any, any, any, 0f) for a set of polygons, they appear completely black
when involking with an intermdiate alpha value such as 0.5f, the polygons appear darker
I found out that the color buffer contains black translucent pixels where nothing is drawn, and black opaque pixels where polygons should be drawn.
The following surface has alpha values = 1, GL Alpha test and blending are disabled using a Jzy3d Quality
< Advanced
, e.g. Intermediate
or Fastest
.
This does not occur with Alpha test and blending enabled with Quality.Advanced
.
Polygon offset fill - a trick to avoid this kind of glitch - is not supported yet by jGL.
Polygon Offset Fill was added to OpenGL 2 Specification (https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glPolygonOffset.xhtml) while jGL implements OpenGL 1. There is thus a need to implement offset filling.
When integrated into Jzy3d, hence rendering multiple frames, the frames overlap despite clearing the colorbuffer between each frame with
glClearColor(white)
glClear(GL_GL_COLOR_BUFFER_BIT)
Moreover, the background of the rendered image remains translucent instead of being reset with the background color.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.