Re: [fpc-pascal] GLM library alternative?

2017-05-30 Thread Marco van de Voort
In our previous episode, Ingemar Ragnemalm said: > BTW, when I ported my OpenGL demos to FPC, I found that the FPC glext.pp > had some fatal bugs. (Easy to fix, but I never figured out who would > want the corrections, so I hope someone else noted that it crashed for > modern OpenGL.) Well,

Re: [fpc-pascal] GLM library alternative?

2017-05-30 Thread Anthony Walter
I've done a bit of assembly programming for IA-32, none recently and zero compiler development other than simple parsers, but from what I know optimizing with newer instructions like SSEx is only part of there story. There's also optimizing for out of order instruction execution (OoOIE), or

Re: [fpc-pascal] GLM library alternative?

2017-05-30 Thread code dz
tested with the fpc trunk , got only 3 fps increased . but even with this result fpc does great job , compared with gcc7 , gcc is faster only about 45% . so when compared with a compiler like gcc which get tens of patches par day from from around the world including big companies like sumsung .

Re: [fpc-pascal] GLM library alternative?

2017-05-30 Thread Graeme Geldenhuys
On 2017-05-29 12:24, Mattias Gaertner wrote: Jonas told that the benchmark program contains a number of bugs/wrong translation from the C code: And all of those recommendations were applied by Jon Foster and yielded only a 0.6% increase in speed. "I ended up with an hour of extra time so I

Re: [fpc-pascal] GLM library alternative?

2017-05-30 Thread Graeme Geldenhuys
On 2017-05-30 14:52, Ingemar Ragnemalm wrote: so I hope someone else noted that it crashed for modern OpenGL.) Huh? I've been using it for 4 months with "modern OpenGL 4.x" (non-fixed rendering pipeline) and it hasn't crashed on me. Next time it crashes, please supply a small code example

Re: [fpc-pascal] GLM library alternative?

2017-05-30 Thread Ingemar Ragnemalm
Den 2017-05-30 kl. 12:00, skrev Marco van de Voort: For the 2Ders, in old GL I used glortho2d a lot. In newer ones I missed that, but I found an equivalent on stackoverflow: My FPC vector unit has overloading and many other functions (determinant, rotation around arbitrary axis...). Some

Re: [fpc-pascal] GLM library alternative?

2017-05-30 Thread Reimar Grabowski
On Mon, 29 May 2017 14:07:40 -0400 Anthony Walter wrote: > By the way, what's stopping you guys from using OpenGL ES 2.0? It's ten years old, the current ES version is 3.2. It has less functionality than "standard GL" as it's meant for embedded systems (hence ES). R.

Re: [fpc-pascal] GLM library alternative?

2017-05-30 Thread Marco van de Voort
In our previous episode, Anthony Walter said: > > This type of 2D setup in OpenGL allows for allows you to freely mix in both > 2D and 3D effects. Here's are two examples of how 2D in a 3D world can work: If you check the myorthohelp function that called it, you'll already see it is normalized

Re: [fpc-pascal] GLM library alternative?

2017-05-30 Thread Anthony Walter
Marco, Regarding 2D animation, what I've far far more effective than an orthographic projection is to draw 2D billboard sprite at a distance and size to align exactly with your screen's resolution. That is each width and height of "1" gl world equals "1" screen pixel, and coordinate (0, 0) equals

Re: [fpc-pascal] GLM library alternative?

2017-05-30 Thread Marco van de Voort
In our previous episode, Anthony Walter said: > By the way, what's stopping you guys from using OpenGL ES 2.0? It works on > most all Windows, Mac, and Linux systems, and it's the only 3D graphics API > on Raspberry Pi and most smart phones/tablets. IIRC I went for opengl 3.3-4 because one could

Re: [fpc-pascal] GLM library alternative?

2017-05-30 Thread Marco van de Voort
In our previous episode, Ryan Joseph said: > > On May 28, 2017, at 10:33 PM, Ryan Joseph > > wrote: > > > > projTransform := TMatrix4x4.CreatePerspective(60.0, 500 / 500, 0.1, > > 10.0); > > modelTransform := TMatrix4x4.CreateTranslation(0, 0, -3.0) * > >

Re: [fpc-pascal] GLM library alternative?

