Giter VIP home page Giter VIP logo

glscene / glscene Goto Github PK

View Code? Open in Web Editor NEW
202.0 14.0 31.0 146.32 MB

GLScene is a graphics engine based on OpenGL with VCL components for Delphi & C++ Builder.

Home Page: http://www.glscene.org

License: Mozilla Public License 2.0

Pascal 98.91% C 0.02% Batchfile 0.03% HTML 0.07% CSS 0.08% GLSL 0.29% TypeScript 0.61%
graphics-engine delphi-components mesh-processing glscene opengl cpp-components

glscene's Introduction

GLScene

GLScene is a graphics engine based on OpenGL and VCL components for Delphi & C++ Builder. It provides the class library and tools for rendering 3D scenes with spatial objects, free forms and virtual smart actors.
Additional components are being developed for meshing, gridding, lacing with shaders, audio and physics applications

GLS Team

glscene's People

Contributors

geoblock avatar glscene avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

glscene's Issues

FIX 64 BUILD

File Imports.ODE.pas line 83
{$IFDEF WIN664} ------>>>> {$IFDEF WIN64}

Problems in several text formats reading Floats in non-US regional settings

Hi Pavel!

I have sarted to try the GLTF import. Generating the GLTFs from Blender objects (native export to GLTF 2.0) I'm unable to import none of the examples I had into GLScene.

Of course I have added the GLS.FileGLTF and GLS.FileGLB in the uses clause, but I keep receiving the classical message:

image

I'm using the last code you pointed in: https://github.com/GLScene/GLScene/blob/master/Source/GLS.FileGLTF.pas

By the way, this unit shouldn't register 'gltf' extension instead of re-registering 'glb'? The original code in GLS.FileGLTF registers this:

RegisterVectorFileFormat('glb', 'Binary glTF files', TGLTFVectorFile);

If you have other models or other sources I can help on testing with GLTF please share them with me.

GLTF imports would natively accept animations too, right?

I've found in several Units conversions using StrToFloatDef that are going to fail when system is non in US locale. Do you want me to help by adding them the fs.DecimalSeparator := '.' used in FileSMD?

Regards, Pablo.

Advanced Demo "Earth" range check errors with software rendering.

The advanced demo "earth" in the folder "..\GLScene\AdvDemos\Earth" produces range check errors with software rendering.

To turn software rendering on use the object inspector and navigate to the following property:

GLSceneViewer.Buffer.ContextOptions.roSoftwareMode checkbox True.

It would be great if these range check errors and integer overflow errors could be solved so that software rendering mode works too.

SMD Actors not loading (it seems since V2.x)...

I have recently moved to V2.2 and some previous projects I had with *.smd objects are not loaded now. It doesn't generate any specific exception but none of them (I tested at least 5 models) is loaded.

It can easily be reproduced with the mesehs/SlkeletaD demo. The actor "Trinity" that used to be shown here is now a single point. The same happens with all others I have tested...

Many thanks for any help.

Gaps between terrain tiles for LOD mesh

There was a bugfix by Lin almost 15 years ago in the unit GLROAMPatch:

09/10/06 - Lin - Added OnMaxCLODTrianglesReached event.
09/06/06 - Lin - Bugfix: Stop splitting Triangles when MaxCLODTriangles is reached (prevents Access Violations)

and after this an improvement somewhere appeared gaps like in applied screen for Advdemo\Forest.
A minor fix was done 10 years ago but for deep slope the bug remains.
GapsInMesh

There is an urgent need to edit and fix it.

Backface culling not working properly.

I found this dataset first because I was searching for JSON file format:

https://github.com/martynafford/natural-earth-geojson

It seems to be a conversion of version 4 of this github repository, but I am running into a problem:

I am trying to render polygon lines in such a way that only the front of the sphere/globe is showing, but some parts of the backside is also showing, I am not sure why this is, perhaps an issue with the input data ? or perhaps the conversion process ? or perhaps some issue with GLScene or OpenGL ?

https://youtu.be/stQoXVrZgtA

I could try and read the dbf file to see if these backface culling problems are caused by the conversion, or if this is simply part of this dataset, and I will try and use version 5.

Any advise on what you think is the problem would be great.

How to disable the GLScene navigators?

Helooo,

I need to disable the GLScene Navigators at specific times, like when using the Mouse Scroll wheel button over a component, but the navigators doesnt have an enable property. I have tried

OnMouseEnter

SceneNavigation.Form := Form1;

OnMouseLeave

 SceneNavigation.Form := nil;

As well as OnMouseEnter

