Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / DBP "CAN" run openGL and DirectX at the same time! -> Proof...

Author
Message
WLGfx
16
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 22nd Aug 2012 12:25
I've just read through the features list for Horde 3D and it does look quite an impressive graphics engine so far and it would have been likely I'd have looked into it further but at the bottom of the screen I then noticed this:
Quote: "Hardware requirements
Horde3D requires an OpenGL 2.0 compatible graphics card with support for floating point buffers like a GeForce 6 series card or Radeon 9500."

I'm on an old laptop with openGL 1.4, although I have a computer with with openGL 2.0, most of my coding is done on my dual core laptop.

And with Horde 3D only supporting openGL at the moment then Irrlicht does seem a better choice. Although on my laptop I get an increase in speed with both openGL and DirectX, others find that the openGL rendering is slower, so to be able to pick between them has it's uses in testing.

Recently there's been a fuss made about OO coding and DBP in the DBElite question thread but either way, The DarkIrrlicht project isn't taking anything away. Instead of an ID, you get the reference to the object and use that reference just as you would with an ID. To be honest, I don't thing the OO is really a major part of this wrapper because of DBP.

What I have been reading on the Irrlicht forums has interested me though, is there's many physics API's that can be added to Irrlicht such as Bullet which has tickled my fancy so far. Once most of the engine is wrapped up then I will look into adding one of those API's.

The biggest thing that does attract me to these API's is they handle dropped resources automatically which is essential for a Basic language and unfortunately DBP does not do. Horde 3D also made the point on that score.

For various reasons over the last few days I've been disposed of and will be adding more to this project again over the next 24 hours.

Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!
Seppuku Arts
Moderator
19
Years of Service
User Offline
Joined: 18th Aug 2004
Location: Cambridgeshire, England
Posted: 22nd Aug 2012 12:47
Quote: "I'm on an old laptop with openGL 1.4, although I have a computer with with openGL 2.0, most of my coding is done on my dual core laptop.

And with Horde 3D only supporting openGL at the moment then Irrlicht does seem a better choice. Although on my laptop I get an increase in speed with both openGL and DirectX, others find that the openGL rendering is slower, so to be able to pick between them has it's uses in testing."


This is a fair point, it sounds like it needs a moderately decent graphics card too, I'll still try it in C++ to see how well I can run it, but I am running a measly Intel GMA.

DarthBasicVader
18
Years of Service
User Offline
Joined: 28th Nov 2005
Location: Cyberspace
Posted: 23rd Aug 2012 17:39
Could someone explain me in simple words the utility of this wrapper ? (i'm not sure i've understood it through this thread)

If i use it ...

1) i will be able to use DB Pro features through Irrlich code (even importing my DB PRo existing projects)

2) DB Pro compiled projects will be able to run in OpenGL mode (maybe on a Linux system too ?)

3) i will be able to use Irrlicht Engine features through DB Pro code

4) .. none of the previous

Please help me to understand ...

Tx!!

Riccardo
Seppuku Arts
Moderator
19
Years of Service
User Offline
Joined: 18th Aug 2004
Location: Cambridgeshire, England
Posted: 23rd Aug 2012 17:54
Number 3 best describes it. Essentially it's Irrlicht code through the DBP editor and it'll offer the features of Irrlicht.

For example:



They're all DBP versions of Irrlicht commands created through the wrapper and Irrlicht will be compiled into your project. This means you could render using Open GL instead of Direct X, because that's one of Irrlicht's features. So you couldn't use existing DBP code, but once/if it's complete there will be documentation to explain how to use it. I've been working on the documentation myself (and a sample game), but I'd say as a project, it's got a lot more ground to cover.

WLGfx
16
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 23rd Aug 2012 21:20
Now upto 313 extra Irrlicht functions added to Dark Basic Pro.

DarkIrrlicht Materials Function Library
More material settings and material layer settings:



