VOGONS


Openglide on MacOS X

Topic actions

  • This topic is locked. You cannot reply or edit posts.

Reply 20 of 69, by gulikoza

User metadata
Rank Oldbie
Rank
Oldbie

Can you post the contents of your modified grSstWinOpen() so that I can see exactly where this prints?

These warnings can possibly be fixed by adding const to prototype of void GLErro( char *Funcao ). Change it to:

void GLErro( const char *Funcao )

in GLutil.cpp and GlOgl.h.

http://www.si-gamer.net/gulikoza

Reply 21 of 69, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

starting from line 241 (I may have overdid the glidemsg thing, but I put one in wherever I thought I could add one...)

grSstWinOpen(   FxU hwnd,
GrScreenResolution_t res,
GrScreenRefresh_t ref,
GrColorFormat_t cformat,
GrOriginLocation_t org_loc,
int num_buffers,
int num_aux_buffers )
{
GlideMsg( "grSstWinOpen( %d, %d, %d, %d, %d, %d, %d )\n",
hwnd, res, ref, cformat, org_loc, num_buffers, num_aux_buffers );
if ( OpenGL.WinOpen )
{
grSstWinClose( ); GlideMsg("1");
}

if (!InterpretScreenResolution(res, Glide.WindowWidth, Glide.WindowHeight))

{
#ifdef OGL_DEBUG
Error( "grSstWinOpen: res = GR_RESOLUTION_NONE\n" );
GlideMsg("2");
#endif
return FXFALSE;
GlideMsg("3");
}

if (!InterpretScreenRefresh(ref, OpenGL.Refresh))

{
#ifdef OGL_DEBUG
Error( "grSstWinOpen: Refresh Incorrect\n" );
GlideMsg("4");
#endif
return FXFALSE;
GlideMsg("5");
}

OpenGL.WindowWidth = Glide.WindowWidth;
GlideMsg("6");
OpenGL.WindowHeight = Glide.WindowHeight;
GlideMsg("7");
Glide.WindowTotalPixels = Glide.WindowWidth * Glide.WindowHeight;
GlideMsg("8");

OpenGL.WaitSignal = (int)( 1000 / OpenGL.Refresh );
GlideMsg("9");

// Initing OpenGL Window
if ( !InitWindow( hwnd ) )
{
return FXFALSE;
GlideMsg("10");
}

Glide.State.ColorFormat = cformat;
GlideMsg("11");
Glide.NumBuffers = num_buffers;
GlideMsg("12");
Glide.AuxBuffers = num_aux_buffers;
GlideMsg("13");
Show last 5 lines

#ifdef OGL_DONE
GlideMsg( "grSstWinOpen( %d, %d, %d, %d, %d, %d, %d )\n",
hwnd, res, ref, cformat, org_loc, num_buffers, num_aux_buffers );
#endif

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 23 of 69, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

maybe move he messages before the return FXFALSE;

Doesn't change the output, still only 6,7,8,9...

These warnings can possibly be fixed by adding const to prototype of void GLErro( char *Funcao ).

yep, that fixes those warnings.

Reply 25 of 69, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

so if you add a msg right to the top of InitWindow() (before InitialiseOpenGLWindow call) in Glide.cpp it doesn't print?

THAT in glide.cpp gets printed! and if I add another message after
InitialiseOpenGLWindow( hWnd, 0, 0, OpenGL.WindowWidth, OpenGL.WindowHeight );
that gets printed as well...

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 27 of 69, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

testgl runs fine, a very fast (5318 FPS) spinning colored cube.

I'm going to be away from tomorrow until next friday, so that you know why I'll be silent for the next few days in this thread. I'll still be able to log on here but I'm not going to be able to test anything.

Another thing I forgot to mention and what might be of importance, my SDL is the SDL 1.2.14 prerelease, since 1.2.13 has many problems on OS X 10.6.1

Reply 28 of 69, by gulikoza

User metadata
Rank Oldbie
Rank
Oldbie

Hm. Really strange...
I've checked out 1.2.14, I don't see any differences that should be of concern. And as I understand, 1.2.14 is required for 10.6.1.

Can you try to confirm it is the glGetString that is crashing. Perhaps you can put:

	GlideMsg( "Vendor     : %s\n", glGetString( GL_VENDOR ) );
GlideMsg( "Renderer : %s\n", glGetString( GL_RENDERER ) );
GlideMsg( "Version : %s\n", glGetString( GL_VERSION ) );
GlideMsg( "Extensions : %s\n", glGetString( GL_EXTENSIONS ) );

just after InitialiseOpenGLWindow() and another MSG just before these to see if it gets this far.

http://www.si-gamer.net/gulikoza

Reply 29 of 69, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

the one msg before that will be printed but those will not.

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 30 of 69, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

the one msg before that will be printed but those will not.

Please post the respective part of that functions, as it should look like
bool InitWindow(whatever) {
InitSomething();
[here the GetStrings from gulikoza]
[here the strcmp with the GetString]

Just add some more logging right after the InitSomething function to isolate
stuff, like use
char* test = glGetString( GL_RENDERER );
with logging before/after that to see if it's glGetString itself that crashes etc.

Reply 32 of 69, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator
bool InitWindow( FxU hWnd )
{
GlideMsg( "glide.cpp #1");
InitialiseOpenGLWindow( hWnd, 0, 0, OpenGL.WindowWidth, OpenGL.WindowHeight );
GlideMsg( "glide.cpp #2" );
GlideMsg( "Vendor : %s\n", glGetString( GL_VENDOR ) );
GlideMsg( "Renderer : %s\n", glGetString( GL_RENDERER ) );
GlideMsg( "Version : %s\n", glGetString( GL_VERSION ) );
GlideMsg( "Extensions : %s\n", glGetString( GL_EXTENSIONS ) );

"glide.cpp #1" and "glide.cpp #2" are printed in the log file.

Don't know where else to put some logging...

But I'm back in testing business 😀

Reply 33 of 69, by gulikoza

User metadata
Rank Oldbie
Rank
Oldbie

Yeah, I've been thinking about this for a week too 😀
Those functions should not be failing, unless opengl failed to initialize properly. But if that were the case, SDL_SetVideoMode() should fail. The InitialiseOpenGLWindow() should probably be rewritten to return false if open window was unsuccessful so that grSstWinOpen() can fail and return failure to the glide application. I assume there are no "Video mode set failed" errors in the log?
Other than that, I don't have any ideas. SDL OpenGL init is pretty simple and should work (as demonstrated by dosbox and the testgl program)...

http://www.si-gamer.net/gulikoza

Reply 34 of 69, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

hmm, no such error in the log.
It was a bit unclear to me to what videomode I should set Dosbox, but it fails anyway in surface, overlay and opengl...

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 36 of 69, by gulikoza

User metadata
Rank Oldbie
Rank
Oldbie

There is another possibility of course. That this is indeed some problem with my dosbox glide patch.
Attached is the simplest possible glide program. It will initialize glide, clear screen to blue and exit. I have no idea if it will compile 😀

Attachments

  • Filename
    BufferClear.zip
    File size
    1.33 KiB
    Downloads
    552 downloads
    File license
    Fair use/fair dealing exception

http://www.si-gamer.net/gulikoza

Reply 37 of 69, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator
gcc bc.c -I/opt/local/include -I /usr/local/include/openglide/
In file included from /usr/local/include/openglide/sdk2_glide.h:36,
from test.h:20,
from bc.c:3:
/usr/local/include/openglide/sdk2_3dfx.h:100:4: warning: #warning define FX_ENTRY & FX_CALL for your compiler
Undefined symbols:
"_grGlideInit", referenced from:
_main in cc6xwvT0.o
"_getch", referenced from:
_main in cc6xwvT0.o
_main in cc6xwvT0.o
"_grBufferSwap", referenced from:
_runTest in cc6xwvT0.o
"_grSstQueryBoards", referenced from:
_main in cc6xwvT0.o
"_grSstWinOpen", referenced from:
_main in cc6xwvT0.o
"_grBufferClear", referenced from:
_runTest in cc6xwvT0.o
"_grSstSelect", referenced from:
_main in cc6xwvT0.o
"_grGlideShutdown", referenced from:
_main in cc6xwvT0.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
imac:bufferclear dominus$ gcc
i686-apple-darwin10-gcc-4.2.1: no input files

I hope I used the correct command to compile this (I renamed the c file to bc.c to type it faster...)

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 39 of 69, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

any ideas on that? -I /usr/local/include/openglide/ is enough to build Dosbox with glide support.

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper