News:

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

Main Menu

Opengl sample Win10 64 help

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

Previous topic - Next topic

TouEnMasm

Hello,
I try to translate a sample(C++) in asm.
There is no bug but ....Just black screen.
Any idea ?
Fa is a musical note to play with CL

kiptron

Dear Tou  I have stuggled with the opengl API for years now. I posted a full masm template
to this forum not to far down the list. It is called Simplest opengl implementation by Kiptron (me)
There are so many issues here I don't know where to start. #1 you need proper context creation.
This is a gray area. Different drivers have inconsistent methods for doing this. I am finding that
there may be alignment issues  with different drivers ?  I play "Whack A Mole" with protection
faults constantly. They pop up in unexpected places. A call will work here but not there for no known
reason. Maybe some of the "gurus" will help us out here. ?? I hope   Kiptron 

LiaoMi

Quote from: TouEnMasm on October 26, 2020, 04:19:00 AM
Hello,
I try to translate a sample(C++) in asm.
There is no bug but ....Just black screen.
Any idea ?

Hi TouEnMasm,

everything works for me, maybe you need to check the libraries. Through the debugger it would be clear which api does not work. I chose the wrong example, the screen is black.




kiptron

  Tou,  I forgot to mention that your .exe runs O.K. on my machine. AMD graphics
card. It is displaying to fast so you might want to tie it to vertical sync, in the
windows event loop. Looks good here  Kiptron

Mikl__

Salut, Yves!
Je ne peux pas tester le programme sous Windows 10. J'ai Windows 7 64 bits

hutch--

I get the same problem, my old box has an Nvidia GTX-960 where the later ones use an Amd RADEON RX-580. When I first tried kiptron's example, it did not work on my old box but worked fine on any that ran the Amd video cards.

Mikl__

Hi, hutch--!
Did my program start normally or displays a black screen? Do you have Windows 10 or something else?

hutch--

Hi Mikl__

00.zip worked fine, blue rotating frame, rabbit cursor and two shapes inside the frame.

This box has a GTX-960 Nvidia graphics card.

kiptron

Hi again dudes. I would like to add my thoughts on this as I have been at it for so long
and really like opengl. One of the main issues is that this API is losing support with the
hardware vendors who have to keep their drivers current and there is the problem. There
has not been a comprehensive upgrade to the "core" API since it was released by
Silicon Graphics in 1991  That's 29 years of HUGE advances in the GPU's but not in the
core API itself. The chip makers have tried to provide this improved functionality by
writing "extensions" to the original API. These extensions are an ad-hoc collection of
functions which are not consistent across the industry but differ from one chip maker
to another. The programmer (us) has to request an address pointer to these calls and
often has no documentation to go on when running these functions. Opengl is currently
un-maintained by any serious group, company or body. There is the "architectural review
board" ARB which approves these extensions for release but has no real authority to act
in any way. There is Khronos which is dropping opengl in favor of Vulkan. I run many of
these extensions and my projects are usually unstable and subject to crashes and
protection faults as I mentioned. It is a big frustrating mess.  Kiptron   

TouEnMasm


Thanks all for the answer,
Quote
Tou,  I forgot to mention that your .exe runs O.K. on my machine. AMD graphics
card. It is displaying to fast so you might want to tie it to vertical sync, in the
windows event loop. Looks good here  Kiptron
Happy are you.After further tests with the C++ prog,it seems it is a real problem to compile.
CL  used at command line give me a white graphics.
There is only with the visual studio compile that i can have the colors.


Fa is a musical note to play with CL

Mikl__

Salut, Yves!
Le problème est bien différent. J'ai créé un programme sans Visual Studio. Mon programme fonctionne-t-il dans votre Windows 10?

TouEnMasm


C'est gentil de me le dire,mais je ne vois aucun lien
Fa is a musical note to play with CL

nidud

#12
deleted

TouEnMasm


Just but not enough in asm 64 and 32 bits.
I find :
latitude GLfloat 0           ;change original GLdouble       generate stack problem in 32 bits
longitude GLfloat 0

polarView PROTO :GLdouble, :GLdouble, :GLfloat, :GLfloat           ;proto change


   follow changes in this proc
polarView PROC FRAME aradius:GLdouble ,twist:GLdouble ,alatitude:GLfloat ,alongitude:GLfloat 
Local moins:GLdouble,plus

movsd xmm0, aradius ;negate value help c
xorps xmm0, qword ptr [flip_bit]
movsd moins, xmm0
invoke glTranslated,REEL8(0.0), REEL8(0.0),moins ; -aradius
movsd xmm0,twist
xorps xmm0, qword ptr [flip_bit]
movsd moins, xmm0
invoke glRotated,moins,REEL8(0.0),REEL8(0.0),REEL8(1.0)
movss xmm0,alatitude
xorps xmm0, qword ptr [flip_bit]
movsd moins, xmm0
invoke glRotated,moins,REEL8(1.0),REEL8(0.0),REEL8(0.0)
xor R10,R10
mov R10D,alongitude
mov moins,R10
invoke glRotated,moins,REEL8(0.0),REEL8(0.0),REEL8(1.0) 
ret
polarView endp


And I stay with the same problem,no bug,no error,no problem with stack but .... black screen in asm

Fa is a musical note to play with CL

nidud

#14
deleted