@DarthBasicVader - I think Sepp has explained it better with the code snippet. Today I was working on some example DBP projects. So far using the DX renderer I get approx. 25% FPS increase using DarkIrrlicht.

Basically DarkIrrlicht is an Irrlicht wrapper for DBPro.
No, you cannot run it on Linux because DBP is Windows only.
So far the DirectX rendering engine from Irrlicht is faster than DBP's.
You can run two windows and have DBP running 3D in one and DarkIrrlicht in the other (either DX or openGL).
All of DBP's 'core' code will work with DarkIrrlicht.

When it is finished, DBP will have access to the features from Irrlicht, such as loading 3D models faster, transferring images, etc.

DarkIrrlicht is as close to OO as you'll probably get at the moment for DBP. DBP has an ID number for an object, DarkIrrlicht returns the actual pointer to the class structure. This pointer is passed to the various functions and worked upon.

I'm now hoping that with the extra addition of the rest of the material library I can work on some more demonstrations.

Future expansion to the wrapper could also include a physics API.

Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!
Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 23rd Aug 2012 22:38
So what does DBPro actually do with irrlicht? Is DBPro just sending commands to the irrlicht engine? So irrlicht isn't running in a DBPro window, it's running in it's own window as a separate application, right? DBPro is just calling the irrlicht functions using it's own syntax. What happens in fullscreen exclusive mode?

Enjoy your day.
Seppuku Arts
Moderator
19
Years of Service
User Offline
Joined: 18th Aug 2004
Location: Cambridgeshire, England
Posted: 23rd Aug 2012 22:53 Edited at: 23rd Aug 2012 22:56
Think of it this way.

Dark Basic is a language, just like C# or Visual Basic. But what makes it different is that it's got a software development kit (SDK) built in and that's called the Dark Basic Pro SDK. So in a way, like using Dark GDK with C++. Irrlicht is another SDK, but its native support is for C++, so all of Irrlicht's commands have to be compiled into a DLL that Dark Basic Pro can read, this is the wrapper. Just as for Irrlicht (or even Dark GDK) to be understood in C# or Visual Basic there has to be a wrapper, Irrlicht Lime is a Wrapper for C#/Visual Basic and so is Dark GDK.NET.

So Dark Basic Pro gets Irrlicht, just as C++ and C# get Irrlicht. How it's wrapped is different to say, C#, because Dark Basic and C# work differently. Because Dark Basic opens its own window by default it has to run in the background of the window Irrlicht has to create. Why not use the same window? Because Dark Basic Pro is initialised in that window and is already using it, even if it's not doing anything.

So if you want to go fullscreen? You wouldn't use DBP's editor for that. You would use the command built into the wrapper, which uses Irrlicht's methods of going fullscreen.


The advantage of having the second Window? Sound. Irrlicht is graphics engine therefore it is not capable of dealing with sound, which would be problematic. So instead of having to wrap something like Irrklang, you could still use DBP's sound commands, I've tried it and it still works, even though stuff is going on in the Irrlicht window.

WLGfx
16
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 23rd Aug 2012 22:55 Edited at: 23rd Aug 2012 22:57
You can use it to run two windows, one for DBP and the other for Irrlicht. Or if you switch off the auto screen refresh in DBP then you can use the Irrlicht engine windowed or full screen on its own. At this point I really ain't got a clue what happens when both API's want to go fullscreen at the same time though.

What I've done is re-compiled the Irrlicht engine into a static library and then linked the static lib to a dll for DBP. Took a bit of research to get it to that point too as a couple of alterations to the project files settings and also some defines in both source codes had to be setup too. Slowly but surely the engine will be fully exposed for DBP to use. Irrlicht is slightly faster than DBP and loads more media so it could be used for those two things. Maybe transferring models directly to DBP as a model converter.

I'm hoping to get to a point very soon to be able to convert the tutorials from the Irrlicht web pages to run from DBP.

