Sign in to follow this  
coderx04

Bmp spirte as background?

Recommended Posts

make one quad and dont move it. move the texture parameters. or use small parts of the bitmap and make several quads. my advice do not use 1200x1600 bitmap. make backgroud just like a map. put your objects on it, and this will make your program faster and flexible.

Share this post


Link to post
Share on other sites
Quote:
Original post by stroma
another advice use smaller image format. eg. jpg

Unfortunately the image file format doesn't make any difference in video memory. Once the file is uploaded to video memory it will consume just as much memory as a BMP image will.
Nevertheless it is a good idea to store the image on disk in a more memory efficient format such as JPEG.

Share this post


Link to post
Share on other sites
Quote:
Original post by coderx04
How to load an jpg files as a background ??..

What is all opengl attributes for that?

OGL doesn't contain any image file format support. You will have to use an image library like DevIL to load the file.

Share this post


Link to post
Share on other sites
Owww, Thats why ..

how about if I use SDL for that? ..
If I use SDL for display all the sprite stuff, can I still use opengl to manipulate? like the lightning and stuff?

Share this post


Link to post
Share on other sites
Quote:
Original post by darookieUnfortunately the image file format doesn't make any difference in video memory.

i now this. but if you use images from file. your "program size" will encrease. and if you are making a simple demo, or game i want it to be small. small is beautiful :D

Share this post


Link to post
Share on other sites
Quote:
Original post by coderx04If I use SDL for display all the sprite stuff, can I still use opengl to manipulate? like the lightning and stuff?
yes you can use opengl and sdl together. just like lots of people.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this