You are not logged in.

Read the FAQ and Knowledge Base before posting.
WiFi not emulated and not supported!!
We won't make a 3DS/2DS emulator.



#1 2009-01-06 19:46:36

DEF
Member
Registered: 2009-01-06
Posts: 3

Problem with OGLRender when compiling the 0.9 sources

Hi !
I use Slackware 12.2.
Autogen and configure went fine.
Then make didn't succeed.

.......
.......
OGLRender.cpp: In function 'char OGLInit()':
OGLRender.cpp:459: erreur: 'glActiveTexture' was not declared in this scope
OGLRender.cpp: In function 'void setTexture(unsigned int, unsigned int)':
OGLRender.cpp:572: erreur: 'glActiveTexture' was not declared in this scope
OGLRender.cpp: In function 'void OGLRender()':
OGLRender.cpp:1029: erreur: 'glActiveTexture' was not declared in this scope
make[2]: *** [OGLRender.o] Erreur 1
make[2]: quittant le répertoire « /home/def/desmume-0.9/src »
make[1]: *** [all-recursive] Erreur 1
make[1]: quittant le répertoire « /home/def/desmume-0.9/src »
make: *** [all-recursive] Erreur 1
bash-3.1$ export LANG=US_us               
bash-3.1$ make             
Making all in po
make[1]: Entering directory `/home/def/desmume-0.9/po'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/def/desmume-0.9/po'
Making all in src
make[1]: Entering directory `/home/def/desmume-0.9/src'
Making all in .
make[2]: Entering directory `/home/def/desmume-0.9/src'
g++ -DPACKAGE_NAME=\"desmume\" -DPACKAGE_TARNAME=\"desmume\" -DPACKAGE_VERSION=\"0.9\" -DPACKAGE_STRING=\"desmume\ 0.9\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"desmume\" -DVERSION=\"0.9\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LIBZ=1 -DHAVE_GL_GL_H=1 -DHAVE_GL_GLU_H=1 -DHAVE_LIBGDKGLEXT_X11_1_0=1 -DGLADEUI_UNINSTALLED_DIR=\"/home/def/desmume-0.9/src/gtk-glade/glade/\" -DGTKGLEXT_AVAILABLE=1 -DGETTEXT_PACKAGE=\"desmume\" -DHAVE_LOCALE_H=1 -DHAVE_LC_MESSAGES=1 -DHAVE_BIND_TEXTDOMAIN_CODESET=1 -DHAVE_GETTEXT=1 -DHAVE_DCGETTEXT=1 -DENABLE_NLS=1 -I.  -I../src   -g -O2 -MT OGLRender.o -MD -MP -MF .deps/OGLRender.Tpo -c -o OGLRender.o OGLRender.cpp
In file included from OGLRender.h:25,
                 from OGLRender.cpp:27:
common.h:45:7: warning: no newline at end of file
OGLRender.cpp: In function 'char OGLInit()':
OGLRender.cpp:459: error: 'glActiveTexture' was not declared in this scope
OGLRender.cpp: In function 'void setTexture(unsigned int, unsigned int)':
OGLRender.cpp:572: error: 'glActiveTexture' was not declared in this scope
OGLRender.cpp: In function 'void OGLRender()':
OGLRender.cpp:1029: error: 'glActiveTexture' was not declared in this scope
make[2]: *** [OGLRender.o] Error 1
make[2]: Leaving directory `/home/def/desmume-0.9/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/def/desmume-0.9/src'
make: *** [all-recursive] Error 1
bash-3.1$

Last edited by DEF (2009-01-06 19:46:55)

Offline

#2 2009-01-07 16:15:08

thaeron
Member
Registered: 2009-01-07
Posts: 5

Re: Problem with OGLRender when compiling the 0.9 sources

Do you have nvidia drivers installed ?  This error appears to come from the headers of nvidia drivers as I could understand by reading posts on other forums. I have the same problem with my Slackware 12.0 (and nvidia drivers) but with Slackware 12.1 (and intel drivers on other machine) the compilation works fine.

Offline

#3 2009-01-07 20:57:00

guillaume
Administrator
Registered: 2007-03-17
Posts: 31

