You are not logged in.
shash:
Good to see Mario is working for you. I did not spy the matrix * vertex function in the matrix.c code otherwise I would have used it.
snkmad and evilynux:
There maybe a slight problem with the gtk-glade port on non X Window platforms (it builds and runs 3D fine for me on Linux).
The gtk-glade code uses the HAVE_LIBGDKGLEXT_X11_1_0 macro to conditionally include 3D stuff. If you are using autotools (autoconf, automake, ./autogen.sh and ./configure) then this will only get defined on systems with X Window (Linux, BSDs and OSX?) since it is a check against the X Window target version of the gtkGLext library. There is now a macro, GTKGLEXT_AVAILABLE, which should be defined on all platforms with the gtkGLext library installed (assuming pkg-config is configured and working).
If you are building under Dev-Cpp/Visual C++ or similar then make sure that you define HAVE_LIBGDKGLEXT_X11_1_0 and GTKGLEXT_AVAILABLE as part of the C preprocessor arguments.
Offline
The gtk-glade code uses the HAVE_LIBGDKGLEXT_X11_1_0 macro to conditionally include 3D stuff. If you are using autotools (autoconf, automake, ./autogen.sh and ./configure) then this will only get defined on systems with X Window (Linux, BSDs and OSX?) since it is a check against the X Window target version of the gtkGLext library. There is now a macro, GTKGLEXT_AVAILABLE, which should be defined on all platforms with the gtkGLext library installed (assuming pkg-config is configured and working).
If you are building under Dev-Cpp/Visual C++ or similar then make sure that you define HAVE_LIBGDKGLEXT_X11_1_0 and GTKGLEXT_AVAILABLE as part of the C preprocessor arguments.
That sounds right... perhaps all HAVE_LIBGDKGLEXT_X11_1_0 should be renamed to GTKGLEXT_AVAILABLE ...
Damdoum did most of the MS Windows work/testing... it'd be nice if this could be sorted out.
Offline
Ok i added GLU32.dll and the glu errors are gone.
Now only these 2 to fix:
obj/main.o(.text+0x9ce):main.c: undefined reference to `init_opengl_gdk_3Demu'
obj/main.o(.data+0x4):main.c: undefined reference to `gpu3D_opengl_collector'
Note: im only trying to compile gtk glade on windows, because damdum asked if someone could help him test the win port.
Last edited by snkmad (2007-04-22 14:14:49)
Athlon 64 X2 3800+ / 2Gb DDR2 800Mhz
Geforce 8600GT 256MB / Windows XP PRO SP3
http://desmume.org/compatibility-list/
Offline
Ok i added GLU32.dll and the glu errors are gone.
Now only these 2 to fix:
obj/main.o(.text+0x9ce):main.c: undefined reference to `init_opengl_gdk_3Demu'
obj/main.o(.data+0x4):main.c: undefined reference to `gpu3D_opengl_collector'Note: im only trying to compile gtk glade on windows, because damdum asked if someone could help him test the win port.
Your help is appreciated.
Are opengl_collector_3Demu.h and opengl_collector_3Demu.c included?
Last edited by evilynux (2007-04-22 14:17:05)
Offline
You have to undergo some changes to take into account OSX. Headers on osx for open gl are in OpenGL/ not in GL/... There is also an issue with the fact that on Mac os x, we can't set GDK_GL_MODE_ALPHA as it is run under X11, disabling it make it runs well.
If you want me to commit some mac os x compliancy to the cvs, you can add me on sourceforge (deufeufeu).
Last edited by deufeufeu (2007-04-22 15:39:39)
Offline
After adding gdk_3Demu.c gdk_3Demu.h and opengl_collector_3Demu.c opengl_collector_3Demu.h ...:
Yeah the 1st ones i added.
Athlon 64 X2 3800+ / 2Gb DDR2 800Mhz
Geforce 8600GT 256MB / Windows XP PRO SP3
http://desmume.org/compatibility-list/
Offline
You have to undergo some changes to take into account OSX. Headers on osx for open gl are in OpenGL/ not in GL/... There is also an issue with the fact that on Mac os x, we can't set GDK_GL_MODE_ALPHA as it is run under X11, disabling it make it runs well.
If you want me to commit some mac os x compliancy to the cvs, you can add me on sourceforge (deufeufeu).
The best would be to use "defines" so we can remain multi-platform/os. Can we easily detect that we're running on MacOSX, does gcc define a variable?
I welcome patches.
Thanks for testing!
Offline
snkmad wrote:After adding gdk_3Demu.c gdk_3Demu.h and opengl_collector_3Demu.c opengl_collector_3Demu.h ...:
Yeah the 1st ones i added.
gtk-glade/main.c includes gdk_3Demu.h and gdk_3Demu.h includes opengl_collector_3Demu.h...
so i don't know what else to suggest...
Offline
Can someone post here a list of all necessary files needed to be into the project?
Athlon 64 X2 3800+ / 2Gb DDR2 800Mhz
Geforce 8600GT 256MB / Windows XP PRO SP3
http://desmume.org/compatibility-list/
Offline
Can someone post here a list of all necessary files needed to be into the project?
Based on Makefile.am:
globals.h glade-xml.c \
callbacks.c callbacks.h callbacks_IO.c callbacks_IO.h desmume.c desmume.h \
keyval_names.c main.c printscreen.c gdk_gl.c gdk_gl.h \
dTools/callbacks_1_ioregs.c dTools/callbacks_2_memview.c \
dTools/callbacks_3_palview.c dTools/callbacks_4_tileview.c \
dTools/callbacks_dtools.h \
dTools/dTools_display.h \
gdk_3Demu.c gdk_3Demu.h \
../sndsdl.h ../sndsdl.c ../ctrlssdl.h ../ctrlssdl.c
Then, looking at the dev-cpp file it seems you also need to add all other used files.
Basically, everything else in src/ .
Offline
Well that doesnt help, i have all files from gtk glade, and src folder into the project. It must be something else.
Sorry i cant help with this one.
Compiler: Default compiler
Building Makefile: "C:\Dev-Cpp\desmume\src\gtk-glade\Makefile.win"
Executing make...
make.exe -f "C:\Dev-Cpp\desmume\src\gtk-glade\Makefile.win" all
gcc.exe obj/callbacks.o obj/callbacks_IO.o obj/desmume.o obj/keyval_names.o obj/main.o obj/printscreen.o obj/arm_instructions.o obj/armcpu.o obj/bios.o obj/cflash.o obj/cp15.o obj/ctrlssdl.o obj/debug.o obj/Disassembler.o obj/FIFO.o obj/fs-windows.o obj/GPU.o obj/mc.o obj/MMU.o obj/NDSSystem.o obj/ROMReader.o obj/saves.o obj/sndsdl.o obj/SPU.o obj/thumb_instructions.o obj/wifi.o obj/callbacks_1_ioregs.o obj/callbacks_2_memview.o obj/callbacks_3_palview.o obj/gdk_gl.o obj/glade-xml.o obj/gl_vertex.o obj/callbacks_4_tileview.o obj/gdk_3Demu.o obj/opengl_collector_3Demu.o obj/render3D.o obj/matrix.o -o "DeSmuME.exe" -L"C:/Dev-Cpp/lib" -L"C:/Dev-Cpp/lib" -L"C:/Dev-Cpp/GTK/LIB" -L"C:/Dev-Cpp/GTK/lib/glib-2.0" -L"C:/Dev-Cpp/GTK/lib/gtk-2.0" -L"C:/Dev-Cpp/GTK/lib/libglade" -L"C:/Dev-Cpp/GTK/lib/libglade/2.0" -L"C:/Dev-Cpp/GTK/lib/gtkglext-1.0" C:/Dev-Cpp/GTK/lib/z.lib C:/Dev-Cpp/GTK/lib/atk-1.0.lib C:/Dev-Cpp/GTK/lib/cairo.lib C:/Dev-Cpp/GTK/lib/gdk_pixbuf-2.0.lib C:/Dev-Cpp/GTK/lib/gdk-win32-2.0.lib C:/Dev-Cpp/GTK/lib/glade-2.0.lib C:/Dev-Cpp/GTK/lib/glib-2.0.lib C:/Dev-Cpp/GTK/lib/gmodule-2.0.lib C:/Dev-Cpp/GTK/lib/gobject-2.0.lib C:/Dev-Cpp/GTK/lib/gtk-win32-2.0.lib C:/Dev-Cpp/GTK/lib/pango-1.0.lib C:/Dev-Cpp/GTK/lib/pangocairo-1.0.lib C:/Dev-Cpp/GTK/lib/pangowin32-1.0.lib C:/Dev-Cpp/GTK/lib/xml2.lib C:/Dev-Cpp/dll/SDL.dll C:/Dev-Cpp/lib/libSDL.dll.a C:/Dev-Cpp/lib/libopengl32.a C:/Dev-Cpp/GTK/lib/libgdkglext-win32-1.0.dll.a C:/Dev-Cpp/GTK/lib/gtkglext-win32-1.0.lib ../../../lib/GLU32.DLL -mwindows -march=pentium4 -msse2
Warning: resolving _WinMain@16 by linking to _WinMain
Use --enable-stdcall-fixup to disable these warnings
Use --disable-stdcall-fixup to disable these fixups
obj/main.o(.text+0x9ce):main.c: undefined reference to `init_opengl_gdk_3Demu'
obj/main.o(.data+0x4):main.c: undefined reference to `gpu3D_opengl_collector'
collect2: ld returned 1 exit status
make.exe: *** [DeSmuME.exe] Error 1
Execution terminated
Last edited by snkmad (2007-04-23 12:35:42)
Athlon 64 X2 3800+ / 2Gb DDR2 800Mhz
Geforce 8600GT 256MB / Windows XP PRO SP3
http://desmume.org/compatibility-list/
Offline
same error here
Offline
The contents of opengl_collector_3Demu.c will only be compiled is the preprocessor macros HAVE_GL_GL_H and HAVE_GL_GLU_H are defined. Similarly to the HAVE_LIBGDKGLEXT_X11_1_0 and GTKGLEXT_AVAILABLE macros, you should define these as part of the build parameters. If they are defined then during the compile something like -DHAVE_GL_GL_H=1 will be present.
As a test, you could edit opengl_collector_3Demu.c, gdk_3Demu.c and main.c (maybe others) and define the macros (e.g. #define HAVE_GL_GL_H 1) before the first #ifdef test. This way you will know that the code is being included and compiled and if the problem persists then it is a linker problem.
deufeufeu:
I was under the impression that GDK_GL_MODE_ALPHA was needed to include a alpha channel for the off-screen render target but this does not appear to be the case (works fine without it under Linux for me). Could you post a patch for the other OSX changes on the SourceForge page?
Offline
Nice tip masscat.
Ill try to do it, but dont expect much w/out help, i can only code some a + b = c operations
Im not familiar with the #ifdef...
Athlon 64 X2 3800+ / 2Gb DDR2 800Mhz
Geforce 8600GT 256MB / Windows XP PRO SP3
http://desmume.org/compatibility-list/
Offline
At the start of the files gtk-glade/main.c, gtk-glade/gdk_3Demu.c and opengl_collector_3Demu.c put the following:
#define HAVE_GL_GL_H 1
#define HAVE_GL_GLU_H 1
#define HAVE_LIBGDKGLEXT_X11_1_0 1
#define GTKGLEXT_AVAILABLE 1
Offline
Ok do i need to add
-DHAVE_GL_GL_H=1
-DHAVE_GL_GLU_H=1
to parameters?
EDIT: After doing what you said i now get the following errors:
../opengl_collector_3Demu.c: In function `SetupTexture':
../opengl_collector_3Demu.c:732: error: `GL_MIRRORED_REPEAT' undeclared (first use in this function)
../opengl_collector_3Demu.c:732: error: (Each undeclared identifier is reported only once
../opengl_collector_3Demu.c:732: error: for each function it appears in.)
../opengl_collector_3Demu.c: In function `get_line_3Dgl_collect':
../opengl_collector_3Demu.c:2527: error: `GL_BGRA' undeclared (first use in this function)
gcc.exe: unrecognized option `-rdynamic'
make.exe: *** [obj/opengl_collector_3Demu.o] Error 1
Execution terminated
Maybe i need another opengl lib where GL_MIRRORED_REPEAT and GL_BGRA are defined?
Last edited by snkmad (2007-04-23 14:59:52)
Athlon 64 X2 3800+ / 2Gb DDR2 800Mhz
Geforce 8600GT 256MB / Windows XP PRO SP3
http://desmume.org/compatibility-list/
Offline
Just had a look on a Windows machine:
GL_BGRA maybe defined in glext.h and GL_MIRRORED_REPEAT maybe called GL_MIRRORED_REPEAT_ARB.
So change the following in opengl_collector_3Demu.c:
#include <GL/gl.h>
#include <GL/glu.h>
to:
#include <GL/gl.h>
#include <GL/glext.h>
#include <GL/glu.h>
#ifndef GL_MIRRORED_REPEAT
#define GL_MIRRORED_REPEAT GL_MIRRORED_REPEAT_ARB
#endif
Anybody know a good way to make the code portable across platforms (see also the OSX problem posted earlier)?
Offline
Finally it compiles!
Thx guys, this one was hard to get working.
EDIT: Well i just had time now to take a closer look. The compiler gives some errors, but it does compile:
Warning: resolving _gluErrorString by linking to _gluErrorString@4
Use --enable-stdcall-fixup to disable these warnings
Use --disable-stdcall-fixup to disable these fixups
Warning: resolving _WinMain@16 by linking to _WinMain
Execution terminated
But as i tried Mario 64, its like all 3d core/code isnt included.
I followed all the tips here, and also i had to include GLU32.LIB.
EDi2: Heres the reason:
Thx to cyborg_
Last edited by snkmad (2007-04-23 20:16:44)
Athlon 64 X2 3800+ / 2Gb DDR2 800Mhz
Geforce 8600GT 256MB / Windows XP PRO SP3
http://desmume.org/compatibility-list/
Offline
Can you help me with this last problem?
Athlon 64 X2 3800+ / 2Gb DDR2 800Mhz
Geforce 8600GT 256MB / Windows XP PRO SP3
http://desmume.org/compatibility-list/
Offline
Try the follow edit of gdk_3Demu.c (about line 160):
change:
glconfig = gdk_gl_config_new_by_mode (GDK_GL_MODE_RGBA |
GDK_GL_MODE_ALPHA |
GDK_GL_MODE_DEPTH |
GDK_GL_MODE_SINGLE);
to
glconfig = gdk_gl_config_new_by_mode (GDK_GL_MODE_RGBA |
GDK_GL_MODE_DEPTH |
GDK_GL_MODE_SINGLE);
The GDK_GL_MODE_ALPHA flag is not necessary and also causes problems under OSX.
EDIT: Removed the GDK_GL_MODE_ALPHA flag from gtk and gtk-glade gdk_3Demu.c files in CVS.
Last edited by masscat (2007-04-24 16:25:48)
Offline
Hum still same error.
(DeSmuME-glade-24-04.exe:2840): GdkGLExt-WARNING **: cannot set pixel format
(DeSmuME-glade-24-04.exe:2840): GdkGLExt-WARNING **: cannot create GdkGLPixmap
Failed to create the GdkGLPixmap
Failed to setup openGL 3D emulation; removing 3D support
Athlon 64 X2 3800+ / 2Gb DDR2 800Mhz
Geforce 8600GT 256MB / Windows XP PRO SP3
http://desmume.org/compatibility-list/
Offline
Well shash said it wouldnt be hard to fix that.
Why its not being able to set the pixel format?
Maybe the opengl has to be initialized in a diferent way for windows?
Athlon 64 X2 3800+ / 2Gb DDR2 800Mhz
Geforce 8600GT 256MB / Windows XP PRO SP3
http://desmume.org/compatibility-list/
Offline
I said I THINK it should be hard as long as it's only related to the pixelformat selection failing.
Offline
Well thats the problem right now.
Maybe its the only one, maybe others will arise if you guys fix it...
Athlon 64 X2 3800+ / 2Gb DDR2 800Mhz
Geforce 8600GT 256MB / Windows XP PRO SP3
http://desmume.org/compatibility-list/
Offline
At the start of the files gtk-glade/main.c, gtk-glade/gdk_3Demu.c and opengl_collector_3Demu.c put the following:
#define HAVE_GL_GL_H 1 #define HAVE_GL_GLU_H 1 #define HAVE_LIBGDKGLEXT_X11_1_0 1 #define GTKGLEXT_AVAILABLE 1
If you have autotools / gcc toolchain then those are setup when you ./configure
if you use something like devcpp ... then that would be in the compiler options window ( pass -Ddefines to the compiler )
I would not know how to do it in other dev. environment but you get the idea. Those defines being in the headers are
*hackish* so I would not recommend it.
Good job :-)
I can't help right now, sorry, i dont have a computer outside work (i.e. abroad in internship)
Offline