Total Format - Total Entertainment
 
 

Go Back   Total Format Forum > Computing Forums > Coding, Design & Graphics

Coding, Design & Graphics If you are programming a script, designing a web page, building your own graphics or anything related and need to discuss it, get help and tips or general advice, then you should post your thoughts to this section.

Reply
 
LinkBack Thread Tools Display Modes
Old 26-08-2008, 20:17   #1 (permalink)
Name, Title, Location Allanon
Meatbag

Malton
England
AvatarAllanon's Avatar
Mood
Posts961
Karma Allanon is an experienced TFer.
Allanon is an experienced TFer.Allanon is an experienced TFer.Allanon is an experienced TFer.Allanon is an experienced TFer.Allanon is an experienced TFer.Allanon is an experienced TFer.Allanon is an experienced TFer.Allanon is an experienced TFer.Allanon is an experienced TFer.Allanon is an experienced TFer.Allanon is an experienced TFer.Allanon is an experienced TFer.Allanon is an experienced TFer.
Pu7,702.83
Default Tips Learning DirectX

Hail fellow nerds!

Recently started learning DirectX. Got myself a book on DirectX10 (might drop down to DX9 as there are more books etc). It's quite a good book bit I've never tried to learn the use of an API like this and it just seems there's tons of stuff to remember. The majority of it is filling in structures with a load of members all with annoyingly long and cryptic names

Anyway my current tactic is to just keep reading and rereading and keep writing out the code and hope it'll eventually stick.

Was just wondering if anyone has any tips to approach learning this stuff. Any other general comments about learning to use DirectX are more than welcome as well.

Live long and prosper
Allanon's Sig:

When A man lies, he murders some part of the world. These are the pale deaths by which men miscall their lives. All this I cannot bear to witness any longer, cannot the kingdom of salvation, take me home?
Tools Allanon is online now
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 26-08-2008, 20:41   #2 (permalink)
Name, Title, Location meow
Kissed all the girls

The twighlight zone
Maldives
Avatarmeow's Avatar
Mood
Posts3,207
Karma meow is amazing.
meow is amazing.meow is amazing.meow is amazing.meow is amazing.meow is amazing.meow is amazing.meow is amazing.meow is amazing.meow is amazing.meow is amazing.meow is amazing.meow is amazing.meow is amazing.
Pu6,789.17
Awards
TF Top Poster Bronze 
Total Awards: 1
Cat 3 Gift Box Medal Single Red Rose Flowers Cake French Fries litebeer Subway Apple Heart Love Hearts Cash Love Hearts Tissues

Default

Riemers XNA Tutorial > DirectX using C#

I would avoid using directx if I could, its outdated, low level, doesnt lend to OOP very well and being raplaced gradually, its also one of the most awefull kludgy API to use.

for high level languages, such as c# with .net the situation isnt very good, microsoft started work on manged directx, but then started working on xna, however xna is mostly for the xbox, and many windows features are hard to use, however theyve now abandoned the managed directx library so its going to end up obselete. this leaves directx rather akwrd to use. opengl is becoming a reasonabl ealternative.