Re: Problem with OGLRender when compiling the 0.9 sources

I just commited some change that should fix the problem.
Could you get revision 1400 of the desmume svn and tell me if it improves things?

Offline

#4 2009-01-07 21:26:45

operron
Member
Registered: 2009-01-07
Posts: 3

Re: Problem with OGLRender when compiling the 0.9 sources

I have the same issue and yes I have nvidia headers intalled.
svn revision 1400 doesn't improve the issue: still the same error.

Offline

#5 2009-01-07 22:37:10

guillaume
Administrator
Registered: 2007-03-17
Posts: 31

Re: Problem with OGLRender when compiling the 0.9 sources

could you try again with revision 1402?
There were two places where I needed to update the code and only updated one in my previous commit...

if it doesn't works I may end up installing a slackware in a qemu to test that smile

Offline

#6 2009-01-07 22:52:35

thaeron
Member
Registered: 2009-01-07
Posts: 5

Re: Problem with OGLRender when compiling the 0.9 sources

The problem is the same. But it is not slackware specific but nvidia drivers specific.
I found posts of gentoo users who install (and update) Xorg drivers, compile the software, and reinstall nvidia drivers.

Offline

#7 2009-01-08 20:47:21

operron
Member
Registered: 2009-01-07
Posts: 3

Re: Problem with OGLRender when compiling the 0.9 sources

Still same issue with revision 1402 !

Offline

#8 2009-01-09 20:30:28

guillaume
Administrator
Registered: 2007-03-17
Posts: 31

Re: Problem with OGLRender when compiling the 0.9 sources

Ok, the problem is that I can't reproduce the compilation error, so fixing it will be quite hard.

It may just be a missing function definition, could you try to add that line:

void glActiveTexture(GLenum texture);

at the beginning of OGLRender.cpp (somewhere around the #include) and try recompiling?

Offline

#9 2009-01-11 08:06:31

khamar
Member
Registered: 2009-01-11
Posts: 1

Re: Problem with OGLRender when compiling the 0.9 sources

Same problem here.
System:
$ uname -r
2.6.18-4-686
$ cat /proc/version
Linux version 2.6.18-4-686 (Debian 2.6.18.dfsg.1-12etch2) (dannf@debian.org) (gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)) #1 SMP Wed May 9 23:03:12 UTC 2007

First, config failed with: config.status: error: po/Makefile.in.in was not created by intltoolize.
I fixed this with $ ./autogen.sh

Then make failed with
...
...
In file included from OGLRender.h:25,
                 from OGLRender.cpp:27:
