GXMVECTOR - Documentation? - directx-11

I am trying to re-learn directx after a decade of doing other things. I read a tutorial on the github wiki on how to render some sprites:
https://github.com/Microsoft/DirectXTK/wiki/Sprites-and-textures
In the Draw method it uses 'DirectX::SpriteBatch::Draw' and one of the overloads seems to have a parameters for an 'FXMVECTOR' and 'GXMVECTOR'. I managed to find some documentation for the former, but can't find any for the latter.
Can anyone tell me where to look?
Is it part of DirectXMath or something else?

When you see FXMVECTOR, CXMVECTOR, GXMVECTOR, or HXMVECTOR just read XMVECTOR. Same for FXMMATRIX and CXMMATRIX vs. XMMATRIX. It's just some typedef magic stuff I had to do to support the various calling conventions for x86 __fastcall, x64 __fastcall, x86/x64 __vectorcall, and Windows on ARM which are all subtlety different.
For documentation details on these types, see Microsoft Docs.
If you are new to DirectXMath, you probably want to take a look at the Simple Math wrapper in the DirectX Tool Kit.

Related

Using windows.pas with Lazarus on OS X

I was wondering if it's possible somehow to use windows.pas on OS X with Lazarus?
I need to use special library in my project, and one of key-files uses windows.pas :( Any ideas?
Windows.pas only works on Windows. You will have to edit the library to put an IFDEF around it in the uses clause, and then provide alternatives for any functionality that is then broken. Or contact the library author and see if there is already a non-Windows version available.
You certainly cannot use Windows.pas under OSX. Because Windows.pas exposes the functionality of the Win32 library.
If you need to execute Win32 code on OSX pretty much your only option is Wine.
A more plausible solution is that you find an alternative to this "special" library to which you refer.
Windows.pas is mostly a wrapper around different DLLs contained in the Windows operating system. As it is unlikely that you will find those DLLs in OSX I guess you are out of luck.
You could check the library's source code and try to identify the constants, procedures and functions that are used in windows.pas. If it is not too much code you could try to modify the library so that it uses corresponding Carbon functions instead.
While the various answers are correct, and the vast bulk of unit windows is not portable, some functionality IS abstracted. Structures like interlockedincrement, Rect and ColorRef, and some message related functionality. Have a look at types and lcltype and the system unit interface of FPC.
A lot of Delphi code still uses Windows for that functionality, while e.g. unit types already exists since D6.
Some other things are abstracted, but not using the same (windows unit) calls. Better explain what exactly you need in a separate post.

Finding out with GUI toolkit was used?

This may be the wrong place...but since it's actually regarding a GUI toolkit I figured it might be appropriate here.
Anyways theres a Program (For anyones reference it's actually an automated modding thing for a game called Morrowind). Anyways it has a nice clean GUI layout, it's for Windows. And basically im trying to find out just what toolkit was used.
I've tried contacting the author, and I haven't seen anything about what was used mentioned anywhere. Is there any chance I could find out someway which toolkit was used in making this Program?
Or is that technically private information?
If the program runs on MS-Windows, Dependency Walker allows you to find out which libraries the program requires. The required libraries might give you a hint about which GUI toolkit was used.
On other platforms, ldd is often available and gives you similar information.
This only works if the GUI toolkit is dynamically linked.

Debugging (Win): DIA versus DBGHELP

Short and concise:
What are the actual differences between DIA (Debug Interface Access) and the DBGHELP libraries? I know that DIA is COM based and seems to be extremely powerful (as well as able to be used with managed and unmanaged processes), whereas the DBGHELP seems to be very convenient to use but offers less possibilites.
Can any one explain where these two have their differences and what can be done with the one but not with the other? I am really struggling with finding some full conclusive information on the internet :(
Sorry if this seems to be a dull question, and thanks to any answers you have for me! :)
Regards
PuerNoctis
DIA has consistent COM based interface.
DbgHelp consist of a set of standard C functions.
Here two aricles I have written about DIA (with C++ Samples), that shows the power of DIA:
Symbols File Locator
How to Inspect the Content of a Program Database (PDB) File
When possible, use DIA and not DbgHelp, since DIA can be used by any COM-aware program.
It is the same thing. DbgHelp is the core api, it is usable from C. DIA is a COM object model on top of it that just makes it easier to use and makes it accessible from most any language. It is an acronym for Debug Interface Access, emphasis on "Access". The MSDN documentation for it starts here.

Regarding Windows Programming Using C++

There are many functions available in Windows API for usage,
is there any book which would act as a comprehensive reference for the APIs available in windows?
I mean the books i have been reading give a basic idea of there usage.
I would need something comprehensive,
like we have The Standard C library by Plauger. I need something like a manual (appropriately) or a book (preferably) which would divide the Windows APIs on basis of its features,etc and give the names of available functions.
Altough a bit old, Programming Windows by Charles Petzold is the bible of the Windows API. The last edition covers up to Windows 98 and NT 4.0. However it's C only.
To program in C++ with the API, you can build up your own framework, use MFC or, as I would recommend, use Qt, where you can mix API and Qt programming freely, depending on what portability to other platforms you want to achieve.
The online reference of the WinAPI is in MSDN, here: http://msdn.microsoft.com/en-us/library/ee663300(v=VS.85).aspx
That would be one hell of a big book - the Windows API is huge, and the C Standard library is tiny in comparison. Is there some reason that MSDN does not work for you?

How do I get a common-lisp GUI in Windows?

I'm using Emacs, with CLISP and Slime, and want to be able to draw pictures on the screen. I'm specifically thinking about drawing graphs, but anything that would let me draw basic shapes and manipulate them would be able to get me started.
Doug is right; CAPI will work fine. Other things you can try:
cltk: http://www.cliki.net/Lisp-Tk
I know that Allegro has something for Windows programming also, but I've never tried it.
What may also work is cells-gtk: http://common-lisp.net/project/cells-gtk/
Again, I can only tell you that it exists but not how bad it is or if it even really works...
I can not comment also on the quality of
http://www.cliki.net/GTK%20binding
But that's mostly what is available.
Corman Lisp probably has something to offer for Windows programming also.
Anyway, the choices on Windows are relatively slim. The you can probably have the most confidence in CAPI, which is used for the LispWorks IDE on Windows, Linux, MacOS X and on quite few big unices also...
Regards
I think I've found my own answer. Clojure seems to have everything I was looking for, just because I can now use all of the Java GUI items natively in LISP. It is a different dialect of LISP than the Common-Lisp I was using, but seems to have a lot of community support, and integrates with my Windows installation of Emacs either through SLIME or through the Inferior-Lisp interpreter. So far I've been very impressed.
Oh, a code sample:
(. javax.swing.JOptionPane (showMessageDialog nil "Hello World"))
Any guesses what this does? :)
Bill Clementson's blog has quite a bit on Clojure, including a lot of helpful posts on installing it. See here: his posts on Clojure
You could switch from CLISP to the free LispWorks Personal Edition and use the CAPI Graphics Ports drawing API.
Or you could use Lisp's Foreign Function Interface and use one of the graphics toolkits available for your OS.
For rolling your own (like you said, basic shapes) try Lispbuilder-SDL or one of the cl-cairo FFIs (it's just my guess that the latter work with MS Windows, though).
I know this is an old post, but so the information is here for others like me who find this thread looking for the same thing.
This library for tk bindings in common lisp seems to work fairly well.
http://www.peter-herth.de/ltk/
Clojure is an excellent Lisp, and Swing is a solid (if not particularly visually exciting) windowing toolkit. If you want do do more advanced graphics and/or dabble with game programming you might want to check out Slick, which is a general purpose graphics/game library that sits on top of Swing and gives you access to OpenGL and lots of other stuff.
I've found the Clojure/Slick combination an excellent way to do exploratory graphics programming, as you can interact with the graphics window directly from the REPL.
There's cl-cairo2 - a binding to Cairo vector drawing library. It can be used to draw various pictures on various surfaces. There's a cl-2d library that uses cl-cairo2 to draw charts.
And there's cl-gtk2 - a binding to Gtk+ library. You can create widgets that are drawn with cl-cairo2 (or cl-2d) that draw what you want.
CLISP users might find The following useful for their graphics applications:
cl-vectors is a pure Common Lisp
library to create, transform and
render anti-aliased vectorial paths.
It can be installed using
ASDF-Install.
http://projects.tuxee.net/cl-vectors/
Vecto is a simplified interface to the
powerful CL-VECTORS vector
rasterization library....the results
can be saved to a PNG ... Since Vecto
and all supporting libraries are
written completely in Common Lisp,
without depending on external non-Lisp
libraries, it should work in any
Common Lisp environment. Vecto is
available under a BSD-like license.
The current version is 1.4.3, released
on August 26, 2009.
http://www.xach.com/lisp/vecto/

Resources