Welcome To Darwinbots > Newbie

Darwinbots replacement/clone

<< < (9/11) > >>

Numsgil:

--- Quote from: peterb ---Or maybe first investigate a good direct3d wrapper for vb.net.
--- End quote ---

See this for getting XNA working with VB.NET.  There is an actual wrapper around DirectX for managed projects (an abandoned official version an an open source alternative), but XNA is the future!  In that Microsoft is actively supporting it.  It's pretty similar to DirectX, anyway.


--- Quote ---I also wonder if it should be possible to include other code inside vb.net
So having a c#.net draw tool, which could run the output (drawing circles and lines in color)
So to split the main routine and the graphics routine.
But i've never done something with any kind of graphical engines, and combined code.
--- End quote ---

It's actually pretty easy to do something like this in the .NET world, since the different languages get compiled down to the same intermediate language.  You just have separate projects in different languages, and "add reference" to the compiled bianry of one project in the other.

peterb:

i found some examples here http://nio.astronomy.cz/vb/opengl.html  (which seams fast for a basic aplication),
they use openGL and a wrapper called Tao, which seams to be updated recently
And it doesnt require to install a huge SDK from microsoft, these working demos are pretty small coded.

OpenGL exists in windows since i think NT3.51 so its pretty stable, and you can upgrade it like directx.
speed diffrences are not huge, so its mainly about how easy it would be to draw lines and circles.
That was easier in vb6 and earlier versions of basic like
screen 12
circle(90,90) 10, 4  

but thats was before the graphic cards became smart ..

Hmm if I only could have a picturebox and have it ehmmm like assigned a such openGL power (or directx).
Then I could do all the drawings I want and fast, and then a refresh of the object to show it.
but such a could.. still is a mistery to me.
Its kind of strange we want to draw verry simple, but that seams to require a lot of knowledge these days.

Numsgil:

--- Quote from: peterb ---i found some examples here http://nio.astronomy.cz/vb/opengl.html  (which seams fast for a basic aplication),
they use openGL and a wrapper called Tao, which seams to be updated recently
And it doesnt require to install a huge SDK from microsoft, these working demos are pretty small coded.
--- End quote ---

Tao's also good, yes.  It wraps OpenGL, though, so if you've only done DirectX in the past it's going to be a bit of a learning curve (if you've done neither it's not a big deal).


--- Quote ---OpenGL exists in windows since i think NT3.51 so its pretty stable, and you can upgrade it like directx.
speed diffrences are not huge, so its mainly about how easy it would be to draw lines and circles.
--- End quote ---

They both get converted by your graphics driver to raw hardware calls.  Though DirectX support tends to be better, especially from ATI.  NVidia does a pretty good job with OpenGL, which is why it's preferred for Linux.


--- Quote ---Hmm if I only could have a picturebox and have it ehmmm like assigned a such openGL power (or directx).
Then I could do all the drawings I want and fast, and then a refresh of the object to show it.
but such a could.. still is a mistery to me.
Its kind of strange we want to draw verry simple, but that seams to require a lot of knowledge these days.
--- End quote ---

There is still support for basic drawing, as in VB6, through GDI.  This is relevant.  GDI will usually(?) be hardware accelerated, so you still get speed without messing with OpenGL or DirectX.  The downside is that it's not really meant for games and such that update the screen dozens of times a second (but then, the built in VB6 stuff isn't either).

peterb:

--- Quote from: Numsgil ---
--- Quote from: peterb ---i found some examples here http://nio.astronomy.cz/vb/opengl.html  (which seams fast for a basic aplication),
they use openGL and a wrapper called Tao, which seams to be updated recently
And it doesnt require to install a huge SDK from microsoft, these working demos are pretty small coded.
--- End quote ---

Tao's also good, yes.  It wraps OpenGL, though, so if you've only done DirectX in the past it's going to be a bit of a learning curve (if you've done neither it's not a big deal).


--- Quote ---OpenGL exists in windows since i think NT3.51 so its pretty stable, and you can upgrade it like directx.
speed diffrences are not huge, so its mainly about how easy it would be to draw lines and circles.
--- End quote ---

They both get converted by your graphics driver to raw hardware calls.  Though DirectX support tends to be better, especially from ATI.  NVidia does a pretty good job with OpenGL, which is why it's preferred for Linux.


--- Quote ---Hmm if I only could have a picturebox and have it ehmmm like assigned a such openGL power (or directx).
Then I could do all the drawings I want and fast, and then a refresh of the object to show it.
but such a could.. still is a mistery to me.
Its kind of strange we want to draw verry simple, but that seams to require a lot of knowledge these days.
--- End quote ---

There is still support for basic drawing, as in VB6, through GDI.  This is relevant.  GDI will usually(?) be hardware accelerated, so you still get speed without messing with OpenGL or DirectX.  The downside is that it's not really meant for games and such that update the screen dozens of times a second (but then, the built in VB6 stuff isn't either).

--- End quote ---


Well i've done neither, so i will slowly learn it i guess.
Ive seen now code to interop c++ also
Maybe a small program can be made using tao,  another wrapper to draw  with a few command only  circle / line / pixel /refresh /clrscr
and have a refresh command so its executed at once.
(or like drawing on a hidden screen part and then the video memory block is switched) , i asume such functions would exist

Numsgil:

--- Quote from: peterb ---Well i've done neither, so i will slowly learn it i guess.
--- End quote ---

Word of warning: if you've never done any OpenGL/XNA/DirectX before, and don't have a real good understanding of how graphics cards work...  Well, it's going to be difficult.  You're pretty close to the metal.  Basically video cards don't know how to draw anything but triangles.  So for drawing circles you have to either tessellate it (divide it up into triangles) or draw a square with a circle texture.  And there are a lot of ways to do something, only some of which are fast.

Did you see the GDI link I posted at the bottom of my last post?  It's built right in to .NET and I think it'll save you a lot of effort.  It's based more on the "draw circle at x,y pixel position" paradigm you might be used to.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version