This topic is now archived and is closed to further replies.


using assembly in c++ with OpenGL????

Recommended Posts

I am looking for a tutorial for assembly in visual c/c++ that uses assembly. I know VERY SIMPLE assembly instructions ...but I want to learn more. I can''t find any tutorials using assembly in visual c++ anywhere. I think this will not work...I want to add asmb to assm and then output the results(I can do the output stuff). if(g_keys->keyDown[''S'']) //use ''s'' to do this asm function { _asm //this is or is not inline?? { mov edx,a //make edx ==a ??? mov edi,b //make edi ==b ??? add edi,a //add b+=a ????? } } Basically I want the (a) added to the (b) and then to output the results. I know this is VERY SIMPLE...but I am new to assembly. By the way I am buiding a Shadow Engine using the assembler.I needit to use assembly instructions(very fast!!!).

Share this post

Link to post
Share on other sites
Original post by tylerbingham I needit to use assembly instructions(very fast!!!).

It's the design / algorithm that has the greatest effect on the speed of a program, never the language. Designing your shadowing code using assembly from the outset is, imo, a very poor choice. The only area asm should be used is with SSE/3dNow, etc. (even though there are compilers out there that will do it for you)... And thats only once you KNOW that that is the code that is whats dragging your program down.

Speaking from experience, it won't be the cpu work that slows down shadowing (especially stencil shadows, which I assume your after), but always the video card.. What will a few less cycles spent by the processor do if the video card is still filling x million pixels?, and conversly, what will a few more cycles from the cpu do if you fill x million less pixels?

[edited by - RipTorn on October 17, 2002 7:14:16 AM]

Share this post

Link to post
Share on other sites
For Tutorials :

You should do a search in on " assembly x86 " .
(for learning assembly)
This means the assembly for the x86 family (cpu's).

To learn about visual c++ and assembly use google
"using assembly with visual c++" and you will find many pages!!
Like this one :

Good luck finding pages in google !!

Boldy Man

[edited by - boldyman on October 17, 2002 7:16:58 AM]

Share this post

Link to post
Share on other sites