View Poll Results: Which Graphics Library do you use primarily?
- Voters
- 23. You may not vote on this poll
-
Mar 1st, 2002, 09:59 PM
#1
Thread Starter
Fanatic Member
Graphics Poll
I have been trying to figure out how to use Microsoft DirectX 8.0. I downloaded it from MS, but it seems like it is very 3D-oriented, and I am looking for 2D stuff.
I found a super-cool library called Fastgraph -- it costs money, but not much. A mere 299 US$ is nothing for a serious developer. I have used it before (for MS-DOS some years ago).
Now I am interested in hearing what you other people use. I am not starting a major long discussion with thousands of posts fighting out religious battles. My intention is to find out what you guys use and feel free to notify me (and others) of any graphics library you may be using (or know of).
Microsoft DirectX can be downloaded from www.microsoft.com
Fastgraph can be downloaded from www.fastgraph.com
GDI32.DLL can be downloaded from c:\windows\system\gdi32.dll
-
Mar 1st, 2002, 11:08 PM
#2
I use DX8, simply because I work mainly in 3d. If you are planning to work in 2d, you are probably better off using DX7. DX8 has pretty much removed the 2d component of the API, leaving 2d programmers pretty much stuck with polygons.
Z.
-
Mar 2nd, 2002, 12:38 AM
#3
Thread Starter
Fanatic Member
Thanks for the feedback. Appreciate it.
-
Mar 2nd, 2002, 08:55 AM
#4
I use DX6, because it was on the CD of my game programming book (Tricks of the Windows Game Programming Gurus), and I don't see any need to upgrade to DX7. I also have DX8.1, but I don't use it since I somehow don't get the 3D stuff.
BTW, anyone know a site that explains the fundamentals of 3d (no code, just the system and terminology)
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Mar 2nd, 2002, 12:17 PM
#5
Good Ol' Platypus
I mainly dabble in DX8/7, just seeing what neat things I can come up with.
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
-
Mar 2nd, 2002, 01:59 PM
#6
Thread Starter
Fanatic Member
Originally posted by CornedBee
I use DX6, because it was on the CD of my game programming book (Tricks of the Windows Game Programming Gurus), and I don't see any need to upgrade to DX7. I also have DX8.1, but I don't use it since I somehow don't get the 3D stuff.
BTW, anyone know a site that explains the fundamentals of 3d (no code, just the system and terminology)
I don't get all that 3D-stuff either.
ALL of you: Thanks for your feedback.
-
Mar 2nd, 2002, 02:24 PM
#7
CornedBee, what sort of things are you looking for? I can probably answer any questions that you have, so ask away =).
Z.
-
Mar 2nd, 2002, 09:07 PM
#8
Addicted Member
Fastgraph may have been good in DOS, but the windows version is absolute GARBAGE. I spent about 2 days playing with it, it's worthless. It requires you to run an external server application (think Graphics Server for the MS Chart control), and it also is just damned slow and outdated.
I mainly use Fury2GE (A graphics library I wrote), though I sometimes use DX7 along with it for extra speed. 
A beta of Fury2GE can be downloaded at http://fury2.happyapathy.com/fury2/d...ds/fury2ge.exe , but it doesn't have any documentation... ^_^;;
It's a pure software graphics library with about 20 different blitters and a number of flexible effects, along with alpha channel support. It loads about ~20 different image formats and can save BMPs/PNGs and to a custom compressed format. I wrote it because I wanted to make my game engine run on any 32-bit version of windows (nt4, 95, me, xp, etc) without sacrificing features or writing piles of code for multiple versions of DX.
"1 4m 4 1337 #4xz0r!'
Janus
-
Mar 2nd, 2002, 09:15 PM
#9
Addicted Member
Also, for an alternative to fastgraph that is similar but probably better:
http://www.hicomponents.com/zzimageenocx.asp <- ImageEn OCX, has a LARGE array of features from what I understand, and some of my friends say it's cool, but I've never used it myself.
when it comes to doing graphics in VB, it's pretty much DX or nothing.
"1 4m 4 1337 #4xz0r!'
Janus
-
Mar 4th, 2002, 09:26 AM
#10
Zaei:
I need information how 3D graphics in general work, how to not loose orientation in a 3D area , how to find out where to place and how to modify vertices and all that geometry stuff.
Without code is ok, C++ is better, but I don't know VB enough to do anything with it.
Vol. 2 of TofGPG comes out June, so until then I have to rely on the internet...
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Mar 4th, 2002, 09:51 AM
#11
Its pretty simple, once you get going. You start at the origin, 0.0f, 0.0f, 0.0f (just about everything uses floats =). Once you know where you start, you can define vertices. The simplest visible vertes is defined as:
Code:
struct VERTEX {
float x; float y; float z;
unsigned long color;
};
Very simply, x, y, z coordinates, with a color. I usually use Y for up, but you can set this to anything you want. Then, to actually define your vertices, you need a buffer of some sort (D3D8 uses vertex buffers for speed, while OGL can use simple pointers). For simplicity, I will just use a pointer...
Code:
VERTEX* verts = new VERTEX[3];
verts[0].x = 0.0f; verts[0].y = 1.0f; verts[0].z = 0.0f; verts[0].color = 0x00ff0000;
verts[0].x = 0.5f; verts[0].y = 0.0f; verts[0].z = 0.0f; verts[0].color = 0x0000ff00;
verts[0].x = 0.0f; verts[0].y = 0.0f; verts[0].z = 0.5f; verts[0].color = 0x000000ff;
Now we have a triangle, sitting on the origin, with three different colored vertices.
At this point, you could send your triangle to whatever API you are using, be it D3D, OGL, or whatever. The API will then use matrices to transform your 3d triangle into 2d space. There are usually 3 matices used. The Projection matrix does that actual transformation. The View matrix defines your camera. The world matrix defines transformations that you can do on each triangle drawn. For instance, we could create a rotation matrix around the y axis, and apply it to the triangle, to make it spin. This rotation matrix is multiplied by the view matrix, which defines the camera (and the UP vector, as well), and finally by the projection matrix to create a final transformation matrix. This matrix is multiplied by the vertices to get the final screen coordinates. These are then passed to the rasterizer, which does that drawing. The D3DX library included with DX8 has a ton of matrix functions that you can use, for all three types.
That should be a fairly good base, though quick =). If you need anything, just ask =).
Z.
-
Mar 5th, 2002, 06:23 AM
#12
Thanks.
Do you know a page where matrix math is explained?
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Mar 5th, 2002, 09:49 AM
#13
No, but if you do a search on google, you should find some stuff. Also, look on flipcode.com, I think that I saw something about matrices on there. If you want, I can post my matrix function library for you to take a look at.
Z.
-
Mar 5th, 2002, 12:28 PM
#14
Fanatic Member
I mostly use API, as I don't normally have good enough graphics to use DX7. I would use DX8, except that I don't know the formuals rotating, resizing, or moving objects in 3D space. I am currently in my 2nd semister of Geometry.
-
Mar 5th, 2002, 02:30 PM
#15
You dont have to know the forumlas. That is what the D3DX library matrix functions are for. You simply have to know how much you want to rotate, how much you want to resize, and where you want to move to.
Z.
-
Mar 5th, 2002, 07:03 PM
#16
Fanatic Member
Can you explain a little bit more about the functions (such as what the excate calls are for them)?
-
Mar 5th, 2002, 07:33 PM
#17
For D3D8, you can use the D3DX matrix functions:
Code:
D3DXMatrixPerspectiveFOVLH()
D3DXMatrixLookAtLH()
D3DXMatrixTranslation()
D3DXMatrixRotationX()
D3DXMatrixRotationY()
D3DXMatrixRotationZ()
D3DXMatrixScaling()
take a look in the SDK, either downloaded, or on the msdn website( msdn.microsoft.com/directx ).
Z.
-
Mar 5th, 2002, 08:28 PM
#18
Fanatic Member
I'll have to play around with it for a little bit, later.
-
Mar 6th, 2002, 06:23 AM
#19
Frenzied Member
Does anyone here know if MS is planning to support 2D in future versions of DX?
-
Mar 6th, 2002, 09:14 AM
#20
Thread Starter
Fanatic Member
Originally posted by Jotaf98
Does anyone here know if MS is planning to support 2D in future versions of DX?
I am not sure, but with Microsoft's latest move (that is; they "merged" their 2D and 3D in DX8), it seems to me that they want 2D and 3D in one and the same object. It doesn't look like they are going to split the two in a future version of DX.
I think it would be better to have a strictly 2D-oriented component, because I want that for some applications. I think the 3D is really cool and everything, but that doesn't make 2D uncool, does it? It depends on what you need, and I need 2D right now.
-
Mar 6th, 2002, 09:31 AM
#21
You can still implement 2d in 3d with DX8. It is doubtful that MS will split the two up, though. And, since you are now drawing with polygons, you get free alpha blending, sprite rotation, as well as hardware acceleration. You can easily create a wrapper to use almost exact DDraw commands, as well.
Z.
-
Mar 6th, 2002, 09:40 AM
#22
Thread Starter
Fanatic Member
Originally posted by Zaei
You can still implement 2d in 3d with DX8. It is doubtful that MS will split the two up, though. And, since you are now drawing with polygons, you get free alpha blending, sprite rotation, as well as hardware acceleration. You can easily create a wrapper to use almost exact DDraw commands, as well.
Z.
Sounds like extra work to me, but it might be worth a try.
-
Mar 10th, 2002, 05:48 PM
#23
Frenzied Member
Still, I think it's pointless, it would save a lot of processor power to just use regular blts like we have been doing all the time right?
-
Mar 10th, 2002, 08:20 PM
#24
Good Ol' Platypus
Actually quite the reverse Jotaf - since we are now doing everything in hardware the strain on the CPU is diminished because we are using the Graphics Card...
That would actually be quite a cool project to try... hmm...
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
-
Mar 10th, 2002, 08:21 PM
#25
Good Ol' Platypus
But Zaei, since you know about DX8 Graphics, is there a pixel plotting routine? I have no time to wade through senseless Microsoft drabble in their MSDN. It used to be useful but they only have now the newest things.
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
-
Mar 11th, 2002, 01:29 AM
#26
You can do back buffer locks, and write the pixels directly, but then you have to worry about bpp, etc. You can also create a vertex buffer using transformed vertices with a diffuse color, and plot the vertices with the D3DPT_POINTLIST flat. This will basically draw 1 pixel per vertex at the location specified, with the color speficied.
For standard Blts, most people use a standard transformed quad, two triangles in the shape of a square.
Z.
-
Mar 11th, 2002, 08:41 AM
#27
Frenzied Member
Hum sorry, what project?
Still, the graphcis card does a lot of unneeded calculations. And if the user doesn't have a good graphics card and it's rendered by the processor, it's gonna be a lot slower.
-
Mar 11th, 2002, 10:10 AM
#28
When using transformed and lit vertices, you specify the SCREEN location of the vertices, so no transformation calculations are done, and no lighting calculations are done. At that point, the only calculation going on is the texture mapping.
You can also optimize the process by not actually drawing on a Blt call, and saving the coordinates, etc. Then, when everything is bltted, stream the vertices into a vertex buffer, and draw that way (batching textures).
You also reduce the number of Blt calls, because textures can have an alpha component, so there is almost no need for bltting with a mask.
Z.
-
Mar 11th, 2002, 11:22 AM
#29
Fanatic Member
I have seen the alpha channel before, but I don't know what excatly it does. Can someone please let me know?
-
Mar 11th, 2002, 12:12 PM
#30
The alpha color defines how translucent a color is. An alpha of 255 is fully opaque, while 0 is fully transparent. Values in between are partially translucent. What thsi means is that when you load a texture, you can loop through each pixel in that texture, and find pixels of any color, and set its alpha value to 0, AT LOAD TIME, and whenever you use that texture, you wont see the pixels that you set to alpha 0.
Z.
-
Mar 11th, 2002, 12:22 PM
#31
Fanatic Member
-
Mar 14th, 2002, 06:26 AM
#32
Member
Meh. For 2D, I use Bitblting and load the pictures into the memory to speed it up. For 3D I use DX8. Simple really.
I'm still learning about both though.
On Error Give Up
Mind over matter. Then if it doesn't matter, you lose your mind.
-
Mar 14th, 2002, 08:36 AM
#33
Addicted Member
Microsoft doesn't need to spilt the things
for 2D you have directX7, most hardware now supports a directdraw HAL (mine does). Everything you need
DirectX8 includes Directx7.
You can do 2D in DirectX8 anyway, yes it is harder, but it allows these 3d/2d combinations (like 2d blackgrounds and 3d objects or vice-versa which can look quite good) easier.
Some Days, i just get this feeling that i'm helping to write dozens of Viruses...
-
Mar 14th, 2002, 11:04 AM
#34
Thread Starter
Fanatic Member
OK, it seems that most of you use the Windows GDI approach. That is what surprises me a little bit. I don't know why I thought DX would be a clear winner, I must have underestimated you guys.
GDI is the hacker-way (the roC++k-n-roll way), haha. More hard-core coders here than I thought.
Thanks for all the replies.
-
Mar 14th, 2002, 01:13 PM
#35
The GDI can only take you so far. It is a great starting place, but there is a point at which you will need to move up to something more.
Z.
-
Mar 14th, 2002, 01:15 PM
#36
GDI = hardcore?
No, actually DX is far more "hardcore" and roC++k'n'roll. You know, the more powerful and complicated, the more "hardcore".
Maybe in VB, GDI API calls are more complicated than the DX wrapper...
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Mar 14th, 2002, 03:51 PM
#37
I would put mode 13h in the "hardcore" list, or a software 3d renderer, but not the GDI.
Z.
-
Mar 14th, 2002, 11:46 PM
#38
Thread Starter
Fanatic Member
"hard-core" ... please don't focus on the word "hard" ... the real thing to notice is the word "core".
I agree that the HARDware-part of DX is HARD, but not CORE. The GDI is CORE, but not HARD.
Just playing with words :-)
-
Mar 15th, 2002, 08:13 AM
#39
But GDI isn't even CORE, it's a device independent wrapper (like DX, but even more abstract). I agree, Mode 13h would be HARD, CORE and HARDCORE. But it is only roCk'n'roll, not roC++k'n'roll. (BTW, neither is GDI)
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|