News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Moving my graphics stuff to Win32...

Started by BlueMR2, August 28, 2014, 10:53:47 PM

Previous topic - Next topic

BlueMR2

I made the move from DOS to Win32 awhile back for my small utility programs.  Now looking to do so for my graphics stuff.  What's the best source of information for getting started on doing graphics in a Win32 environment from assembly?  I presume there are GDI calls for the basics and DirectX for gaming, but am unsure of where to start with them.

Thanks!
My Code Site
https://github.com/BrianKnoblauch

GoneFishing

#1
OpenGL is another option .
Old forum had dedicated board .
Look here for the whole set of examples .
The old versions of DirectX SDK (2007,2010) have documentation, tutorials, samples,sample browser and  tools . I don't know whether they're available for downloading from the MS site or not but  still they can be found somewhere on the internet .
And as usual - online MSDN and  Windows SDK multimedia samples can be very helpful too .

Gunther

Hi vertograd,

Quote from: vertograd on August 29, 2014, 12:27:20 AM
OpenGL is another option .
Old forum had dedicated board .
Look here for the whole set of examples .
The old versions of DirectX SDK (2007,2010) has documentation, tutorials, samples,sample browser and  tools . I don't know whether they're available for downloading from the MS site or not but  still they can be found somewhere on the internet .
And as usual - online MSDN and  Windows SDK multimedia samples can be very helpful too .

Thank you for that valuable information.  :t I forgot it.

Gunther
You have to know the facts before you can distort them.

dedndave

there is much to learn, here - and thousands of examples
start with basic GDI - that is plenty to keep your head busy for a while

http://msdn.microsoft.com/en-us/library/windows/desktop/dd162759%28v=vs.85%29.aspx

Zen

#4
BLUEMR2,
Quote from: BLUEMR2What's the best source of information for getting started on doing graphics in a Win32 environment from assembly?
As far as official publications go, there's absolutely nothing. There are alot of graphics examples here at the MASM Forum, though.
Search the Forum Links, Browse The Old UK Forum.
DirectX, because its all COM is typically done in C++ Visual Studio (just for convenience). There are many worthy publications on DirectX programming,...but, translating COM interface methods to assembly language is a major pain in the ass.
GDI functions can be invoked just like any other Windows API, so this is not difficult.   

Here are some interesting graphics websites:
Real-Time Rendering Resources
The Books Online section is valuable: Real-Time Rendering, Books Online
Real-Time Rendering page devoted to sites and tools used by authors on a continuing basis: Real-Time Rendering, Portal
NVIDIA Developer Zone
AMD Developer Central

There are some great graphics programming blogs out there:
Tom Forsyth's Tech Blog
Diary of a Graphics Programmer, Wolfgang Engel

...And, here is a PDF version of one of Wolfgang Engel's Books: ShaderX2: Shader Programming Tips & Tricks with DirectX 9
...Here is a draft version of the book: The Direct3D Graphics Pipeline, by Richard Thomson

Advanced graphics information:
Graphics Gems Repository
Tim Rowley, Graphics Papers, SIGGRAPH 2000-2006, and ACM Archives
Jonathan Shewchuk, Technical Papers, Computer Science, UC Berkeley

And, probably the best all-around website for assembly programmers is EDGAR's site: Donkey's Stable
...And, of particular interest (for GDI programming) is: EDGAR's Graphics Lib

K_F

The latest with GDI is GDIPlus (GDI+), which is COM based, and there's also Direct2D

With XP and lower I'd look at GDI+ and previous versions, but with Win7+, Direct 2D is the way.
These are 2D based things, and if you're looking at games and 3D... DirectX, OpenGL.. would be the way.

I'm busy re-inventing the GDI+ INC files, with commentary, firstly for my own proj, then for y'all   :biggrin:
This is the start, not finished 
'Sire, Sire!... the peasants are Revolting !!!'
'Yes, they are.. aren't they....'

qWord

Quote from: K_F on August 29, 2014, 06:52:16 AMbut with Win7+, Direct 2D is the way.
fully agree.

I'v uploaded a MASM32 compatible header translation for Direct2D, WIC and DWrite here.
MREAL macros - when you need floating point arithmetic while assembling!

jj2007


BlueMR2

Great info!  I'm looking forward to digging into it deeper!

My Windows 7 box was acting up last night (and I didn't have tons of time to begin with) so I didn't get started yet.  Spent all my time trying to download and install git...  Somehow Windows forgot how to move and open files...  Maybe it'll remember how tonight!
My Code Site
https://github.com/BrianKnoblauch

K_F

Quote from: jj2007 on August 29, 2014, 12:13:42 PM
Quote from: K_F on August 29, 2014, 06:52:16 AM
The latest with GDI is GDIPlus (GDI+), which is COM based

Sure?
I was repeating what I read from the MSDN somewhere... although the prototyping INC files look different.
I'll stand corrected  :biggrin:
'Sire, Sire!... the peasants are Revolting !!!'
'Yes, they are.. aren't they....'

dedndave

i bet the GDIP flat functions are wrappers for the COM GDIP

Tedd

From http://msdn.microsoft.com/en-us/library/ms533798%28v=vs.85%29.aspx:
QuoteWindows GDI+ is a class-based API for C/C++ programmers.

There isn't any COM (as far as I can see), but there are C++ classes.
However, the method calls on objects are mostly wrappers for the 'flat' functions.
Potato2