2017-05-29 Thread Anthony Walter
Thanks for posting those LookAt and Perspective routines. They're kind of needed with OpenGL ES 2.0, as it no longer has matrix modes. You need to build your own perspective and model view matrices and pass them to your vertex shaders as uniforms. uniform mat4 modelview; // modelview matrix

Re: [fpc-pascal] GLM library alternative?

2017-05-29 Thread Reimar Grabowski
On Sat, 27 May 2017 16:52:21 +0700 Ryan Joseph wrote: > Not having glm::perspective or glm::lookAt is enough to really stop you in > your tracks and running off to Google for hours. Then perhaps you have to improve your google skills. ^^

Re: [fpc-pascal] GLM library alternative?

2017-05-29 Thread Mattias Gaertner
On Mon, 29 May 2017 15:29:24 +0700 Ryan Joseph wrote: > > On May 29, 2017, at 12:58 PM, Anthony Walter wrote: >[...] > It’s buried now but look at the “FPC Graphics options” thread from a few days > ago and spanning back weeks I think. After all

Re: [fpc-pascal] GLM library alternative?

2017-05-29 Thread Ryan Joseph
> On May 29, 2017, at 12:58 PM, Anthony Walter wrote: > > I'm curious, what's the problem with fpc and loops? Also, from my OpenGL > experience the limiting factor in speed (frames per second) is usually the > pixel complexity and not whatever method is used to feed vertex

Re: [fpc-pascal] GLM library alternative?

2017-05-29 Thread Anthony Walter
I'm curious, what's the problem with fpc and loops? Also, from my OpenGL experience the limiting factor in speed (frames per second) is usually the pixel complexity and not whatever method is used to feed vertex data or shader uniforms. Wet rock example: http://glslsandbox.com/e#20806.1

Re: [fpc-pascal] GLM library alternative?

2017-05-28 Thread Ryan Joseph
> On May 29, 2017, at 8:24 AM, Anthony Walter wrote: > > And these matrices are compatible with OpenGL functions. > Thanks for sharing. I got your matrix multiplication functions to work in the order I expected and helped me find a bug. Btw, given what we just learned

Re: [fpc-pascal] GLM library alternative?

2017-05-28 Thread Benjamin Rosseaux
All SupraEngine.Math matrices are also compatible with OpenGL (and Vulkan, of course). SupraEngine.Math's TMatrix3x3 and TMatrix4x4 implementation have also advanced stuff as such as lerp, nlerp, slerp interpolation method functions, decomposing (into Perspective, Translation, Scale, Skew and

Re: [fpc-pascal] GLM library alternative?

2017-05-28 Thread Ryan Joseph
> On May 28, 2017, at 10:33 PM, Ryan Joseph wrote: > > projTransform := TMatrix4x4.CreatePerspective(60.0, 500 / 500, 0.1, > 10.0); > modelTransform := TMatrix4x4.CreateTranslation(0, 0, -3.0) * > TMat4.CreateRotateX(54); I found out the problem. I was

Re: [fpc-pascal] GLM library alternative?

2017-05-28 Thread Anthony Walter
You might want to try using this geometry library I've written to go along with OpenGL, fixed function or otherwise: https://github.com/sysrpl/Bare.Game/blob/master/source/bare.geometry.pas#L317 Basic usage might be like this: var M: TMatrix; V: TVertex; begin M.Identity;

Re: [fpc-pascal] GLM library alternative?

2017-05-28 Thread Benjamin Rosseaux
On GitHub I've already some SupraEngine subprojects, for example: - https://github.com/BeRo1985/pasmp My parallel-processing/multi-processing library for Object Pascal - https://github.com/BeRo1985/kraft My newer 3D physics Engine for Object Pascal -

Re: [fpc-pascal] GLM library alternative?

2017-05-28 Thread Benjamin Rosseaux
I know that issue, so that the record constructors in the SupraEngine.Math.pas are fully optional, so therefore you do must not using these :-) It's just a optional option for key-tap-lazy peoples, since all record member fields are also free directly accessible and public visible. On Sun, May

Re: [fpc-pascal] GLM library alternative?