common.h:45:7: warning: no newline at end of file
OGLRender.cpp: In function 'char OGLInit()':
OGLRender.cpp:459: error: 'glActiveTexture' was not declared in this scope
OGLRender.cpp: In function 'void setTexture(unsigned int, unsigned int)':
OGLRender.cpp:572: error: 'glActiveTexture' was not declared in this scope
OGLRender.cpp: In function 'void OGLRender()':
OGLRender.cpp:1029: error: 'glActiveTexture' was not declared in this scope
make[2]: *** [OGLRender.o] Error 1
make[2]: Leaving directory `/home/khamar/tarballs/desmume-0.9/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/khamar/tarballs/desmume-0.9/src'
make: *** [all-recursive] Error 1

I added void glActiveTexture(GLenum texture); in OGLRender.cpp - but that made the make fail sooner with
...
g++ -DPACKAGE_NAME=\"desmume\" -DPACKAGE_TARNAME=\"desmume\" -DPACKAGE_VERSION=\"0.9\" -DPACKAGE_STRING=\"desmume\ 0.9\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"desmume\" -DVERSION=\"0.9\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LIBZ=1 -DHAVE_GL_GL_H=1 -DHAVE_GL_GLU_H=1 -I.  -I../src   -g -O2 -MT OGLRender.o -MD -MP -MF .deps/OGLRender.Tpo -c -o OGLRender.o OGLRender.cpp
In file included from OGLRender.h:25,
                 from OGLRender.cpp:27:
common.h:45:7: warning: no newline at end of file
OGLRender.cpp:34: error: variable or field 'glActiveTexture' declared void
OGLRender.cpp:34: error: 'GLenum' was not declared in this scope
OGLRender.cpp: In function 'char OGLInit()':
OGLRender.cpp:460: error: 'glActiveTexture' cannot be used as a function
OGLRender.cpp: In function 'void setTexture(unsigned int, unsigned int)':
OGLRender.cpp:573: error: 'glActiveTexture' cannot be used as a function
OGLRender.cpp: In function 'void OGLRender()':
OGLRender.cpp:1030: error: 'glActiveTexture' cannot be used as a function
make[2]: *** [OGLRender.o] Error 1
...

ANY IDEAS?

Offline

#10 2009-01-12 08:18:50

thaeron
Member
Registered: 2009-01-07
Posts: 5

Re: Problem with OGLRender when compiling the 0.9 sources

As I said before, the solution is : reinstall Xorg drivers (headers will be overwritten), compile desmume and then reinstall nvidia drivers.

Offline

#11 2009-01-12 22:53:51

guillaume
Administrator
Registered: 2007-03-17
Posts: 31

Re: Problem with OGLRender when compiling the 0.9 sources

yeah, it seems that's what gentoo guys suggest too and as I have no way to test and maybe fix it, I guess you'll have to go that way...

Offline

#12 2009-01-20 21:05:20

DEF
Member
Registered: 2009-01-06
Posts: 3

Re: Problem with OGLRender when compiling the 0.9 sources

I downloaded svn right now, went into desmume/trunk/desmume, then compiled : same error.
I'll try on an ati machine soon (damn, it's the first time nvidia causes problems...).

Offline

#13 2009-01-30 15:47:42

jrittenh
Member
Registered: 2009-01-30
Posts: 1

Re: Problem with OGLRender when compiling the 0.9 sources

Found this in the Gentoo Bugzilla pages:

http://bugs.gentoo.org/214953

Seems to be a similar issue with OO.org.  They recommend this for the Gentoo ebuild...not sure if it will help with the actual source but may be a step in the right direction.

Add this to src_compile() in the ebuild:

append-flags -DGL_GLEXT_PROTOTYPES

Offline

#14 2009-02-02 16:45:07

operron
Member
Registered: 2009-01-07
Posts: 3

Re: Problem with OGLRender when compiling the 0.9 sources

jrittenh wrote:

Found this in the Gentoo Bugzilla pages:

http://bugs.gentoo.org/214953

Seems to be a similar issue with OO.org.  They recommend this for the Gentoo ebuild...not sure if it will help with the actual source but may be a step in the right direction.

Add this to src_compile() in the ebuild:

append-flags -DGL_GLEXT_PROTOTYPES

Seems to be worth...

x86_64-linux-gnu-g++ -DGL_GLEXT_PROTOTYPES -DPACKAGE_NAME=\"desmume\" -DPACKAGE_TARNAME=\"desmume\" -DPACKAGE_VERSION=\"0.8\" -DPACKAGE_STRING=\"desmume\ 0.8\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"desmume\" -DVERSION=\"0.8\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LIBZ=1 -DHAVE_GL_GL_H=1 -DHAVE_GL_GLU_H=1 -DGLADEUI_UNINSTALLED_DIR=\"/home/perron/packages/desmume/svn/trunk/desmume/src/gtk-glade/glade/\" -DGTKGLEXT_AVAILABLE=1 -DGETTEXT_PACKAGE=\"desmume\" -DHAVE_LOCALE_H=1 -DHAVE_LC_MESSAGES=1 -DHAVE_BIND_TEXTDOMAIN_CODESET=1 -DHAVE_GETTEXT=1 -DHAVE_DCGETTEXT=1 -DENABLE_NLS=1 -I.  -I../src   -g -O2 -MT OGLRender.o -MD -MP -MF .deps/OGLRender.Tpo -c -o OGLRender.o OGLRender.cpp                                                                                                                                                                                     
OGLRender.cpp:234: error: 'GLuint (* glCreateShader)(GLenum)' redeclared as different kind of symbol                                                                                                       
/usr/include/GL/glext.h:4198: error: previous declaration of 'GLuint glCreateShader(GLenum)'                                                                                                               
OGLRender.cpp:237: error: 'void (* glShaderSource)(GLuint, GLsizei, const GLchar**, GLsizei*)' redeclared as different kind of symbol                                                                       
/usr/include/GL/glext.h:4223: error: previous declaration of 'void glShaderSource(GLuint, GLsizei, const GLchar**, const GLint*)'                                                                           
OGLRender.cpp:238: error: 'void (* glCompileShader)(GLuint)' redeclared as different kind of symbol                                                                                                         
/usr/include/GL/glext.h:4196: error: previous declaration of 'void glCompileShader(GLuint)'                                                                                                                 
OGLRender.cpp:239: error: 'GLuint (* glCreateProgram)()' redeclared as different kind of symbol                                                                                                             
/usr/include/GL/glext.h:4197: error: previous declaration of 'GLuint glCreateProgram()'                                                                                                                     
OGLRender.cpp:240: error: 'void (* glAttachShader)(GLuint, GLuint)' redeclared as different kind of symbol                                                                                                 
/usr/include/GL/glext.h:4194: error: previous declaration of 'void glAttachShader(GLuint, GLuint)'                                                                                                         
OGLRender.cpp:241: error: 'void (* glDetachShader)(GLuint, GLuint)' redeclared as different kind of symbol                                                                                                 
/usr/include/GL/glext.h:4201: error: previous declaration of 'void glDetachShader(GLuint, GLuint)'                                                                                                         
OGLRender.cpp:242: error: 'void (* glLinkProgram)(GLuint)' redeclared as different kind of symbol                                                                                                           
/usr/include/GL/glext.h:4222: error: previous declaration of 'void glLinkProgram(GLuint)'                                                                                                                   
OGLRender.cpp:243: error: 'void (* glUseProgram)(GLuint)' redeclared as different kind of symbol                                                                                                           
/usr/include/GL/glext.h:4224: error: previous declaration of 'void glUseProgram(GLuint)'                                                                                                                   
OGLRender.cpp:244: error: 'void (* glGetShaderiv)(GLuint, GLenum, GLint*)' redeclared as different kind of symbol                                                                                           
/usr/include/GL/glext.h:4210: error: previous declaration of 'void glGetShaderiv(GLuint, GLenum, GLint*)'                                                                                                   
OGLRender.cpp:245: error: 'void (* glGetShaderInfoLog)(GLuint, GLsizei, GLsizei*, GLchar*)' redeclared as different kind of symbol                                                                         
/usr/include/GL/glext.h:4211: error: previous declaration of 'void glGetShaderInfoLog(GLuint, GLsizei, GLsizei*, GLchar*)'                                                                                 
OGLRender.cpp:246: error: 'void (* glDeleteShader)(GLuint)' redeclared as different kind of symbol                                                                                                         
/usr/include/GL/glext.h:4200: error: previous declaration of 'void glDeleteShader(GLuint)'                                                                                                                 
OGLRender.cpp:247: error: 'void (* glDeleteProgram)(GLuint)' redeclared as different kind of symbol                                                                                                         
/usr/include/GL/glext.h:4199: error: previous declaration of 'void glDeleteProgram(GLuint)'                                                                                                                 
OGLRender.cpp:248: error: 'void (* glGetProgramiv)(GLuint, GLenum, GLint*)' redeclared as different kind of symbol                                                                                         
/usr/include/GL/glext.h:4208: error: previous declaration of 'void glGetProgramiv(GLuint, GLenum, GLint*)'                                                                                                 
OGLRender.cpp:249: error: 'void (* glGetProgramInfoLog)(GLuint, GLsizei, GLsizei*, GLchar*)' redeclared as different kind of symbol                                                                         
/usr/include/GL/glext.h:4209: error: previous declaration of 'void glGetProgramInfoLog(GLuint, GLsizei, GLsizei*, GLchar*)'                                                                                 
OGLRender.cpp:250: error: 'void (* glValidateProgram)(GLuint)' redeclared as different kind of symbol                                                                                                       
/usr/include/GL/glext.h:4244: error: previous declaration of 'void glValidateProgram(GLuint)'                                                                                                               
OGLRender.cpp:251: error: 'void (* glBlendFuncSeparateEXT)(GLenum, GLenum, GLenum, GLenum)' redeclared as different kind of symbol                                                                         
/usr/include/GL/glext.h:6274: error: previous declaration of 'void glBlendFuncSeparateEXT(GLenum, GLenum, GLenum, GLenum)'                                                                                 
OGLRender.cpp:252: error: 'GLint (* glGetUniformLocation)(GLuint, const GLchar*)' redeclared as different kind of symbol                                                                                   
/usr/include/GL/glext.h:4213: error: previous declaration of 'GLint glGetUniformLocation(GLuint, const GLchar*)'                                                                                           
OGLRender.cpp:253: error: 'void (* glUniform1i)(GLint, GLint)' redeclared as different kind of symbol                                                                                                       
/usr/include/GL/glext.h:4229: error: previous declaration of 'void glUniform1i(GLint, GLint)'                                                                                                               
OGLRender.cpp: In function 'char OGLInit()':                                                                                                                                                               
OGLRender.cpp:531: error: assignment of function 'GLuint glCreateShader(GLenum)'                                                                                                                           
OGLRender.cpp:531: error: cannot convert 'GLuint (*)(GLenum)' to 'GLuint ()(GLenum)' in assignment                                                                                                         
OGLRender.cpp:532: error: assignment of function 'void glShaderSource(GLuint, GLsizei, const GLchar**, const GLint*)'                                                                                       
OGLRender.cpp:532: error: cannot convert 'void (*)(GLuint, GLsizei, const GLchar**, GLsizei*)' to 'void ()(GLuint, GLsizei, const GLchar**, const GLint*)' in assignment                                   
OGLRender.cpp:533: error: assignment of function 'void glCompileShader(GLuint)'                                                                                                                             
OGLRender.cpp:533: error: cannot convert 'void (*)(GLuint)' to 'void ()(GLuint)' in assignment                                                                                                             
OGLRender.cpp:534: error: assignment of function 'GLuint glCreateProgram()'                                                                                                                                 
OGLRender.cpp:534: error: cannot convert 'GLuint (*)()' to 'GLuint ()()' in assignment                                                                                                                     
OGLRender.cpp:535: error: assignment of function 'void glAttachShader(GLuint, GLuint)'                                                                                                                     
OGLRender.cpp:535: error: cannot convert 'void (*)(GLuint, GLuint)' to 'void ()(GLuint, GLuint)' in assignment                                                                                             
OGLRender.cpp:536: error: assignment of function 'void glDetachShader(GLuint, GLuint)'                                                                                                                     
OGLRender.cpp:536: error: cannot convert 'void (*)(GLuint, GLuint)' to 'void ()(GLuint, GLuint)' in assignment                                                                                             
OGLRender.cpp:537: error: assignment of function 'void glLinkProgram(GLuint)'                                                                                                                               
OGLRender.cpp:537: error: cannot convert 'void (*)(GLuint)' to 'void ()(GLuint)' in assignment                                                                                                             
OGLRender.cpp:538: error: assignment of function 'void glUseProgram(GLuint)'                                                                                                                               
OGLRender.cpp:538: error: cannot convert 'void (*)(GLuint)' to 'void ()(GLuint)' in assignment                                                                                                             
OGLRender.cpp:539: error: assignment of function 'void glGetShaderiv(GLuint, GLenum, GLint*)'                                                                                                               
OGLRender.cpp:539: error: cannot convert 'void (*)(GLuint, GLenum, GLint*)' to 'void ()(GLuint, GLenum, GLint*)' in assignment                                                                             
OGLRender.cpp:540: error: assignment of function 'void glGetShaderInfoLog(GLuint, GLsizei, GLsizei*, GLchar*)'                                                                                             
OGLRender.cpp:540: error: cannot convert 'void (*)(GLuint, GLsizei, GLsizei*, GLchar*)' to 'void ()(GLuint, GLsizei, GLsizei*, GLchar*)' in assignment                                                     
OGLRender.cpp:541: error: assignment of function 'void glDeleteShader(GLuint)'                                                                                                                             
OGLRender.cpp:541: error: cannot convert 'void (*)(GLuint)' to 'void ()(GLuint)' in assignment                                                                                                             
OGLRender.cpp:542: error: assignment of function 'void glDeleteProgram(GLuint)'                                                                                                                             
OGLRender.cpp:542: error: cannot convert 'void (*)(GLuint)' to 'void ()(GLuint)' in assignment                                                                                                             
OGLRender.cpp:543: error: assignment of function 'void glGetProgramiv(GLuint, GLenum, GLint*)'
OGLRender.cpp:543: error: cannot convert 'void (*)(GLuint, GLenum, GLint*)' to 'void ()(GLuint, GLenum, GLint*)' in assignment
OGLRender.cpp:544: error: assignment of function 'void glGetProgramInfoLog(GLuint, GLsizei, GLsizei*, GLchar*)'
OGLRender.cpp:544: error: cannot convert 'void (*)(GLuint, GLsizei, GLsizei*, GLchar*)' to 'void ()(GLuint, GLsizei, GLsizei*, GLchar*)' in assignment
OGLRender.cpp:545: error: assignment of function 'void glValidateProgram(GLuint)'
OGLRender.cpp:545: error: cannot convert 'void (*)(GLuint)' to 'void ()(GLuint)' in assignment
OGLRender.cpp:549: error: assignment of function 'void glBlendFuncSeparateEXT(GLenum, GLenum, GLenum, GLenum)'
OGLRender.cpp:549: error: cannot convert 'void (*)(GLenum, GLenum, GLenum, GLenum)' to 'void ()(GLenum, GLenum, GLenum, GLenum)' in assignment
OGLRender.cpp:551: error: assignment of function 'GLint glGetUniformLocation(GLuint, const GLchar*)'
OGLRender.cpp:551: error: cannot convert 'GLint (*)(GLuint, const GLchar*)' to 'GLint ()(GLuint, const GLchar*)' in assignment
OGLRender.cpp:552: error: assignment of function 'void glUniform1i(GLint, GLint)'
OGLRender.cpp:552: error: cannot convert 'void (*)(GLint, GLint)' to 'void ()(GLint, GLint)' in assignment

Offline

#15 2009-02-04 18:54:27

Ice
Member
Registered: 2009-02-04
Posts: 1

Re: Problem with OGLRender when compiling the 0.9 sources

Hi all,

Since I couldn't find the solution thaeron and guillaume are talking about, I found one for myself and wanted to share it with all the other Gentoo guys:

Instead of re-compiling xorg, you can just use eselect (package app-admin/eselect):

eselect opengl set xorg-x11
emerge -DuNa1 desmume
eselect opengl set nvidia

Hope it helps wink

Ice

Offline

#16 2009-02-15 14:05:04

DEF
Member
Registered: 2009-01-06
Posts: 3

Re: Problem with OGLRender when compiling the 0.9 sources

Same problem with 0.9.1.
I uninstalled nvidia drivers, and indeed, it worked !
0.9.1 seems to be a very good release :^)

Offline

#17 2009-07-10 03:52:39

pitufo
Member
Registered: 2009-07-10
Posts: 1

Re: Problem with OGLRender when compiling the 0.9 sources

Hi I've got the same errors but building on osx

Offline

#18 2009-09-06 13:02:20

atuin
Member
Registered: 2009-09-06
Posts: 1

Re: Problem with OGLRender when compiling the 0.9 sources

Hi everyone, i'm new in nds development and in this forum, so first of all i want to greet everyone here.

I had the same problem when compiling desmume, after a tries i compiled it successful (at least it seems to work). Now i'm testing to see if it works correctly.

I modified some lines from OGLRender.cpp, this is the patch

I'm using here Gobolinux and Nvidia drivers + Mesa library

[patch]

--- desmume-0.9.4/src/OGLRender.cpp     2009-07-08 05:11:01.000000000 -0300
+++ desmume-0.9.4-fixed/src/OGLRender.cpp       2009-09-06 09:45:35.000000000 -0300
@@ -27,6 +27,8 @@
#include "OGLRender.h"
#include "debug.h"

+#define GL_GLEXT_PROTOTYPES
+
bool (*oglrender_init)() = 0;
bool (*oglrender_beginOpenGL)() = 0;
void (*oglrender_endOpenGL)() = 0;
@@ -105,7 +107,7 @@
#include <GL/glx.h>
#define INITOGLEXT(x,y) y = (x)glXGetProcAddress((const GLubyte *) #y);
#endif
-
+/*
#ifndef DESMUME_COCOA
OGLEXT(PFNGLCREATESHADERPROC,glCreateShader)
//zero: i dont understand this at all. my glext.h has the wrong thing declared here... so I have to do it myself
@@ -129,6 +131,7 @@
OGLEXT(PFNGLUNIFORM1IPROC,glUniform1i)
OGLEXT(PFNGLUNIFORM1IVPROC,glUniform1iv)
#endif
+*/

#if !defined(GL_VERSION_1_3) || defined(_MSC_VER) || defined(__INTEL_COMPILER)
OGLEXT(PFNGLACTIVETEXTUREPROC,glActiveTexture)
@@ -412,7 +415,7 @@
        glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);

#ifndef DESMUME_COCOA
-       INITOGLEXT(PFNGLCREATESHADERPROC,glCreateShader)
+/*    INITOGLEXT(PFNGLCREATESHADERPROC,glCreateShader)
        INITOGLEXT(X_PFNGLGETSHADERSOURCEPROC,glShaderSource)
        INITOGLEXT(PFNGLCOMPILESHADERPROC,glCompileShader)
        INITOGLEXT(PFNGLCREATEPROGRAMPROC,glCreateProgram)
@@ -426,15 +429,17 @@
        INITOGLEXT(PFNGLDELETEPROGRAMPROC,glDeleteProgram)
        INITOGLEXT(PFNGLGETPROGRAMIVPROC,glGetProgramiv)
        INITOGLEXT(PFNGLGETPROGRAMINFOLOGPROC,glGetProgramInfoLog)
-       INITOGLEXT(PFNGLVALIDATEPROGRAMPROC,glValidateProgram)
+       INITOGLEXT(PFNGLVALIDATEPROGRAMPROC,glValidateProgram)*/
#ifdef HAVE_LIBOSMESA
        glBlendFuncSeparateEXT = NULL;
#else
-       INITOGLEXT(PFNGLBLENDFUNCSEPARATEEXTPROC,glBlendFuncSeparateEXT)
+//    INITOGLEXT(PFNGLBLENDFUNCSEPARATEEXTPROC,glBlendFuncSeparateEXT)
#endif
-       INITOGLEXT(PFNGLGETUNIFORMLOCATIONPROC,glGetUniformLocation)
+    /*
+    INITOGLEXT(PFNGLGETUNIFORMLOCATIONPROC,glGetUniformLocation)
        INITOGLEXT(PFNGLUNIFORM1IPROC,glUniform1i)
        INITOGLEXT(PFNGLUNIFORM1IVPROC,glUniform1iv)
+    */
#endif
#if !defined(GL_VERSION_1_3) || defined(_MSC_VER) || defined(__INTEL_COMPILER)
        INITOGLEXT(PFNGLACTIVETEXTUREPROC,glActiveTexture)
~

[end patch]


Greets.

Offline

#19 2009-09-06 17:53:30

zeromus
Radical Ninja
Registered: 2009-01-05
Posts: 3,292

Re: Problem with OGLRender when compiling the 0.9 sources

why is this still an issue? can't someone conditionalize the code so it compiles in both environments?

Offline

#20 2009-09-06 18:33:56

lbalbalba
Member
Registered: 2009-03-13
Posts: 229

Re: Problem with OGLRender when compiling the 0.9 sources

zeromus wrote:

can't someone conditionalize the code

By the look of things, Im guessing that that 'someone' would have to be you smile

Offline

#21 2009-09-06 18:38:55

zeromus
Radical Ninja
Registered: 2009-01-05
Posts: 3,292

Re: Problem with OGLRender when compiling the 0.9 sources

Its going to have to be someone who knows how to switch their video drivers and compile it both ways.

Offline

Board footer

Powered by FluxBB