FAQ

On Sun, 2009-09-27 at 09:52 +0000, Andreas Lund wrote:
Sat, 26 Sep 2009 10:22:19 -0400, Kartik Thakore wrote:
Have you tried POGL?
No. This would basically mean a complete rewrite :-)
Oh, it's not quite that bad ... I wrote a few programs that can decide
at runtime which of POGL or SDL::OpenGL to use, so it can be done. :-)
Which brings me to another question... Trying to get my old code running, I'm
having an unexpected problem with the event handler stuff.

When using 'strict', the program refuses to run:
Bareword "SDL_QUIT" not allowed while "strict subs" in use at
D:/Perl/offworld.pl line 322.
Bareword "SDL_KEYUP" not allowed while "strict subs" in use at
D:/Perl/offworld.pl line 324.
Bareword "SDL_KEYDOWN" not allowed while "strict subs" in use at
D:/Perl/offworld.pl line 336.

Removing 'strict', I get these:
Argument "SDL_QUIT" isn't numeric in numeric eq (==) at D:/Perl/offworld.pl
line 322.
Argument "SDL_KEYUP" isn't numeric in numeric eq (==) at D:/Perl/offworld.pl
line 324.
Argument "SDL_KEYDOWN" isn't numeric in numeric eq (==) at D:/Perl/offworld.pl
line 336.

I can't find anything in the perldocs indicating these symbols need to be
manually imported, so what am I missing?
It's been quite a while since I wrote SDL code but as I recall, you may
just need to use the SDL::Event and SDL::Constants modules explicitly.


-'f

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 8 of 10 | next ›
Discussion Overview
groupsdl-devel @
categoriesperl
postedSep 26, '09 at 8:35a
activeSep 29, '09 at 1:12p
posts10
users3
websitesdl.perl.org

People

Translate

site design / logo © 2021 Grokbase