Here is a little conversion I did tonight - a nice example of how to plot a large array of points. Move the window around and watch it redraw. RadASM NMAKE Project - you'll have to change the PATHs in the makefile to build.

Edit: Small fix for SC_RESTORE because it doesn't post a WM_PAINT/WM_SIZE message.
Posted on 2001-11-12 06:35:16 by bitRAKE
To Everyone:

Two examples have been made for Direct3d in the hopes that everyone will get a chance to learn from and ultimately share knowledge with others :)

This is a contribution of mine (although I could not have done it without either BitRAKE or Scronty and many others on this messageboard -- everyone who put up with my lack of experience and stupid questions)

The first:
And indices example

In the given lesson we shall consider one, rather important and useful aspect - indexing of primitives (polygons). The given technique allows us to avoid repetition of datas at the definition of vertices. We simply create the vertices, necessary to us, and then we set polygons by the indicating of necessary indexes (each of which is compared to vertex). It allows us to save of multiple repetition of the same datas (that in turn allows us to spare memory), and also from a problem of upgrade of the same datas (as well as Speeds of their upgrade). Within this example we also deal with animation ("pageup" and "pagedown" keys)


Sliver

---EDIT---
It has come to my attention that if animation is on too long it will slow the system down... The program doesn't start with animation so you can veiw the example without any real problems... I'll keep you informed and post a new example when I figure this all out
Posted on 2001-11-19 00:32:29 by Sliver
To Everyone:

In this "not really finished" example... Mainly because I got part of it working (with Scronty's help) and then decided that maybe he was right and I should try another approach at my terrain generation idea (indices example above)...

Anyway, in this example the triangles are generated from a file called "World.txt" -- after parsing the text :)

The program is a little buggy -- mostly with the walking (I'm still working on taking the kinks out -- this example doesn't represent my bug free version (mainly because my bug free version solves a few problems but opens up SO many more)... I'll spare you the agony of it...

Sliver
Posted on 2001-11-19 00:41:58 by Sliver
Sliver, nice to see indices working - cool wavy look - need to try a water texture. :) You can see compared to the final code, my 'help' above wasn't any. :rolleyes: It worked out much better once I spent more time with it.
Posted on 2001-11-19 22:46:32 by bitRAKE
Well, I for one didn't know how hard it would be to just add 2 for loops into my example (I honestly thought I could do it in about 1 hour -- I mean I was just porting a piece of code :)

Anyway, my question is I believe the problem with the example deals with my "rlz" variable...

since it increases by .04 everytime the program runs the "UpdateAnimation" proc it seems to eventual bog the system down... or maybe calculating the sin of 716923748162948716416928.4710982374817 can get a little tough...
so what can I do about this... I'm trying different approaches, but I figure I'd like to stay with the FPU

sliver
Posted on 2001-11-19 23:43:17 by Sliver
You could wrap the value - the animation is periodic, but are you sure that's it? Hardly believe that could make my 1.3Ghz crawl. :) Hope you never get a key larger than 255! :)
Posted on 2001-11-20 01:00:31 by bitRAKE
No, unfortunately I'm not too sure... but I tried to eliminate everything except that code and weird things started to happen :(

I'm not too keen on weird things at this stage... I dunno I'll prob. have a better time looking at the code after I wake up in the morning...

Sliver

ps. I'm glad I'm not sky-diving
Posted on 2001-11-20 01:05:06 by Sliver
i need someone to give me the beginning of a masm program that uses opengl . all the program needs to do when someone gives it to me is make triangles where & when i want them made .
i cant find anything on how to make a simple loop that generates triangles . Then i will make all of the formulas , compare & branch instructions that will be needed . is that simple enough ? if you want more details then ask a question .
Posted on 2001-11-20 12:08:10 by comofmic
comofmic, ...and why would you ask such a question in a thread about DX8?

Try this page: (Scalp)
Posted on 2001-11-20 12:32:16 by bitRAKE

i need someone to give me the beginning of a masm program that uses opengl . all the program needs to do when someone gives it to me is make triangles where & when i want them made .
i cant find anything on how to make a simple loop that generates triangles . Then i will make all of the formulas , compare & branch instructions that will be needed . is that simple enough ? if you want more details then ask a question .


