Jump to content

  • Log In with Google      Sign In   
  • Create Account


A bitmap into memory?


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
3 replies to this topic

#1 Zeus_   Members   -  Reputation: 122

Like
Likes
Like

Posted 23 October 2001 - 12:38 PM

Hi. Is this the right forum to ask how one might go about loading a bitmap into a _____ in order to map it? I left it blank because I wasn''t sure whether or not you load it into a multidimensional array and use a pointer, a single array, or what... Conclusion: I forgot how to load pictures into memory, and create something so that I can map them with (like a pointer?) zeus_

Sponsor:

#2 GKW   Members   -  Reputation: 200

Like
Likes
Like

Posted 23 October 2001 - 03:15 PM

glTexImage2D( GLenum target,
GLint level,
GLint internalFormat,
GLsizei width,
GLsizei height,
GLint border,
GLenum format,
GLenum type,
const GLvoid *texels )

As you can see by the last parameter you need a pointer to a spot in memory.

The fanatic is incorruptible: if he kills for an idea, he can just as well get himself killed for one; in either case, tyrant or martyr, he is a monster.
--EM Cioran

Opere Citato

#3 Zeus_   Members   -  Reputation: 122

Like
Likes
Like

Posted 23 October 2001 - 04:10 PM

glTexImage2D( GLenum target,
GLint level,
GLint internalFormat,
GLsizei width,
GLsizei height,
GLint border,
GLenum format,
GLenum type,
const GLvoid *texels )

Thank you in Advance.

Let me see if I get this right:

target = filename
level = 3 (for R, G, and B)
internalFormat = ???
width = width
height = height
border = 0 (no border)
format = ??
type = ??
texels = pointer


Just the three up there with the question marks are the ones I dont get. Thanks.

zeus_

#4 GKW   Members   -  Reputation: 200

Like
Likes
Like

Posted 23 October 2001 - 07:15 PM

You should look up the OpenGL Red Book or the OpenGL Super Bible to get a better idea of what you need to do. OpenGL doesn''t provide loaders. You, or someone else, needs to do all the work of getting your bitmap data into a format that can be fed into OpenGL. Take a look at nehe.gamedev.net. Lesson 5 or 6 has texture loading in it. It should be a start.

The fanatic is incorruptible: if he kills for an idea, he can just as well get himself killed for one; in either case, tyrant or martyr, he is a monster.
--EM Cioran

Opere Citato




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.



PARTNERS