[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4787: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4789: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4790: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4791: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
InsideQC Forums • View topic - win32/Opengl....

win32/Opengl....

Discuss programming topics that involve the OpenGL API.

Moderator: InsideQC Admins

win32/Opengl....

Postby Zylyx_ » Sat Aug 29, 2009 5:49 pm

....noodle...
Zylyx_
 
Posts: 111
Joined: Wed Dec 05, 2007 6:52 pm
Location: scotland, uk

Postby Spike » Sat Aug 29, 2009 8:23 pm

your prototype of CreateMyWindow doesn't match
.
Spike
 
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Postby mh » Sat Aug 29, 2009 9:25 pm

I think your unicode thing might be causing you trouble. I'm guessing that you're probably using a more recent version of Visual C++ (possibly 2008 Express?) which defaults projects to unicode. If you go to Configuration Properties | General | Project Defaults | Character Set and set it to Multi-Byte you'll get char * compatibility back.

Totally unrelated, but maybe request a 24 bit depth buffer instead of a 16 bit one? A 24 bit depth buffer is actually really 32 bits with 8 unused, meaning that it's measurably faster on most reasonably modern - and even most older - hardware. The great thing about ChoosePixelFormat is that if 24 bits isn't available it'll just give you 16, so you've nothing to lose. There's no such thing as a 32 bit depth buffer on most hardware by the way, the options are always either 16 bit, 24 bit with 8 unused or 24 bit with 8 stencil.

Even though you're doing OpenGL I think it's well worth your while to download and study the reference topics in the DirectX SDK. Direct3D is a little bit "closer to the metal" than OpenGL is, and as such you get to learn a great deal more about format sizes and structures and suchlike (and also topics such as why writing to the front buffer is not a good idea on a lot of 3D cards - because Direct3D doesn't support it, and some drivers are written to the D3D spec with OpenGL tacked on afterwards). Learning more about the environment you're coding for is always a good thing, eh?
User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Postby Zylyx_ » Sat Aug 29, 2009 11:11 pm

....noodle...
Zylyx_
 
Posts: 111
Joined: Wed Dec 05, 2007 6:52 pm
Location: scotland, uk

Postby Spike » Sun Aug 30, 2009 12:48 am

.
Spike
 
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Postby Zylyx_ » Sun Aug 30, 2009 11:17 am

....noodle...
Zylyx_
 
Posts: 111
Joined: Wed Dec 05, 2007 6:52 pm
Location: scotland, uk

Postby mh » Sun Aug 30, 2009 12:02 pm

will do the WAV playback thing but it's not going to be high performance and you'll lose a lot of flexibility in terms of mixing, panning, etc. If you just want to make a noise and you're not concerned about effects or latency I guess it's fine.

DirectInput might be good for mouse input. It's a nice API that's incredibly simple to set up and use (create an interface, create a device, acquire it for use and read events). It's officially deprecated and is really just a wrapper around the standard Windows messaging functions, and doesn't work too well with some touchpads, but it does have the advantages of disabling mouse acceleration for you, you don't need to worry about stuff like re-centering the mouse after each move or showing/hiding the cursor, and you can consolidate all of your mouse code in the one place.

Don't use it for keyboard input though, that can get real messy as it uses it's own key code table which needs to be translated, and it can frequently send multiple key events with one press which will need to be filtered.
User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Postby frag.machine » Mon Aug 31, 2009 12:38 am

Well, it's a bit off-topic (since it's not OpenGL), but I stumbled at DirectX wrapper engine another day. Even if you're not going to do 2D gaming and use Direct3D, it has a really good support to input and sound API's. Also, it supports bitmap fonts created from TTF (even has a small utility to conversion).
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
User avatar
frag.machine
 
Posts: 2120
Joined: Sat Nov 25, 2006 1:49 pm

Postby Zylyx_ » Mon Aug 31, 2009 9:26 am

Hmm, that HGE engine does look interesting.

Like I said, all of this is a learning experiance for me, so I dont mind doing the bare basics (infact, i find it neccessary). But all the libs you mentioned are really good for building a full game/demo without rebuidling the wheel.

Unfortunately, for my university work we are restircted to using GDI for 2D windows graphics programming and OpenGL for 3D. We are also doing 2D graphics programming on the PS2, which I'm guessing is going to be similart to the GBA programming we did last year, probably a bit more complex.

However, coming from a minor SDL programming background, I do appreciate the easy of using straight off the shelfs libs and wrappers like the ones you mentioned. Makes life so much more easier.

Anywho, I'm gonna start implementing the TTF rendering for my Swogle lib now. Results and headaches coming soon.
....noodle...
Zylyx_
 
Posts: 111
Joined: Wed Dec 05, 2007 6:52 pm
Location: scotland, uk

Postby frag.machine » Tue Sep 01, 2009 12:30 am

I read in their forums there's at least one non-official HGE port to OpenGL. Don't know the current status, but you may want to check it out.
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
User avatar
frag.machine
 
Posts: 2120
Joined: Sat Nov 25, 2006 1:49 pm


Return to OpenGL Programming

Who is online

Users browsing this forum: No registered users and 2 guests