Pages: 1
Author Topic: Does LateralGM support vector graphics?  (39,731 Views)
Offline (Unknown gender) x

Member
Joined: Aug 2013
Posts: 19
View profile
Posted on: August 17, 2013, 04:46:55 AM
Does LateralGM support vector graphics for 2D games? I assume it doesn't, but I just wanted to be sure.
If not, it would be a great feature to add. Although, I recognise there are other priorities at the moment.
Offline (Unknown gender) TheExDeus

Developer
Joined: Apr 2008
Posts: 1,860
View profile
Reply #1 Posted on: August 17, 2013, 10:53:45 AM
LGM does not, but you can of course draw vector graphics in enigma. Just use d3d_model functions and draw any shapes you want. There is no tool to convert SVG to ENIGMA though. There are tools to convert SVG to 3D model though, and those can be converted and loaded in ENIGMA.

You can also just use primitive_ functions to draw vector graphics, but that is slower.
Offline (Unknown gender) Josh @ Dreamland

Prince of all Goldfish
Developer
Joined: Feb 2008
Posts: 2,950
View profile
Reply #2 Posted on: August 17, 2013, 06:25:59 PM
I think he was referring to SVG, Harri.

I want very badly to support vector graphics, but they are extremely slow, and rasterizers are usually fat and relatively poor. InkScape is the only good SVG raster program. ImageMagick is awful at it; LibreOffice and most image viewers screw up royally on text and basic shapes, and only six programs support vector graphics, anyway. It puts us in a really awkward position. Especially with hardware SVG rasterization being a new and explosive topic.

Rest assured, no one on the project is more interested in supporting vector graphics than I am, and I will make certain we support them, at whatever level, in the not-too-distant future. It just may require them to be pre-loaded into framebuffers ("surfaces") at varying sizes, or at user-specified sizes.

I have also considered writing a compiler for a small subset of the SVG format, so simple graphics can be quickly rendered in real time. To correctly support gradients and filter effects, however, we will need better shader support than ENIGMA presently offers.

We'll get there, though.
Offline (Unknown gender) x

Member
Joined: Aug 2013
Posts: 19
View profile
Reply #3 Posted on: August 18, 2013, 05:51:42 AM
Quote from: TheExDeus on August 17, 2013, 10:53:45 AM
you can of course draw vector graphics in enigma. Just use d3d_model functions and draw any shapes you want
Are you saying d3d_model functions can be used for 2D shapes? Man, was that an oversight on my behalf!

Quote from: Josh @ Dreamland on August 17, 2013, 06:25:59 PM
I have also considered writing a compiler for a small subset of the SVG format, so simple graphics can be quickly rendered in real time.
I think that would be fine for the majority of users. After all, that would be enough to allow developers to create really crisp games that scale to any resolution.
Offline (Unknown gender) TheExDeus

Developer
Joined: Apr 2008
Posts: 1,860
View profile
Reply #4 Posted on: August 18, 2013, 05:05:48 PM
Almost all d3d_ functions can be used in 2D mode. Including d3d_model functions to render 2D shapes (even with textures and such).

Josh, have you look at OpenVG,  ShivaVG etc.? I think many of them are easy to implement (for opengl though, for DX we would need to use some MS api which probably has support for that). Another thing I am interested in is HTML/CSS huds for games. So maybe a plugin for ENIGMA which would support Awesomium or Berkelium (or something like that) and it would allow rendering of SVG graphics as well.
Offline (Unknown gender) Josh @ Dreamland

Prince of all Goldfish
Developer
Joined: Feb 2008
Posts: 2,950
View profile
Reply #5 Posted on: August 18, 2013, 07:40:43 PM
I had not heard of ShivaVG; I thought Khronos was basically blowing hot gas. Thanks; I'll give it a lookover.
Offline (Unknown gender) Goombert

Developer
Joined: Jan 2013
Posts: 2,991
View profile
Reply #6 Posted on: August 19, 2013, 07:15:16 PM
@X yes of course 2d vector graphics are possible, OpenGL and DirectX are actually just 3D vector graphics API's all of our 2D functions essentially draw a d3d floor with 0 for all Z coordinate values

I also support SVG graphics in ENIGMA, definitely a must have.
Pages: 1