Forum

SDLQuake's gl_draw.c

Discuss programming topics that involve the OpenGL API.

Moderator: InsideQC Admins

SDLQuake's gl_draw.c

Postby JasonX » Fri Jan 27, 2012 3:07 am

I'm having some trouble compiling SDLQuake gl_draw.c:

Code: Select all
gcc -o gl_draw.o -c -g -O3 -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/include/SDL gl_draw.c
gl_draw.c:54:22: error: 'GL_LINEAR_MIPMAP_NEAREST' undeclared here (not in a function)
gl_draw.c:55:22: error: 'GL_LINEAR' undeclared here (not in a function)
gl_draw.c: In function 'GL_Bind':
gl_draw.c:77:6: error: 'currenttexture' undeclared (first use in this function)
gl_draw.c:77:6: note: each undeclared identifier is reported only once for each function it appears in
gl_draw.c:83:16: error: 'GL_TEXTURE_2D' undeclared (first use in this function)
gl_draw.c: At top level:
gl_draw.c:307:17: error: 'GL_NEAREST' undeclared here (not in a function)
gl_draw.c:309:32: error: 'GL_NEAREST_MIPMAP_NEAREST' undeclared here (not in a function)


And a lot more...
JasonX
 
Posts: 407
Joined: Tue Apr 21, 2009 2:08 pm

Re: SDLQuake's gl_draw.c

Postby Spike » Fri Jan 27, 2012 3:09 am

-DGLQUAKE
Spike
 
Posts: 2878
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: SDLQuake's gl_draw.c

Postby JasonX » Fri Jan 27, 2012 3:12 am

Nope, still getting errors.
JasonX
 
Posts: 407
Joined: Tue Apr 21, 2009 2:08 pm

Re: SDLQuake's gl_draw.c

Postby JasonX » Fri Jan 27, 2012 3:14 am

I'm using SCONS:

Code: Select all
import glob

env = Environment()

env.ParseConfig('sdl-config --cflags')
env.ParseConfig('sdl-config --libs')

SOURCES = glob.glob('*.c')
HEADERS = glob.glob('*.h')
LINUX_SOURCES = glob.glob('platforms/linux/*.h')
LINUX_HEADERS = glob.glob('platforms/linux/*.h')

env.Append(CCFLAGS = ['-g', '-O3'])
env.Append(LIBS = ['SDL', 'opengl32'])

env.Program(target = 'sdlquake', source = SOURCES + HEADERS + LINUX_SOURCES + LINUX_HEADERS)
JasonX
 
Posts: 407
Joined: Tue Apr 21, 2009 2:08 pm

Re: SDLQuake's gl_draw.c

Postby Rikku2000 » Fri Jan 27, 2012 7:44 am

There is no cflags for -DGLQUAKE and use for LDFlags: -lopengl32 -lglu32
I am sorry for my English...
User avatar
Rikku2000
 
Posts: 49
Joined: Wed Oct 20, 2010 6:33 pm
Location: Germany

Re: SDLQuake's gl_draw.c

Postby Labman » Thu Apr 12, 2012 10:54 am

Being a bit late to answering this, you have probably fixed this, but I would say it's missing the #import <gl/gl.h> as that's where those things are defined.
Labman
 
Posts: 62
Joined: Fri Nov 05, 2004 2:39 am
Location: Cambridge, United Kingdom

Re: SDLQuake's gl_draw.c

Postby Baker » Thu Apr 12, 2012 8:58 pm

Dr. Labman sighting :D I spotted him! Almost as many points as finding Waldo!
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
User avatar
Baker
 
Posts: 3661
Joined: Tue Mar 14, 2006 5:15 am


Return to OpenGL Programming

Who is online

Users browsing this forum: No registered users and 1 guest