Author Topic: Moving my graphics stuff to Win32...  (Read 2308 times)

BlueMR2

  • Member
  • **
  • Posts: 115
Moving my graphics stuff to Win32...
« on: August 28, 2014, 10:53:47 PM »
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!

GoneFishing

  • Member
  • ****
  • Posts: 950
  • Gone fishing
Re: Moving my graphics stuff to Win32...
« Reply #1 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) 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 .
 
« Last Edit: August 29, 2014, 06:01:11 AM by vertograd »

Gunther

  • Member
  • *****
  • Posts: 3515
  • Forgive your enemies, but never forget their names
Re: Moving my graphics stuff to Win32...
« Reply #2 on: August 29, 2014, 02:07:27 AM »
Hi vertograd,

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
Get your facts first, and then you can distort them.

dedndave

  • Member
  • *****
  • Posts: 8734
  • Still using Abacus 2.0
    • DednDave
Re: Moving my graphics stuff to Win32...
« Reply #3 on: August 29, 2014, 03:09:41 AM »
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

  • Member
  • ****
  • Posts: 962
  • slightly red-shifted
Re: Moving my graphics stuff to Win32...
« Reply #4 on: August 29, 2014, 04:03:50 AM »
BLUEMR2,
Quote from: BLUEMR2
What'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
« Last Edit: August 29, 2014, 05:20:27 AM by Zen »
Zen

K_F

  • Member
  • *****
  • Posts: 1287
  • Anybody out there?
Re: Moving my graphics stuff to Win32...
« Reply #5 on: August 29, 2014, 06:52:16 AM »
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

  • Member
  • *****
  • Posts: 1454
  • The base type of a type is the type itself
    • SmplMath macros
Re: Moving my graphics stuff to Win32...
« Reply #6 on: August 29, 2014, 07:16:04 AM »
but 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

  • Member
  • *****
  • Posts: 7554
  • Assembler is fun ;-)
    • MasmBasic
Re: Moving my graphics stuff to Win32...
« Reply #7 on: August 29, 2014, 12:13:42 PM »
The latest with GDI is GDIPlus (GDI+), which is COM based

Sure?

BlueMR2

  • Member
  • **
  • Posts: 115
Re: Moving my graphics stuff to Win32...
« Reply #8 on: August 29, 2014, 09:53:39 PM »
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!

K_F

  • Member
  • *****
  • Posts: 1287
  • Anybody out there?
Re: Moving my graphics stuff to Win32...
« Reply #9 on: August 30, 2014, 03:46:14 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

  • Member
  • *****
  • Posts: 8734
  • Still using Abacus 2.0
    • DednDave
Re: Moving my graphics stuff to Win32...
« Reply #10 on: August 31, 2014, 09:16:30 PM »
i bet the GDIP flat functions are wrappers for the COM GDIP

Tedd

  • Member
  • ***
  • Posts: 353
  • Procrastinor Extraordinaire
Re: Moving my graphics stuff to Win32...
« Reply #11 on: August 31, 2014, 10:19:13 PM »
From http://msdn.microsoft.com/en-us/library/ms533798%28v=vs.85%29.aspx:
Quote
Windows 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