SceneNavigation.GLSceneViewer := DefaultScene;  // TGLSceneViewer

and OnMouseLeave

 SceneNavigation.GLSceneViewer := nil;  

Neither of those methods does not stop the mouse scroll button from zooming the scene when over a component.

Can we get an Enabled property for the Navigators?

Refactor installation documentation to remove duplication of identical but, currently, mismatched steps

The installation document Installation.pdf contains two nearly identical sections describing the installation of GLScene, one starting on page 1 and the other starting on page 4 with the last one containing additional information pertaining to the installation of the "AdvDemos Earth" demo.

Having commonality duplicated not only leads to unnecessarily having to maintain both of the commonalities but can lead to them becoming out-of-sync with each other, which has actually happened as demonstrated by differences in the installation steps, for example, one section refers to the same step, but at a different step number, using "compile all from here" in the text while the other refers to the same thing using a screenshot highlighting "build all from here" instead. This not only results in the sections being inconsistent and out-of-sync with each other, but may lead to confusion to the reader.

Suggest refactoring the document by merging the installation instructions from both sections turning it into one set of steps only with the section following this only describing the installation steps necessary for the demo.

License differs from original

For some reason the license has been changed from the original GLScene license which used MIT 1.1. It is now MIT 2.0. Is this change correct/legal?

Assigning a material library to a TGLFreeForm

Hi,

I have loaded a TGLFreeForm component with a 3ds file, used a TGMaterialLibrary to store the 3ds materials.
I have also created another Material Library with grey scale versions of the 3ds materials, but I can't assign this material library to the FreeForm.

This works with the Material Library assigned to the FreeForm (GLS_Icon) when the 3ds file is loaded :

procedure TForm1.Button2Click(Sender: TObject);
  begin
    GLScene1.BeginUpdate();
     
    GLS_Icon.MaterialLibrary := NormalMaterials; //Materials created when loading the 3ds file.
   
    GLCone1.Material.MaterialLibrary := NormalMaterials;

    GLScene1.EndUpdate();
  end;  

image

This doesn't work with the designtime created material library:

procedure TForm1.Button1Click(Sender: TObject);
  begin
    GLScene1.BeginUpdate();

    GLS_Icon.MaterialLibrary := DisabledMaterials; //The designtime library with grey scale versions of the NormalMaterials

    GLCone1.Material.MaterialLibrary := DisabledMaterials;

    GLScene1.EndUpdate();
 end;

image

Any hints would be helpful.

Cheers.

The File "License.txt" in the Help directory is not consistent with the MPL v2.0 license

