The MASM Forum

Projects => ObjAsm => Topic started by: HSE on December 30, 2018, 06:12:44 AM

Title: An OpenGL little example: Ellips
Post by: HSE on December 30, 2018, 06:12:44 AM
Hi all!

This is almost a copy of Aleksey's ellips tiny example inside my usual ObjAsm skeleton (http://masm32.com/board/index.php?topic=7317.0).

Yesterday I began to study a minimum of OpenGl, and I think it's possible to make very interesting things, but first some learning is required.

Thanks Siekmansky for sugesting interesting Charlet's examples (http://masm32.com/board/index.php?topic=7582.msg82658#msg82658)

Later: Use mouse with left button pressed to rotate the object!
Title: Re: An OpenGL little example: Ellips
Post by: Siekmanski on December 30, 2018, 06:31:08 AM
Cool  8)
Title: Re: An OpenGL little example: Ellips
Post by: jj2007 on December 30, 2018, 06:48:55 AM
Can you build it, Marinus? I get some errors :(
Title: Re: An OpenGL little example: Ellips
Post by: HSE on December 30, 2018, 08:30:08 AM
Quote from: jj2007 on December 30, 2018, 06:48:55 AM
I get some errors :(

Obviously you are new here  :biggrin: :biggrin: :biggrin:

What error?

Later: for sure you have SmplMath in other location. I removed that because isn't used in this case. See in first post.
Title: Re: An OpenGL little example: Ellips
Post by: jj2007 on December 30, 2018, 09:35:22 AM
Windows.inc(21860) : error A2191:cannot include structure in self
Title: Re: An OpenGL little example: Ellips
Post by: HSE on December 30, 2018, 01:06:12 PM
Quote from: jj2007 on December 30, 2018, 09:35:22 AM
Windows.inc(21860) : error A2191:cannot include structure in self

We changed szText items by _szText a couple of years ago, because collision with macro.asm. Only thing I can see in windows.inc.   
Title: Re: An OpenGL little example: Ellips
Post by: felipe on December 30, 2018, 01:56:30 PM
So maybe a problem with this structure? At least that's what i have in the windows.inc at line 21860.  :idea:

IMPORT_OBJECT_HEADER STRUCT
    Sig1 dw     ?
    Sig2 dw     ?
    Version dw  ?
    Machine dw  ?
    TimeDateStamp dd ?
    SizeOfData dd   ?
    STRUCT
    UNION
        Ordinal dw  ?
        Hint dw     ?
    ENDS
    ENDS
    rImport ImportRec <>
IMPORT_OBJECT_HEADER ENDS


Specifically in my version of the file (i mean the one i have in the computer, as far as i know i have not changed anything in the original sdk file) the line 21860 has:rImport ImportRec <>
Title: Re: An OpenGL little example: Ellips
Post by: jj2007 on December 30, 2018, 08:35:20 PM
@Felipe: Right, but it won't solve the problem. Apparently, MASM cannot interpret the record correctly (Windows.inc, line 21845): ImportRec RECORD Reserved :11,NameType :3,Type2 :2

It seems not present in the list of known Masm bugs. (http://dosserv.ddns.net/japheth/JWasm/Manual.html#CHAPMASMBUGS)

Quote from: HSE on December 30, 2018, 01:06:12 PM
Quote from: jj2007 on December 30, 2018, 09:35:22 AM
Windows.inc(21860) : error A2191:cannot include structure in self

We changed szText items by _szText a couple of years ago, because collision with macro.asm. Only thing I can see in windows.inc.

@Héctor: So you have your own modified version of Windows.inc, which explains why your code assembles (at least with my non-modified version of the Masm32 SDK) only with AsmC. MASM and UAsm fail miserably. Btw who is "we"?

It is generally a good idea to post only code that a) uses the same Masm32 SDK that everybody has installed and b) has been built successfully with the three assemblers commonly used here.
Title: Re: An OpenGL little example: Ellips
Post by: HSE on December 31, 2018, 02:34:06 AM
Quote from: jj2007 on December 30, 2018, 08:35:20 PM
Btw who is "we"?

Was discussed in the forum years ago. It's an error in MASM32 SDK. Some structures rarely used have scaped from  tests. I think you have participated in discussions about problems in other structures.
Title: Re: An OpenGL little example: Ellips
Post by: jj2007 on December 31, 2018, 03:20:26 AM
Quote from: HSE on December 31, 2018, 02:34:06 AMWas discussed in the forum years ago. It's an error in MASM32 SDK.

Right, we discussed it last year (http://masm32.com/board/index.php?topic=6557.0). It's both a little problem in the SDK and a fat Masm bug.