Author Topic: An OpenGL little example: Ellips  (Read 6852 times)

HSE

  • Member
  • *****
  • Posts: 2494
  • AMD 7-32 / i3 10-64
An OpenGL little example: Ellips
« 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.

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!
« Last Edit: January 01, 2019, 01:22:49 AM by HSE »
Equations in Assembly: SmplMath

Siekmanski

  • Member
  • *****
  • Posts: 2718
Re: An OpenGL little example: Ellips
« Reply #1 on: December 30, 2018, 06:31:08 AM »
Cool  8)
Creative coders use backward thinking techniques as a strategy.

jj2007

  • Member
  • *****
  • Posts: 13937
  • Assembly is fun ;-)
    • MasmBasic
Re: An OpenGL little example: Ellips
« Reply #2 on: December 30, 2018, 06:48:55 AM »
Can you build it, Marinus? I get some errors :(

HSE

  • Member
  • *****
  • Posts: 2494
  • AMD 7-32 / i3 10-64
Re: An OpenGL little example: Ellips
« Reply #3 on: December 30, 2018, 08:30:08 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

  • Member
  • *****
  • Posts: 13937
  • Assembly is fun ;-)
    • MasmBasic
Re: An OpenGL little example: Ellips
« Reply #4 on: December 30, 2018, 09:35:22 AM »
Windows.inc(21860) : error A2191:cannot include structure in self

HSE

  • Member
  • *****
  • Posts: 2494
  • AMD 7-32 / i3 10-64
Re: An OpenGL little example: Ellips
« Reply #5 on: December 30, 2018, 01:06:12 PM »
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

  • Member
  • *****
  • Posts: 1381
Re: An OpenGL little example: Ellips
« Reply #6 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:

Code: [Select]
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:
Code: [Select]
rImport ImportRec <>

jj2007

  • Member
  • *****
  • Posts: 13937
  • Assembly is fun ;-)
    • MasmBasic
Re: An OpenGL little example: Ellips
« Reply #7 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.

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

  • Member
  • *****
  • Posts: 2494
  • AMD 7-32 / i3 10-64
Re: An OpenGL little example: Ellips
« Reply #8 on: December 31, 2018, 02:34:06 AM »
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

  • Member
  • *****
  • Posts: 13937
  • Assembly is fun ;-)
    • MasmBasic
Re: An OpenGL little example: Ellips
« Reply #9 on: December 31, 2018, 03:20:26 AM »
Was 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.