Jump to content

  • Log In with Google      Sign In   
  • Create Account

Sprites In Ogl


Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
7 replies to this topic

#1   Members   

122
Like
Likes
Like

Posted 06 August 2001 - 02:29 PM

I am probably going to be moving from directx to opengl because I will be porting some stuff to linux. I was wondering if there is a way to do sprites in opengl? I imagine that I would have to use ortographic (or however you spell it) projection because I''m making 2d games only. But, it is my understanding that there are no surfaces to work with in ogl, so how in the world do you load multiple frames from a bitmap to animate on screen? Any online tutorials or suggestions would be greatly appreciated. Thanks

#2   Members   

1323
Like
Likes
Like

Posted 06 August 2001 - 02:54 PM

All you have to do is load in various .bmps or .tgas (assuming you know how to do one, or both), and then make a texture mapped quad. Nothing special. If you need more help... Look at lesson 9 on NeHe''s site. It is exactly what you are looking for.

------------------------------
Trent (ShiningKnight)
E-mail me
Shining Darkness- A division of Chromesphere Studios

#3   Members   

122
Like
Likes
Like

Posted 06 August 2001 - 02:56 PM

in opengl you can use bitmaps, or different parts of a texture, or multiple textures to do animations.
its like using a bunch of small surfaces for ddraw.


#4   Members   

1087
Like
Likes
Like

Posted 06 August 2001 - 03:13 PM

Or, of course, you can use texture coordinates.

[Resist Windows XP''s Invasive Production Activation Technology!]

#5   Members   

122
Like
Likes
Like

Posted 06 August 2001 - 03:23 PM

I know that you can load bitmaps onto opengl quads, but that is just one frame. Is there a way to load in multiple frames from the same bitmap image and then animate it? And can you do transparency?

Thanks

#6   Members   

122
Like
Likes
Like

Posted 06 August 2001 - 03:31 PM

Im reading lesson 9 now and its just what i was looking for! thanks I also like that when I run the opengl program, I can still do other stuff in the background, while directx takes over the entire system.

#7   Members   

122
Like
Likes
Like

Posted 06 August 2001 - 09:24 PM

If you are making 2d games only and you don''t care about special effects (rotozoom, alpha blending...), it may be easier to use SDL to convert a DirectX code to Linux (and a lot of OS).

#8   Members   

142
Like
Likes
Like

Posted 07 August 2001 - 08:15 AM

I am currently about to out two image management libraries for loading images (they can also save). They are both open source and both can be used with openGL. You would only need these if you did not feel like writing your own loading functions.

DevIL
glBMP

DevIL supports more formats but it needs extra files to run on the enduser''s computer.

glBMP only supports four formats (bmp, tga, png, and jpg) but it requires nothing but OpenGL to run on the enduser''s pc.



Matthew
WebMaster
www.Matt-Land.com




Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.