EDIT: he he... Both replying at the same time...

Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!
Seppuku Arts
Moderator
19
Years of Service
User Offline
Joined: 18th Aug 2004
Location: Cambridgeshire, England
Posted: 23rd Aug 2012 23:04
Also, I am working on a sample game demo (currently C# as I don't think Dark Irrlicht has all of the functionality I need yet). I've not done a lot of work on it yet, just a cube character loaded into a scene with collision, movement and gravity and a second cube it can talk to. I was thinking of creating something basic but functional, an adventure game demo. So you've got multiple rooms, a player, NPCs and an inventory with some objectives.

WLGfx
16
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 24th Aug 2012 03:51 Edited at: 24th Aug 2012 03:51
With the current build of the DarkIrrlicht project a simple piece of code like this:



And you get this:


Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!

Attachments

Login to view attachments
WLGfx
16
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 24th Aug 2012 03:58
Current build attached to this post with the example and media...

NB: The exe will also run without the need to copy over the dll or ini files...

Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!

Attachments

Login to view attachments
PeteyM5
15
Years of Service
User Offline
Joined: 26th Feb 2009
Location: Buffalo NY USA
Posted: 27th Aug 2012 20:46
I wonder how hard it would be to use this IRRLICHT engine with VB.NET 2008, 2010. I have been looking for a new Engine with my RPG maker. I have considered Dark GDK and MS XNA also. It is currently using Truevision3D 6.5. The RPG builder is unfortunately heavily dependent on Windows Forms Controls because it has to be able to edit datatables and other information. So that does have to be all GUI. The RPG Player (Client Program) is however not dependent on Windows Controls from Visual Studio. Might be portable to other versions of Basic, like Dark Basic. What it does is read in the database files and sets up a scenery, then plays the game.

The reasons why I want to phase out Truevision3D is they stopped doing updates to their engine. v6.5 came out out around 2008. Most of my new projects are done in Dark Basic now. Porting the RPG Builder/Editor program outside VB.NET has never been considered because the amount of work it will require. That is unless I can find someone interested in assisting with the work. I am aware there are several GUI plugins of DB, but I still have to find one with a grid/spreadsheet like editor. That is how I edit all my datatables.
Seppuku Arts
Moderator
19
Years of Service
User Offline
Joined: 18th Aug 2004
Location: Cambridgeshire, England
Posted: 27th Aug 2012 21:29
It's easy to set up with C# 2010, so I imagine so as usually if it works with C# it works with Visual Basic. However, you need a wrapper, there's 2 (that I know of) and the one I use for C# is Irrlicht Lime.

http://sourceforge.net/projects/irrlichtlime/

There's not a lot of documentation for it, but you can just use Irrlicht's normal documentation to make it work. The examples are all C# sadly, but I'm sure it wouldn't take much to translate them over to VB.Net. I was tempted to try and get it set up in VB.Net myself, I can let you know how I get on.

I don't know what VB.Net's interface is like, but if it works similar to Visual C#, then this tutorial I wrote should help you get set up (for 2010, but iirc 2008 isn't too different)
http://seppukuarts.wordpress.com/2012/08/15/setting-up-irrlicht-lime-in-visual-c-2010/

But it's a good engine to work with.

MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 27th Aug 2012 23:03
Quote: "a grid/spreadsheet like editor. That is how I edit all my datatables. "


Arrays?

Seppuku Arts
Moderator
19
Years of Service
User Offline
Joined: 18th Aug 2004
Location: Cambridgeshire, England
Posted: 28th Aug 2012 01:25 Edited at: 28th Aug 2012 01:31
Right, Petey, I just got this up and running in Visual Basic 2010. Following the tutorial I posted in my last post just use this code:




If you've got any more questions, probably better to drop me a line on my blog comments or start a thread in Programming Talk so we don't take over the thread. Either way, Irrlicht Lime works just fine in Visual Basic. It should not be that difficult to convert C# or C++ examples over, so I don't think it'd be a huge difficulty learning Irrlicht using VB. I personally use C# and beyond the stock examples I am having to look at C++ code and C++ documentation and it isn't a big jump. The way it works for VB is pretty much the same as C#.

IIRC from testing out Truevision once upon a time, I think irrlicht might be more in tune with what you're used to, though I do not remember much at all, so I could be wrong.

PeteyM5
15
Years of Service
User Offline
Joined: 26th Feb 2009
Location: Buffalo NY USA
Posted: 28th Aug 2012 06:45 Edited at: 28th Aug 2012 07:12
OK I am slowly figuring IRRLICHT and IRRLICHTLIME out. I did find a sight that can convert between Visual Basic and C#. I like Visual Basic over C because I built the whole project within Basic from the start. There's probably millions lines of code involved. I probably going to have to do some small scale experiments with IIRC first to see what it can do and find the Truevision Equivalents. I am already attracted it supports an in game GUI interface. Something that is in my RPG engine is a dialog system and needs a user interface for that. Like you have to answer a riddle to get rewarded within a game.

To answer a prior post, the grid/spreadsheet edits Database Tables and not arrays because certain columns have different meanings. Each columns can be stored as a different variable type. Have different Datatables to set up AI Characters (Monsters), Usable Items, Spells, Quests, Zone Triggers, etc. Each Line in like the Item table sets the parameters for stuff you encounter in the game. So it is not the same thing as an array that is of all the same variable type.
Hotline
15
Years of Service
User Offline
Joined: 22nd Aug 2008
Location:
Posted: 28th Aug 2012 21:14
This is a very interesting project , i made an Irrlicht wrapper some time ago for using it in freebasic for my game.After i finished it i tested it almost 2 years , and unfortunately i wasn't satisfied with it a bit !After runing a lot of tests I compared it to DBpro , and DBPro was LOT LOT LOT faster and stable than irrlicht.

Don't get it wrong irrlicht is really nice rendering engine but nothing more ! No Physics , no audio , no collision no AVI rendering , no Networking , very elementary 2d engine...

Also there are 2 major reasons why i stopped using irrlicht :
1. BSP renderer is extremely slow ! (Irrlicht Octree nodes are lot slower than a simple DBPro object)
2. Animations are really slow either ! I got 45 fps in DBPro (using the same 20 * 20 dwarf scene as you did) (with Dynamic lights !!) , and got only 25 using Irrlicht without Dynamic lights turned on.When i turned on the light calculation , i got only 10-12 fps.

All in all on a scale from 0 to 10 i would give :
DBPro - 10
Irrlicht - 6

I recently using irrlicht for my editor where speed is not that much important , but i don't think i will using it in a game project anymore ...

Anyway keep up the good work ! I wish you the best of luck with the project.
Regards !

[href=forum.thegamecreators.com/?m=forum_view&t=191567&b=5]Spark Particle engine[/href]
[href=forum.thegamecreators.com/?m=forum_view&t=199163&b=5]Transform gizmo plugin[/href]
PeteyM5
15
Years of Service
User Offline
Joined: 26th Feb 2009
Location: Buffalo NY USA
Posted: 29th Aug 2012 01:27
This is what I use to convert between VB.NET and C#.

http://www.developerfusion.com/tools/convert/csharp-to-vb/

What we could also use is something that can convert to Dark Basic. However I might be able to use it to port all the C samples they have.

I need specifically to know how it does the Terrains (AKA Landscapes) and creating 3D objects within code. My RPG maker is similar to BSP system, but divides the scene up into "Page Sectors." That enables ports of the scene to be created and deleted as your character moves around. Parts of the 3D scenery include walls, floors, ceilings, passage ways, pillars, beams, etc. Terrains can optionally be merged in with the scenery to have 3D mountains surrounding your buildings.
WLGfx
16
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 29th Aug 2012 03:47
@Hotline - After reading through some in depth stuff on Irrlicht'c Octree support I found that Irrlicht has its own optimised Octree method as well as the BSP one when loading and running Quake levels. Also you can remove the material setting on objects to optimise rendering when adding child nodes so that it doesn't change the material each time another node needs rendering. But I guess that's up to the programmer to make those optimisations themselves.

@PeteyM5 - As far as I know, not used it yet apart from the samples with the C++ version of Irrlicht is it loads in heightmaps but there's other ways of manually setting up your own meshes to set terrains too. As the project develops you will be able to read and write to meshes very easily and probably just like DBP does at the moment.

Not had much chance over the last many days to add anything but I'm considering starting to add a few of the GUI elements and more mesh stuff.

Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!
PeteyM5
15
Years of Service
User Offline
Joined: 26th Feb 2009
Location: Buffalo NY USA
Posted: 3rd Sep 2012 03:23
I managed to port some of the samples over to VB.NET 2010 and combined them into one program. Maybe the code can be further ported into Dark Basic Pro, however I don't have a whole lot of time to do it all myself. I am not sure if all the same functions are available and formatted the same between irrlchtlime and darkirrlcht.

I am involved in doing other major modifications to my RPG Maker (Imperium Magica) at this time. I'm trying to change over to something that will make putting items and monsters into the scene easier as making it possible to do a mmorpg port. I have to make sure new mods work before porting over to a new engine. It is currently using VB.NET 2008 and Truevision3D.

Attachments

Login to view attachments
WLGfx
16
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 8th Sep 2012 02:30
@PeteyM5 - I had a look at your sample and it's pretty cool. It's a good engine Irrlicht for many things still. And it was only recently I came across the list of ports for the engine when Sepp pointed out the IrrlichtLime.

I've not been too good of late and haven't done much apart from today adding more INODE material commands. Although not long ago I added the IMAT material functions I needed to add them directly to the scene nodes.
It's not much but it's something added to it.

I'm currently thinking about adding a callback feature to a custom DBP function to allow for event handling. This will be useful for users to use the GUI features better from Irrlicht. Plus at the moment I've only tested out the single frame mesh data for transferring meshes to the DBP format which is easy to do. No sample code for them yet, sorry.

Still, the source code for this project is available freely to anyone who wants to make any contributions.

Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!
PeteyM5
15
Years of Service
User Offline
Joined: 26th Feb 2009
Location: Buffalo NY USA
Posted: 13th Sep 2012 01:29
That is interesting because Material functions is something I am getting hung up on in my coding. Want to apply custom color to a custom or loaded object. Something I do frequently in my games is have objects change color or transparency. Lets say have Red, Yellow, Blue, and Green balls bouncing around inside a room. I guess I have to wait until sample #22 is translated.
WLGfx
16
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 27th Sep 2012 01:36 Edited at: 27th Sep 2012 15:30
Holding this post open as I'm almost on top of the zip archive handler and the pak files, which allows tutorial 2 from the sourceforge.irrlicht page to run perfect from within DBP that loads a quake 3 level up with all effects running (hopefully)...

It's been a while because I've been on holiday and such...

@Petey - Sample 22#??? As far as I know the material functions from Irrlicht do give a tad more control over an objects appearance from the mesh level.

Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!

Attachments

Login to view attachments
WLGfx
16
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 27th Sep 2012 15:36
DarkIrrlicht Tutorial 2 complete and working...

Dark Basic Pro source code for example:



Screenshot:


To check it out yourself the current version is attached to this post...

Just copy over the dll and ini files to the folders in your DBPro installation folders...

Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!

Attachments

Login to view attachments
Seppuku Arts
Moderator
19
Years of Service
User Offline
Joined: 18th Aug 2004
Location: Cambridgeshire, England
Posted: 27th Sep 2012 17:29
Neeeeeeeeat! Can't wait to see the collision commands to come in, then maybe I can get to work on writing some tutorials myself. The code snippet I had started in C# was using the collision commands in the Irrlicht tutorial series.

WLGfx
16
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 28th Sep 2012 02:15 Edited at: 28th Sep 2012 03:11
For the time being I'm skipping tutorial 3 (custom scene nodes) for now while I figure out the best way of setting up vertex tables for Irrlicht from DBP.

I'm almost done finishing tutorial 4 which now has the animators attached to scene nodes and some of the basic gui elements. The gui is used more in the tutorial 5 which I'll likely make use of DBP's array commands to run that one. I'm just at the gui section now to finish this tutorial off.

There's 347 commands so far and still I've hardly touched the Irrlicht API. The built in collision commands are pretty basic but, yeah, they work and especially when you have the selectors too it's a nice API to work with.

I think this will get more interesting once the gui is fully functional but that'll be a few days yet...

EDIT: Collision starts in tutorial 7 so I'm not that far off now!

Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!
WLGfx
16
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 30th Sep 2012 16:12
Tutorial 4 finished but when I compile from DBP and run I get a message box saying "Matrix1Util_04.dll This library is required by this program" so when I get back tomorrow I'll figure it out...

The code for tutorial 4 is :


As I go along I'll add more GUI code from it...

Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 4th Oct 2012 08:57
Quote: "For the time being I'm skipping tutorial 3 (custom scene nodes) for now while I figure out the best way of setting up vertex tables for Irrlicht from DBP."

I can get started on that if you like. Are all of the latest sources still in the git repo?

I'll start off by submitting some a plain text document proposing my idea(s). If you approve it, I'll move on to implementing it.

Web - Tweets
“I'm going to punch DXGI in the face. Repeatedly.” ~Aras Pranckevicius
WLGfx
16
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 4th Oct 2012 20:37
@Aaron Miller - Not a problem with working on that. I was side-tracking myself anyways with getting into SQL libraries.



Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 5th Oct 2012 06:43
Irrlicht appears to only support three different types of vertices, which is kind of a let down. However, I suppose that simplifies the interface I'm about to propose. I'll be pushing the document to the repo soon. Cheers!

Web - Tweets
“I'm going to punch DXGI in the face. Repeatedly.” ~Aras Pranckevicius
WLGfx
16
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 12th Oct 2012 20:07
@Aaron Miller - I've had to do a complete re-install of my laptop so I can have a slightly bigger Hard drive in it. (160Gb now, 100Gb for Windows and the rest for Linux) So I'm going to have to go through the rigmor-roll of re-installing everything again before I can access the DarkIrrlicht repository. Hopefully I'll have it up and running again very soon. I'm still a tad confused on setting up the SVN stuff but I reckon this time I'll wing it...

I've looked at the document and that seems all fine. I was considering having setting up a buffer handler for those routines that on the apps close anything that has been allocated and still in memory can be de-allocated safely in the plugins destructor. I've done that in other plugins so far and I've never come across any problems with it. This can be used for any mesh buffers, vertex buffers and index buffers used by DarkIrrlicht.

I'll also have to get round to re-writing the first post of this thread to hold screenshots and the latest download for the project and a link to the repository so that others can view all the plugin code.

Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 13th Oct 2012 22:33
Hey WLGfx. If you would like any help again, I'm available on GTalk most of the time, as you're aware.

I think I might make a tutorial on how to get set up and get running with the basics pretty soon. That way other users would be able to get involved more easily as well.

I still have to do some research on how to make an IMeshBuffer~ in Irrlicht. (Things like best practices and which APIs are available. I did a quick scan through the documentation but didn't find anything helpful.)

It occurred to me that the vertex cache idea would probably work really well for things like per-frame dynamic 2D drawings. (Stuff like text.) The user could type something like: irr draw text TEXTHANDLE, 0,0, "hello, world!" where TEXTHANDLE is, for example, an index (with zero meaning "dummy") for the vertex cache, which could either be allocated, or just directly entered in.

In some ways, I would like to just extend Irrlicht itself to make it better fit my expected usage patterns, but that would probably best be left to contributing patches to the project itself rather than trying to do so here, lol.

Alright, well that's enough rambling for me (for now). I'll probably have a look at this again tonight and see what I come up with. Cheers!

Web - Tweets
“I'm going to punch DXGI in the face. Repeatedly.” ~Aras Pranckevicius
WLGfx
16
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 26th Oct 2012 04:44 Edited at: 29th Oct 2012 01:48
I've been playing around with some of the manual mesh creation within Irrlicht and I've sussed how to add it to DarkIrrlicht very easy. Using some of the Irrlicht's internals (and Irrlicht handles the memory clean up too), the SMesh() and SMeshBuffer()'s are very easy to implement at this stage. Also, when using the SMeshBuffer() object you have access to a similar STL library class that Irrlicht implements, SMeshBuffer.Vertices.set_used(size) and SMeshBuffer.Indices.set_used(size), which resize the buffers internally without worrying about memory assignment unless you need to 'drop()' the object.

At the moment I'm playing with the standard SMesh() which is a typedef of the SMesh() class so I'll shortly have the rest of the vertex formats ready to play with. SMesh() currently only uses - position, normals and TCoords (UV coords). CMesh has the extras to expand to the default from the Irrlicht library, which is currently 4 texture coordinates and can be re-compiled to handle the 8.

As soon as I finish this current experiment (currently on Linux using the SMesh), I'll add the extras to the DarkIrrlicht function list.

Apologies for the time taken, I'm not too good...

EDIT: From a very simple example I'm messing with...


EDIT2: Once the SMesh() has been generated, to add it to the scene drawing you just use IMeshSceneNode=AddMeshSceneNode(parent,MYMESH)

Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!

Attachments

Login to view attachments
WLGfx
16
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 29th Oct 2012 01:47 Edited at: 29th Oct 2012 01:50
MAJOR UPDATE - Manual Mesh Creation

Screeny...



Using the SMesh() and the SMeshBuffer() classes I've managed to get fully working the manual creation of meshes. The current stage of the DarkIrrlicht project is attached to this post... (It's in 7z format as I won't use rar anymore, sorry)

I recently tried a very similar demo using just DBP and I was getting frame rates below 20, where-as with this version of it, with a more detailed plane layout I get much higher frame rates...

Here's the code snippet included in the download so you can see how easy it is:



Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!

Attachments

Login to view attachments
WLGfx
16
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 15th Nov 2012 21:37
Wahey! Irrlicht 1.8 is out so I'll be re-ka-jigging the source code for the project about a bit.



I'll be having a play around with the engine first before I make some of the code changes to the GIT project. This update has been a long time coming...

With the DB Elite looking like a dream gone by it looks like this will just be for DBPro itself...

Updates will be coming up soon... Watch this space...

Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!
T4r4ntul4
14
Years of Service
User Offline
Joined: 1st Jan 2010
Location: close to my pc
Posted: 4th Jan 2013 12:27
i was going to use irrlicht 1.8 for its occlusion culling stuff, but if its coming to DBpro, ill wait for this

is this project still active?
WLGfx
16
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 4th Jan 2013 20:38
I've not added much else to the project since before Christmas. Although it only started off as an experiment it ended up being a tad bigger.

Saying that, although progress is slow on this project as I've got other things I'm also currently working on. I'm considering upping the irrlicht api to 1.8 as I've worked with it already myself without any problems.

The last thing that was added to this project was the manual mesh creation using one of the built in vertex formats. I'll keep posting here as bits of progress is made on it.

Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!

Login to post a reply

Server time is: 2024-04-28 08:13:54
Your offset time is: 2024-04-28 08:13:54