News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

Opengl sample Win10 64 help

Started by TouEnMasm, October 26, 2020, 04:19:00 AM

Previous topic - Next topic

nidud

#15
deleted

TouEnMasm


Opengl version 4.3 on my computer.
Is it the asm you have compiled ?
Fa is a musical note to play with CL

nidud

#17
deleted

TouEnMasm

The Binary work
On wich system have compiled them ?
Is there a way to upgrade opengl ?
It isn't in c++ I want a result,visual studio is enough to do that but in ASM.
Fa is a musical note to play with CL

nidud

#19
deleted

TouEnMasm


Thanks for help,
helas,don't made effect.
Fa is a musical note to play with CL

Mikl__

#21
Yves,
you still haven't answered my question. Does my program in http://masm32.com/board/index.php?topic=8880.msg96843#msg96843 work on Windows 10? There is just black screen? Or blue rotating sphere and two shapes inside the sphere?

TouEnMasm

Quote
Does my program in http://masm32.com/board/index.php?topic=8880.msg96843#msg96843 work on Windows 10?
OK,it's work
Fa is a musical note to play with CL

TouEnMasm

Found ,"ouf!",many thanks for all help.
it was the "aspect" who wasn't converted to real in resize.


resize PROC FRAME largeur:GLsizei,hauteur: GLsizei
Local aspect:GLfloat,raspect:REAL8

invoke glViewport,0, 0, largeur, hauteur
;----- Knock down by Math,let's it done by C: aspect,(GLfloat) width / height
cvtsi2ss xmm0, largeur ;DWORD PTR ;convert dword to real4
cvtsi2ss xmm1,  hauteur ;DWORD PTR
divss xmm0, xmm1
movss aspect, xmm0
cvtss2sd xmm0,aspect ; DWORD PTR convert real8
movsd raspect,xmm0

;invoke MathLabA ;aspect,(GLfloat) width / height;
invoke glMatrixMode,GL_PROJECTION
invoke glLoadIdentity
invoke gluPerspective,REEL8(45.0), raspect,REEL8(3.0),REEL8(7.0 ) ;<<<<<<<<<<<<<<< most important raspect REAL8
invoke glMatrixMode,GL_MODELVIEW
ret
resize endp


Fa is a musical note to play with CL

Mikl__

movq xmm3,constd7
movq xmm2,constd1
cvtsi2sd xmm1,w
cvtsi2sd xmm0,h
divsd xmm1,xmm0
movq xmm0,constd45
invoke gluPerspective
variable aspect (used only once) it is better not used at all
variables declared as float
GLfloat latitude, longitude, latinc, longinc

are used where double is required

    glRotated(-latitude, 1.0, 0.0, 0.0);
    glRotated(longitude, 0.0, 0.0, 1.0);
although before calling the procedure polarView it is indicated that the arguments are double
void polarView(GLdouble radius, GLdouble twist, GLdouble latitude, GLdouble longitude)
masm64 did not understand this (no explicit float to double conversion), but C++ understood

hutch--

Mikl__
see if these two instructions are any use to you.

        cvtsd2si    ; Convert Scalar Double-Precision Floating-Point Value to Doubleword Integer
        cvtsi2sd    ; Convert Doubleword Integer to Scalar Double-Precision Floating-Point Value

Mikl__

Hi, hutch--!
I know about instructions cvtsd2si and cvtsi2sd. I wrote this post after analyzing the program openglw10_64 which at first displayed a dark screen, but x64dbg showed me where are the errors