2017-05-28 Thread Benjamin Rosseaux
Fixed, repacked & reuploaded as ZIP in the same directory On Sun, May 28, 2017 at 10:32 AM, Ryan Joseph wrote: > > > On May 28, 2017, at 3:22 PM, denisgolovan > wrote: > > > > Looks nice. Thanks for sharing. > > How about publishing it on

Re: [fpc-pascal] GLM library alternative?

2017-05-28 Thread Ingemar Ragnemalm
Ryan Joseph wrote: I’m trying to following some OpenGL tutorials to learn the matrix transforms but I’m getting stuck because I don’t have the c++ GLM library which everyone is using. I see FPC has a matrix class but it doesn’t include all the helpers in GLM like rotation, transform,

Re: [fpc-pascal] GLM library alternative?

2017-05-28 Thread Ryan Joseph
> On May 28, 2017, at 3:22 PM, denisgolovan wrote: > > Looks nice. Thanks for sharing. > How about publishing it on Github with small readme to ease contributions? > There’s some dead 403 links also btw. Regards, Ryan Joseph

Re: [fpc-pascal] GLM library alternative?

2017-05-28 Thread denisgolovan
28.05.2017, 09:55, "Benjamin Rosseaux" : I've put some units of my still work-in-progress UE4-style SupraEngine on my root server, after I've read this mailing list thread =>  http://rootserver.rosseaux.net/stuff/supraengineunits/   Looks nice. Thanks for sharing.How about

Re: [fpc-pascal] GLM library alternative?

2017-05-28 Thread Ryan Joseph
> On May 28, 2017, at 1:54 PM, Benjamin Rosseaux wrote: > > I've put some units of my still work-in-progress UE4-style SupraEngine on my > root server, after I've read this mailing list thread => Thanks for sharing. The GLM functions I wanted seem to be here so I’m

Re: [fpc-pascal] GLM library alternative?

2017-05-28 Thread Benjamin Rosseaux
I've put some units of my still work-in-progress UE4-style SupraEngine on my root server, after I've read this mailing list thread => http://rootserver.rosseaux.net/stuff/supraengineunits/ where the SupraEngine.Math.pas + SupraEngine.Math.*.inc + SupraEngine.Types.Standard.pas will be maybe

Re: [fpc-pascal] GLM library alternative?

2017-05-27 Thread Ryan Joseph
> On May 27, 2017, at 5:16 PM, Mark Morgan Lloyd > wrote: > > But working from a hazy recollection of such things, it's possible to merge > the translation/rotation matrices so that the final transformation can be > reduced to a single operation. Oh I’m

Re: [fpc-pascal] GLM library alternative?

2017-05-27 Thread Ryan Joseph
> On May 27, 2017, at 4:30 PM, Graeme Geldenhuys > wrote: > > I've implemented that by porting the Java Game Libirary code to Object > Pascal. Give me a day or two and I'll share the OpenGL code I have on Github. Thanks that would be great if someone had those

Re: [fpc-pascal] GLM library alternative?

2017-05-27 Thread Mark Morgan Lloyd
On 27/05/17 09:40, leledumbo via fpc-pascal wrote: Has anyone converted these to Pascal before or having some similar I couldlook at? I don't usually do the matrix calculation myself, I delegate that by callingOpenGL functions in proper order. But working from a hazy recollection of such

Re: [fpc-pascal] GLM library alternative?

2017-05-27 Thread Graeme Geldenhuys
On 2017-05-27 02:34, Ryan Joseph wrote: I see FPC has a matrix class but it doesn’t include all the helpers in GLM like rotation, transform, perspective transforms I've implemented that by porting the Java Game Libirary code to Object Pascal. Give me a day or two and I'll share the OpenGL

Re: [fpc-pascal] GLM library alternative?

2017-05-27 Thread Ryan Joseph
> On May 27, 2017, at 4:20 PM, leledumbo via fpc-pascal > wrote: > > I don't usually do the matrix calculation myself, I delegate that by calling > OpenGL functions in proper order. However, just a few days ago I found this: >

Re: [fpc-pascal] GLM library alternative?

2017-05-27 Thread leledumbo via fpc-pascal
> Has anyone converted these to Pascal before or having some similar I could look at? I don't usually do the matrix calculation myself, I delegate that by calling OpenGL functions in proper order. However, just a few days ago I found this: