News:

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

Main Menu

An OpenGL little example: Ellips

Started by HSE, December 30, 2018, 06:12:44 AM

Previous topic - Next topic

HSE

Hi all!

This is almost a copy of Aleksey's ellips tiny example inside my usual ObjAsm skeleton.

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

Later: Use mouse with left button pressed to rotate the object!
Equations in Assembly: SmplMath

Siekmanski

Creative coders use backward thinking techniques as a strategy.

jj2007

Can you build it, Marinus? I get some errors :(

HSE

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.
Equations in Assembly: SmplMath

jj2007

Windows.inc(21860) : error A2191:cannot include structure in self

HSE

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.   
Equations in Assembly: SmplMath

felipe

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 <>

jj2007

@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.

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.

HSE

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.
Equations in Assembly: SmplMath

jj2007

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. It's both a little problem in the SDK and a fat Masm bug.