there are a variety of graphics engines wich do a lot for you, from just handling the basics, to doing evrything, it depends wich language you intend to program from.
meow's Sig:"Some people see things as they are and ask `Why?'. I dream of things that never were and ask `Why not?'. "
"science without religion is lame, religion without science is blind"
Toolsmeow is offline
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 29-08-2008, 19:52   #3 (permalink)
Name, Title, Location Allanon
Meatbag

Malton
England
AvatarAllanon's Avatar
Mood
Posts961
Karma Allanon is an experienced TFer.
Allanon is an experienced TFer.Allanon is an experienced TFer.Allanon is an experienced TFer.Allanon is an experienced TFer.Allanon is an experienced TFer.Allanon is an experienced TFer.Allanon is an experienced TFer.Allanon is an experienced TFer.Allanon is an experienced TFer.Allanon is an experienced TFer.Allanon is an experienced TFer.Allanon is an experienced TFer.Allanon is an experienced TFer.
Pu7,702.83
Default

Thanks for the link, it offers C++ DirectX tutorials which is what I was after. It seems to follow my book pretty closely, but it's always nice to have different perspectives.

I'm pretty determined to learn DirectX, I'll just have to fight my way through the kludginess

Cheers.

Must spread Karma. Been consulting meowpedia too often >.<

Last edited by Allanon; 29-08-2008 at 19:53.. Reason: karma system = noob
Allanon's Sig:

When A man lies, he murders some part of the world. These are the pale deaths by which men miscall their lives. All this I cannot bear to witness any longer, cannot the kingdom of salvation, take me home?
Tools Allanon is online now
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links

Old 29-08-2008, 21:17   #4 (permalink)
Name, Title, Location meow
Kissed all the girls

The twighlight zone
Maldives
Avatarmeow's Avatar
Mood
Posts3,207
Karma meow is amazing.
meow is amazing.meow is amazing.meow is amazing.meow is amazing.meow is amazing.meow is amazing.meow is amazing.meow is amazing.meow is amazing.meow is amazing.meow is amazing.meow is amazing.meow is amazing.
Pu6,789.17
Awards
TF Top Poster Bronze 
Total Awards: 1
Cat 3 Gift Box Medal Single Red Rose Flowers Cake French Fries litebeer Subway Apple Heart Love Hearts Cash Love Hearts Tissues

Default

yep ive used that site a lot, it has great tutorials, also the directx software development kit SDK is a good place to look.

it realy depends what you want to do with directx.even doing the stuff the simple way like drawing individual points is quite a lot to learn and triangles and meshes and lighting etc. the trouble is that when you reach a certain point all that becomes useless and you have to make sure you use more eficient function calls wich are totaly diferent.

then once you get even more items to draw you have to re organise your code yet again to make sure all draw operations are joined together in batches of primitives all with the same render state and textures. then you have to make sure any translucent surfaces are drawn last etc.

I have a module wich is about 1000 lines wich does almost all the low level stuff you ever need to do with directx and any calls to it do not need to reference directx so it can easily be replaced when directx is made obselete.

the higher level module deals with all the sorting of objects into batches etc. I spent ages trying to get various 3d graphics engines to do exactly what I wanted. but each of them had problem with one of the things i wanted to do.

with c++ theres quite a lot more work, as you need to ensure you free all memory etc at the right time wich with directx is a heck of a lot of work. when an other aplication grabs the device many of the data items you sent to the device become invalid such as textures and render surfaces etc, and its a lot to deal with as there are so many diferent types. once youve done that youl probably have many many thousands of lines of difficult to debug code that causes memory leaks and illegal memory access errors.

with c# the memory management manages to cope with it all quite well.

with c# you can get a free microsoft development system and with the xna wich is similar to directx you can write your own game in a few easy lessons. however xna is a real pain if you want to have multiple 3d viewports.

directx is also awkward to use becuase only one aplication can use it at a time, at least easily anyway.
with opengl there is no such limitation.

although opengl and directx look fairly diferent at first, once you start to use the batch processing functions theres actualy little diference between them. exept of course directx is a lot more work. niether are realy OOP friendly.

I would stronlgly sufggest looking at the many 3D engines out there some are truly fantastic.
the ones I was looking at were all open source such as Irrlicht Engine - A free open source 3d engine
meow's Sig:"Some people see things as they are and ask `Why?'. I dream of things that never were and ask `Why not?'. "
"science without religion is lame, religion without science is blind"
Toolsmeow is offline
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 31-08-2008, 19:45   #5 (permalink)
Name, Title, Location Allanon
Meatbag

Malton
England
AvatarAllanon's Avatar
Mood
Posts961
Karma Allanon is an experienced TFer.
Allanon is an experienced TFer.Allanon is an experienced TFer.Allanon is an experienced TFer.Allanon is an experienced TFer.Allanon is an experienced TFer.Allanon is an experienced TFer.Allanon is an experienced TFer.Allanon is an experienced TFer.Allanon is an experienced TFer.Allanon is an experienced TFer.Allanon is an experienced TFer.Allanon is an experienced TFer.Allanon is an experienced TFer.
Pu7,702.83
Default

Once again thanks for the info, even if it did see my confidence plummet

Ideally I'd like to end up working in the games industry. DirectX is pretty much the standard ergo, I want/need to learn it.

I've taken on board what you've said even if I wasn't following 100% so cheers.
Allanon's Sig:

When A man lies, he murders some part of the world. These are the pale deaths by which men miscall their lives. All this I cannot bear to witness any longer, cannot the kingdom of salvation, take me home?
Tools Allanon is online now
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 31-08-2008, 21:57   #6 (permalink)
Name, Title, Location meow
Kissed all the girls

The twighlight zone
Maldives
Avatarmeow's Avatar
Mood
Posts3,207
Karma meow is amazing.
meow is amazing.meow is amazing.meow is amazing.meow is amazing.meow is amazing.meow is amazing.meow is amazing.meow is amazing.meow is amazing.meow is amazing.meow is amazing.meow is amazing.meow is amazing.
Pu6,789.17
Awards
TF Top Poster Bronze 
Total Awards: 1
Cat 3 Gift Box Medal Single Red Rose Flowers Cake French Fries litebeer Subway Apple Heart Love Hearts Cash Love Hearts Tissues

Default

if you want to work in the games indusrty good luck

unfortunatly I think most games seem to use directx, although I would imagine if you worked for a large games company you would not likely to be writing software to interface to directx, however knowledge of directx might well stand you in good stead at the interview

