Newbie Needs OpenGL Help

Started by
7 comments, last by Krak 20 years, 11 months ago
Sorry for bein'' an OpenGL newbie, but I have a few questions I hope you guys can answer: 1.) Why is it that when you supply a file path\name, you hafta convert the "\"s into "/"s? Does it have something to do w/ some of the special commands you can use with \? i.e: "\n" 2.) My program doesn''t work outside of my computer because it can''t find the .bmp file.(And yes, I did supply the full path to the file) It''s a simple program where I use a .bmp file to texture a cube. Would I hafta .zip up the game, and include the .bmp files I''m going to use for it to work outside of my computer? 3.) What''s DWORD alignment? 4.)Using the same method you use to use bitmap textures, would I be able to make an animated GIF texture? 5.) What''s HWND stand for? 6.)What''s a window handle?
Advertisement
quote:Original post by Krak
Sorry for bein' an OpenGL newbie, but I have a few questions I hope you guys can answer:

1.) Why is it that when you supply a file path\name, you hafta convert the "\"s into "/"s? Does it have something to do w/ some of the special commands you can use with \? i.e: "\n"

DOS/Windows uses backslashes, and UNIX uses slashes. UNIX won.
quote:2.) My program doesn't work outside of my computer because it can't find the .bmp file.(And yes, I did supply the full path to the file) It's a simple program where I use a .bmp file to texture a cube. Would I hafta .zip up the game, and include the .bmp files I'm going to use for it to work outside of my computer?

Usually, yeah. But also consider putting the bitmap inside your program as a resource. Read your compiler docs for details.
quote:3.) What's DWORD alignment?

If a DWORD is size n, that means that a DWORD-aligned piece of memory starts at a memory location that is an exact multiple of n.

quote:4.)Using the same method you use to use bitmap textures, would I be able to make an animated GIF texture?

Animated GIFs are not a good way to do animation for anything except the web. Most people use AVIs or sequences of bitmaps.
quote:5.) What's HWND stand for? 6.)What's a window handle?

Handle to a WiNDow. Most Microsoft datatypes that begin with H are handles (HBITMAP, HDC, etc.) A handle is an index value that means nothing to you, but has meaning to API functions. In the case of a window handle, it's a number that means nothing to you, (except to see if two HWNDs refer to the same window) but uniquely identifies a window to API functions that care.




How appropriate. You fight like a cow.

[edited by - sneftel on April 28, 2003 9:07:12 PM]
quote:Animated GIFs are not a good way to do animation for anything except the web. Most people use AVIs or sequences of bitmaps.


How do I use a sequence of bitmaps? Is it too complicated for me to grasp right now?

quote:
If a DWORD is size n, that means that a DWORD-aligned piece of memory starts at a memory location that is an exact multiple of n.


Multliple of n?
Yeah. Like, if n is 4, the memory addresses 16, 20, 24, 80, 84 would be aligned to size 4, whereas 3, 17, 82, 90 would not be.

How appropriate. You fight like a cow.
Just so you know, none of these questions are really OpenGL specific.

-~-The Cow of Darkness-~-
-~-The Cow of Darkness-~-
quote:Original post by cowsarenotevil
Just so you know, none of these questions are really OpenGL specific.

-~-The Cow of Darkness-~-


I''m sorry, but I''m a total Win32/OGL n00b.

I can do console programming like it''s nothin'', though.
Could anyone give me a complete retard''s guide to how DWORD works, and why bitmap dimensions have to be powers of 2? I''m really sorry, but I''m new to this stuff.
quote:Original post by Krak
Could anyone give me a complete retard''s guide to how DWORD works, and why bitmap dimensions have to be powers of 2? I''m really sorry, but I''m new to this stuff.


Can''t tell you much about DWORD, but I can say that they must be powers of two simply because it''s easier for your 3d hardware.



-~-The Cow of Darkness-~-
-~-The Cow of Darkness-~-
quote:Original post by Krak
Could anyone give me a complete retard''s guide to how DWORD works


DWORD doesn''t "work". DWORD is a measure of memory. Byte = 8 bits, word = 2 bytes = 16 bits, DWORD = double word = 2 words = 32 bits. That''s all it is. DWORD-aligned memory is a block of memory that starts on the beginning of a DWORD, i.e. its memory address is divisible by 4 (bytes).

This topic is closed to new replies.

Advertisement