Excuse me? This isn't a "I want sources -- give me give me give me" service. If you do a little research maybe you'd see that their are examples on the internet in the use of opengl (in masm). In otherwords -- no soup for you.

Please refrain from making demands like this in the future and maybe someone will be more helpful

-=Sliver=-
Posted on 2001-11-20 15:00:31 by Sliver
Afternoon, Sliver.

During the animation, the previous VertexBuffer isn't released - therefore using up more memory each loop until WinOS starts using the H/Drive for additional storage ;)

The solution is to release the previous VertexBuffer like so:
(in the "UpdateAnimation" PROC)


.
.
.
jnz @OuterLoop3

mcall [g_pVB],IUnknown_Release ; <- release previous VB

mcall [g_pd3dDevice], IDirect3DDevice8_CreateVertexBuffer,....
.
.
.


Cheers,
Scronty
Posted on 2001-11-20 15:02:19 by Scronty
Originally posted by Scronty
Afternoon, Sliver.

During the animation, the previous VertexBuffer isn't released - therefore using up more memory each loop until WinOS starts using the H/Drive for additional storage ;)



Ok, I feel very stupid right now... I'm going to proofread my work from now on...

Sliver
Posted on 2001-11-21 15:01:39 by Sliver
Afternoon, Sliver.

Don't feel too bad. It took me a while to find the error. I originally thought it had something to do with bitRAKEs' fancy algorithym design:grin: - weeell, it's fancy compared to my clunky style:tongue: .

Cheers,
Scronty
Posted on 2001-11-21 16:09:15 by Scronty
Huh, what? There is not ever any errors in my code. :rolleyes:
We call them 'features' in this part of the world. :)
Posted on 2001-11-21 16:20:23 by bitRAKE
Afternoon, bitRAKE.

I'd really like to figure out that "feature" in the DolphinVS example...;)

I'm sure "invisible text" could be counted as a feature.

Cheers,
Scronty
Posted on 2001-11-21 16:34:26 by Scronty
Here is the indices program again -- this time it works :-) I also added a water texture and some code to make the water "texture" move :) Now it really looks like waves...

Sliver
Posted on 2001-11-22 01:22:18 by Sliver
Okay, now we need a surf board with a 'dude', and a shark fin. :alright:
Posted on 2001-11-22 02:56:52 by bitRAKE
mr. sliver . people like you ( un-co-operative ) dis-functional person who wastes peoples time , i like to describe as an ass who is the most likely to recieve a pipe bomb in his mail box from other mis-treated people who are rejected only because there are simplistic sub-humans who are a product of there environment
cant seem to put themselves in other peoples shoes & act with love instead of being snobish & self destructive . these are my observations on the simplistic human race . you must enjoy being poor .:stupid:
Posted on 2001-11-22 10:36:11 by comofmic
The problem with your response is that it has no basis in fact.

I'm always very willing to help those who help themselves. The problem with your question was, errr... well, it wasn't a question -- more like a demand.

lets go through this one more time:


Originally posted by comofmic
i need someone to give me the beginning of a masm program that uses opengl .


Why couldn't you do a quick search of "Masm" and "opengl" on the goggle? It may have pulled up nehe.gamedev.net (where scalp has ported opengl to masm)


all the program needs to do when someone gives it to me is make triangles where & when i want them made .

This doesn't seem to demanding does it? Nah... I guess I was totally wrong about you!


i cant find anything on how to make a simple loop that generates triangles .Then i will make all of the formulas , compare & branch instructions that will be needed . is that simple enough ? if you want more details then ask a question .

Generating triangles is different from opengl and directx (you really need to specify which you "need" -- I mean I hate to get the order you have requested wrong.

Wait? Are you sure you want to do the formula part? I'm pretty sure that after writing the rest for you I don't mind going the extra step and just finishing it. I mean you have contibuted so much to the win32asm community I think it's about time someone paid homage to you? right?

I think your swell... Good luck and tell me if I can be of service in the future :)

-=Sliver=-
Posted on 2001-11-22 11:46:00 by Sliver
""
Posted on 2001-11-22 14:14:02 by comofmic