In reviewing the source code for licensing we found that the interpretation of the Mozilla Public License Version v2.0 (MPL v2.0) license in the Help Directory "License.txt" file is not consistent with the actual MPL v2.0 license it is supposed to be simplifying where it states in part: "...GLScene is distributed under Mozilla Public Licence (MPL 2.0), which means, in short, that it is free for both freeware and commercial use. The code is still copyrighted (in that it isn't public domain), but you can use it in products with closed or open-source freely. The only requirements are:

  • Acknowledge GLScene is used somewhere in your application (in an about box, credits page or printed manual, etc.
    with at least a link to http://glscene.org or https://github.com/glscene)
  • Modifications made to GLScene units must be made public (no need to publish the full code, only to state which parts were altered, and how), but feel welcome to open-source your code if you so wish."

The Mozilla Public License Version v2.0 license requires (in Sections 3.1 and 3.2) that anyone who modifies the original source code to do the following things upon distribution of the executable form of the code:

  1. license the modification under the MPL v2.0 license,
  2. redistribute the source source code by having it accompany the delivery, or
  3. providing notice to the recipient about how they can obtain a copy of the source code that makes up the modified executable.

We would appreciate your clarification of this discrepancy and actions to alleviate any future misunderstandings.
Please reply to myself Dr-Wood through the GitHub users link
Thank you
Chris

TGLBaseSceneObject.PointTo method apparently with wrong behaviour

When using the TGLBaseSceneObject.PointTo method with the target coordinate positioned in the same orientation that the up vector, the object does not become properly aligned. In different orientations it works fine.

The same proposal TGLCamera.RotateObject method works perfectly.

May be, they could be merged in just one method.

I builded a little demo showing the problem.
Just click in the button 'Reproduce problem (wrongly aligned beam)'.

problem_reprodution_delphi.zip

Rotation on move around target

I'm just wondering why camera move around target can rotate more that 360 degres left and right but only 180 degrees up and down? Is this a OpenGL limitation or a GLScene oversight?

MaxInt is non-platform-adjustable, example: Array indexes limited to 32 bits shr 4

Examples of code:

I am not sure if this is an actual limitation. Since maybe these arrays allocated dynamically.

I am currently busy trying to declare an array type, purely for debugging purposes.

A typed pointer only cannot be debugged easily in the way of an array, so I was hoping that GLScene would give a nice example of how to declare it but then I ran into this and discovered this potential limitation.

I am not sure what the real/current limitation is of arrays in Delphi 10.3.2, which is what I am using.

Anyway, perhaps this is something that should be looked into.

I at least looked into MaxInt and it says 2 billion on win32 and win64 platform and the latter is maybe incorrect and a problem.

const
cMaxArray = (MaxInt shr 4);

(* Types to specify continous streams of a specific type
switch off range checking to access values beyond the limits *)
PByteVector = ^TByteVector;
PByteArray = PByteVector;
TByteVector = array [0 .. cMaxArray] of Byte;

PWordVector = ^TWordVector;
TWordVector = array [0 .. cMaxArray] of Word;

PIntegerVector = ^TIntegerVector;
PIntegerArray = PIntegerVector;
TIntegerVector = array [0 .. cMaxArray] of Integer;

PFloatVector = ^TFloatVector;
PFloatArray = PFloatVector;
PSingleArray = PFloatArray;
TFloatVector = array [0 .. cMaxArray] of Single;
TSingleArray = array of Single;

Obselete units

Not really an issue, but, more for information. I have GLScene V2.01 and was wondering which GLScene units are now obselete? CrossPlatform seems to be one, and, Opengl1x? & Opengl2x? don't seem to exist anymore. What units has this data been moved into?

Thanks.

cg.dll now required in main package?

Hi Pavel!

Current version is 2.3, right? Because GitHub still shows 2.2 as the version, but when you run the Delphi IDE it says 2.3...

I think that starting on V2.2, some features in GLScene_RT.bpl started to require a library that previously was not necesssary for the basic package:

image

In the _setupDLL.cmd is described as an NVidia library:

echo Copying nVidia CG DLLs
rem win32
copy "%~dp0cg.dll" %SystemRoot%\SysWOW64
copy "%~dp0cgGL.dll" %SystemRoot%\SysWOW64
rem win64
copy "%~dp0cg.dll" %SystemRoot%\System32
copy "%~dp0cgGL.dll" %SystemRoot%\System32\

In fact I don't have any NVidia GPU (this is a notebook running on Intel) and it started to require that dll. If you register it the GLScene based code works OK, but previously there wasn't any dependency on external libraries an now it is. Just to confirm: if I run the same program, but compiled the last year (with V2.0 of GLScene I believe) it doesn't require this external .dll

Is it the cg.dll striclty required or there appeared some imported function that it has to map and in fact it could be non-dependant as before?

Regarding the GLTF files: are they working? If you try to import a the Cube.GLTF or any of the 3 samples provided, in the GLSViewerD you always get:

image

And there isn't any GLS.FileGLD unit to add...

Many thanks in advance! Regards, Pablo.

In the GLScene v2.3 Software a NVIDIA Proprietary License was found in the "ScalarProduct-kernel.cu" file

Hello again: During licensing review we discovered that there is a proprietary NVIDIA license in the software named above. Because of this we cannot use your software. The Scalar sub-directory contains 5 files all with the word "Scalar" in the filename, most likely indicating that they are also NVIDIA-developed code.

The path to the file is: GLScene-master.zip\GLScene-Master\Examples\Demos\computing\ScalarProduct\ScalarProduct-kernel.cu.

Because these files are considered Proprietary by NVIDA and cannot be used without a license they would likely be a risk for your product to retain unless you have a specific license grant from NVIDIA. If that is the case and you do have such a license grant then you might want to include that document in the ScalarProduct folder. To keep your distribution compliant with the licensing and as more organizations begin performing open-source code scanning to generate SBOMs you may want to consider removing this "example" sub-directory.

The license text is:
/*

  • Copyright 1993-2009 NVIDIA Corporation. All rights reserved.
  • NVIDIA Corporation and its licensors retain all intellectual property and
  • proprietary rights in and to this software and related documentation.
  • Any use, reproduction, disclosure, or distribution of this software
  • and related documentation without an express license agreement from
  • NVIDIA Corporation is strictly prohibited.
  • Please refer to the applicable NVIDIA end user license agreement (EULA)
  • associated with this source code for terms and conditions that govern
  • your use of this NVIDIA software.

*/

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.