they probably also still highly likely to use c++, although i would argue c# is now more effective, becuase you can arrive at a working solution far quicker, and spend the remaining time optimising the crap out of any function that is spending most of the cpu time.

if you look at that 3d library I mentioned youl realise how complicate they are, and its not something to taken new game engine development lightly.

im not sure what ps3 uses, but xbox seems to be somewhat compatable with directx.

I think theres a lot of reasons to move away from directx but i doubt this will realy hapen, just like 64 bit PCs are still efectily 16bit machines with extra bits kludged on.

you would not beleive how long i spent trying to find a solution to a few obscure problems, and this is with c# wich takes care of all the memory management.
meow's Sig:"Some people see things as they are and ask `Why?'. I dream of things that never were and ask `Why not?'. "
"science without religion is lame, religion without science is blind"
Toolsmeow is offline
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-09-2008, 05:46   #7 (permalink)
Name, Title, Location ShiningForce
Bucky O' Hare

Dundee
Scotland
AvatarShiningForce's Avatar
Posts1,778
Karma ShiningForce is a good member of TF.ShiningForce is a good member of TF.
ShiningForce is a good member of TF.ShiningForce is a good member of TF.ShiningForce is a good member of TF.ShiningForce is a good member of TF.
Pu8,578.67
Default

I've never liked DirectX too much. For any sort of rapid graphical app development, OpenGL is just easier (no fiddling around with vertex buffers! Just pumping vertices straight at the GPU!).

I used DirectX Tutorial.com - Game Programming with DirectX 9 to get on top of DirectX 9.0 in C++ (You might want to back off from 10 for now as I've heard it's quite different from 9, so a lot of tutorials etc. will be outdated and redundant).

Good luck! Make some noises if you get stuck and maybe one of us will be able to help...
ShiningForce's Sig:
ToolsShiningForce is offline
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-09-2008, 09:29   #8 (permalink)
Name, Title, Location meow
Kissed all the girls

The twighlight zone
Maldives
Avatarmeow's Avatar
Mood
Posts3,207
Karma meow is amazing.
meow is amazing.meow is amazing.meow is amazing.meow is amazing.meow is amazing.meow is amazing.meow is amazing.meow is amazing.meow is amazing.meow is amazing.meow is amazing.meow is amazing.meow is amazing.
Pu6,789.17
Awards
TF Top Poster Bronze 
Total Awards: 1
Cat 3 Gift Box Medal Single Red Rose Flowers Cake French Fries litebeer Subway Apple Heart Love Hearts Cash Love Hearts Tissues

Default

opengl 1.5+ has vertex buffers.

ofc you dont have to use them, niether do you have to in directx, but you cant do much without them in either as each call to the graphics device has an enormous overhead.

opengl has display lists wich can be used instead of vertex buffers but these are not as fast or as flexible as vertex buffers, but are however easy to use and quicker than pixel by pixel drawing.

vertex buffers become necessary when drawing large numbers of polygons, as the efficient graphics calls take triangles, splitting the polygons into triangles creates many more points wich increases memory bandwidth.

using vertex buffer AND index buffer solves this problem by storing each point once and using indices for the list of points in eacg triangle, wich keeps the memory bandwidth down.
meow's Sig:"Some people see things as they are and ask `Why?'. I dream of things that never were and ask `Why not?'. "
"science without religion is lame, religion without science is blind"
Toolsmeow is offline
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-09-2008, 23:23   #9 (permalink)
Name, Title, Location ShiningForce
Bucky O' Hare

Dundee
Scotland
AvatarShiningForce's Avatar
Posts1,778
Karma ShiningForce is a good member of TF.ShiningForce is a good member of TF.
ShiningForce is a good member of TF.ShiningForce is a good member of TF.ShiningForce is a good member of TF.ShiningForce is a good member of TF.
Pu8,578.67
Default

I guess it's cause I'm more interested in physics than graphics, but it just seems like so much work to get something on screen. I'd rather just get stuff displayed and then make it do fun things than fight to get polygons on screen.

Also all the fun of graphics begins once objects are on screen, and you can start pushing them through shaders and other interesting things.
ShiningForce's Sig:
ToolsShiningForce is offline
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-09-2008, 13:33   #10 (permalink)
Name, Title, Location meow
Kissed all the girls

The twighlight zone
Maldives
Avatarmeow's Avatar
Mood
Posts3,207
Karma meow is amazing.
meow is amazing.meow is amazing.meow is amazing.meow is amazing.meow is amazing.meow is amazing.meow is amazing.meow is amazing.meow is amazing.meow is amazing.meow is amazing.meow is amazing.meow is amazing.
Pu6,789.17
Awards
TF Top Poster Bronze 
Total Awards: 1
Cat 3 Gift Box Medal Single Red Rose Flowers Cake French Fries litebeer Subway Apple Heart Love Hearts Cash Love Hearts Tissues

Default

well, i wanted to make a simple model editor, but ended up geting far too absorbed in the graphics detail, fortunatly you can just copy a sample from the c# xna and get a game up and running in a few minutes, then modify it to you hearts desire

however for an editor having one fixed game window was a hard limitation to overcome, and so tried various other things including managed directx, opengl, and various libraries. opengl is simpler definatly, and opengl has call lists wic improve speed considerably as you compile pixel by pixel routines into one list.

Solo's Unreal site |

My biggest problem came when I had 200k polygons and wanted to use bitmaped lighting, and made the mistake of having a bitmap for each surface, combining 100s of bitmaps into one bitmap was the answer. even with my old radeon 9800 i was able to get almost 70fps. (instead of 3fpm)

ps theres a graph of calls per second for opengl v directx wich is a severe limitatio in either case althoug opengl seems to manage twice as many calls, but its still quite low, you cant do more than a few thousand calls per second.
meow's Sig:"Some people see things as they are and ask `Why?'. I dream of things that never were and ask `Why not?'. "
"science without religion is lame, religion without science is blind"
Toolsmeow is offline
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-09-2008, 20:09   #11 (permalink)
Name, Title, Location Allanon
Meatbag

Malton
England
AvatarAllanon's Avatar
Mood
Posts961
Karma Allanon is an experienced TFer.
Allanon is an experienced TFer.Allanon is an experienced TFer.Allanon is an experienced TFer.Allanon is an experienced TFer.Allanon is an experienced TFer.Allanon is an experienced TFer.Allanon is an experienced TFer.Allanon is an experienced TFer.Allanon is an experienced TFer.Allanon is an experienced TFer.Allanon is an experienced TFer.Allanon is an experienced TFer.Allanon is an experienced TFer.
Pu7,702.83
Default

Quote:
Originally Posted by ShiningForce View Post
I've never liked DirectX too much. For any sort of rapid graphical app development, OpenGL is just easier (no fiddling around with vertex buffers! Just pumping vertices straight at the GPU!).

I used DirectX Tutorial.com - Game Programming with DirectX 9 to get on top of DirectX 9.0 in C++ (You might want to back off from 10 for now as I've heard it's quite different from 9, so a lot of tutorials etc. will be outdated and redundant).
Thanks for the link, looks promising ^.^

Quote:
Originally Posted by ShiningForce View Post

Good luck! Make some noises if you get stuck and maybe one of us will be able to help...
I will. They might be strangled noises of DX based suffocation but they'll be noises nonetheless .
Allanon's Sig:

When A man lies, he murders some part of the world. These are the pale deaths by which men miscall their lives. All this I cannot bear to witness any longer, cannot the kingdom of salvation, take me home?
Tools Allanon is online now
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-09-2008, 22:27   #12 (permalink)
Name, Title, Location meow
Kissed all the girls

The twighlight zone
Maldives
Avatarmeow's Avatar
Mood
Posts3,207
Karma meow is amazing.
meow is amazing.meow is amazing.meow is amazing.meow is amazing.meow is amazing.meow is amazing.meow is amazing.meow is amazing.meow is amazing.meow is amazing.meow is amazing.meow is amazing.meow is amazing.
Pu6,789.17
Awards
TF Top Poster Bronze 
Total Awards: 1
Cat 3 Gift Box Medal Single Red Rose Flowers Cake French Fries litebeer Subway Apple Heart Love Hearts Cash Love Hearts Tissues

Default

http://developer.nvidia.com/docs/IO/...BatchBatch.pdf

frame 15 shows opengl/directx comparision.
dx10 is suopsedly faster than dx9
meow's Sig:"Some people see things as they are and ask `Why?'. I dream of things that never were and ask `Why not?'. "
"science without religion is lame, religion without science is blind"
Toolsmeow is offline
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Tags
directx, learning, tips

« How to? | Django »
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Tips, Tricks and hidden stuff Cintaria TF Arcades Fun Chat 3 23-04-2009 18:22
Tips on learning guitar Allanon Music Discussion 11 15-01-2008 19:12
Early Learning Centre Hot Offers Detomah Shopping Offers 0 03-12-2007 11:24
Early Learning Centre - Special Offers and Christmas Gift Ideas Detomah Shopping Offers 0 23-11-2007 10:40
Dyslexia Detomah Health, Lifestyle, Hobbies and Sport 0 05-11-2006 17:50

 
 
Archive - RSS Feeds - About Us - Privacy - Terms of Use - Site Map - Advertising - Link To TF - Contact Us - Top
Content Relevant URLs by vBSEO 3.2.0 RC5 Copyright ©2003 - 2000, Total Format. Forums powered by vBulletin, Copyright ©2000 - 2009, Jelsoft Enterprises Limited.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385