Opened 14 years ago

Closed 14 years ago

#6266 closed enhancement (fixed)

Implement GLUT game functions

Reported by: michaelvoliveira Owned by: phoudoin
Priority: normal Milestone: R1
Component: Kits/OpenGL Kit Version: R1/Development
Keywords: opengl glut Cc: phoudoin
Blocked By: Blocking:
Platform: All

Description

glutGameModeString
glutGameModeGet
glutEnterGameMode
glutIgnoreKeyRepeat

Attachments (2)

og_gamemode.c (21.2 KB ) - added by michaelvoliveira 14 years ago.
OpenGLUT gamemode functions
og_misc.c (8.3 KB ) - added by michaelvoliveira 14 years ago.
OpenGLUT misc functions

Download all attachments as: .zip

Change History (19)

comment:1 by michaelvoliveira, 14 years ago

and.. glutLeaveGameMode

comment:2 by korli, 14 years ago

see #5330

comment:3 by jackburton, 14 years ago

Shouldn't we import the latest glut instead ?

comment:4 by michaelvoliveira, 14 years ago

Hi all!

I don't know if importing the latest glut will resolve... but: glutSetKeyRepeat, glutGameModeString, glutGameModeGet, glutEnterGameMode, glutIgnoreKeyRepeat, are already declared in our /haiku/headers/os/opengl/GL/GLUT.h header

And all these 5 functions are commented out in our /haiku/src/libs/mesa/glut/glut_ext.c source file

I'm uploading og_gamemode.c and og_misc.c from OpenGLUT project. But any of 5 functions there is useless for Haiku because it's X11 dependent.

If any of you could implement it, I'll be glad.. and at least 15 more apps could run on Haiku with it (BillardGL comes in my mind) and could solve (I hope so) a SDL bug in Haiku (because in BeOS all works fine)

Thank you for all your efforts

by michaelvoliveira, 14 years ago

Attachment: og_gamemode.c added

OpenGLUT gamemode functions

by michaelvoliveira, 14 years ago

Attachment: og_misc.c added

OpenGLUT misc functions

comment:5 by phoudoin, 14 years ago

Cc: phoudoin added

in reply to:  4 comment:6 by phoudoin, 14 years ago

If any of you could implement it, I'll be glad.. and at least 15 more apps could run on Haiku with it (BillardGL comes in my mind) and could solve (I hope so) a SDL bug in Haiku (because in BeOS all works fine)

As BeOS GLUT didn't implement either these functions, if it work under BeOS it's not due to GLUT but, more probably, to BeOS's SDL not relying on these functions existences.

comment:7 by michaelvoliveira, 14 years ago

Implmented glutSetKetRepeat() and glutIgnoreKeyRepeat() in hrev37743

comment:8 by phoudoin, 14 years ago

I may port/implement the game mode 4 missing calls soon, BTW. Do you have for me any small sample code/game using GLUT Game Mode I could use as a testbed ?

comment:9 by michaelvoliveira, 14 years ago

Of course phoudoin

BilliardGL (direct link) http://sourceforge.net/projects/billardgl/files/billardgl/BillardGL%201.75/BillardGL-1.75.tar.gz/download

It's 750kb, so I can't attach here..

Please delete X libs linking at makefile and type make

comment:10 by michaelvoliveira, 14 years ago

One more:

glutForceJoystickFunc

and so we have inimplemented

glutForceJoystickFunc glutEnterGameMode glutLeaveGameMode glutGameModeString glutGameModeGet

comment:11 by phoudoin, 14 years ago

Owner: changed from korli to phoudoin
Status: newin-progress

comment:12 by phoudoin, 14 years ago

An experimental Game Mode support is implemented in hrev37878. Not ready for primetime yet, as working on this show how GLUT and even our Mesa Software Renderer are not rock solid.

comment:13 by phoudoin, 14 years ago

BillardGL -hp (1024x768:32) works. The default 800x600:16 doesn't, but I'll bet it's more related to our direct mode renderer than anything else...

comment:14 by michaelvoliveira, 14 years ago

I'll test with our softpipe.. tomorrow I'll post the results

comment:15 by michaelvoliveira, 14 years ago

I'm back! After a stress testing, here is the results:

BillardGL not work for me... maybe can be my unsupported radeonhd, because I can see 1024x768:32@85hertz.. and I can't set it down in Vesa mode, maybe with my onboard gforce..

Well, don't matter, because the new GLUT functions works well. The proof is that GL-117 game was ported (see in Haikuware :) FooBillard too. And many others will come after!

For now, this ticket could be closed and set as fixed. Thank you!

one more thing and a bit offtopic: Will be possible create something like glXGetProcAddressARB() or wglGetProcAddress() in Haiku? I know that we have glutGetProcAddress, but is only difference seems that we use 'const char*' instead 'const GLubyte*' from the others.. I know that ask so much, but is the really function that matters in GLX...

BTW, our softpipe implementation not work anymore, and the gallium branch needs a update before test the render again

comment:16 by michaelvoliveira, 14 years ago

Thank you for the hrev38578 and hrev38579! Now the app builds and runs!

The only thing that don't work is the rendering resolution

nor BillardGL nor VegaStrike starts here

even passing -hp 800x600:16 or -hp 1024x768:32 seems that renderer switch to the hightest mode supported by vesa (using an unsupported radeonhd)

I'll try with the onboard geforce..

Please close this ticket!

comment:17 by phoudoin, 14 years ago

Resolution: fixed
Status: in-progressclosed
Note: See TracTickets for help on using tickets.