Skip to main content
Tweeted twitter.com/#!/StackGameDev/status/409984673574825984
added 7 characters in body; edited title
Source Link
user1430
user1430

how to retrieve How can I extract the RGB componentcolor data from a TGA image?

I am working onin OpenGL, and I am trying to create terrains using heightmapsheight maps. I

I am using my own functions to load a tgaTGA image, and in order to pass data to heightmap vertex shader iI need to retrieve RGB componentcomponents from the TGA image.

I am not quite sure how to do that, I saw in one tutorial that SDL library can be used to retrieve RGB component from a TGA image, but I do not want to use any such libraries because I am already able to load a TGA.

So, how do weI recover RGB information per pixel from a TGA that we loaded?

how to retrieve RGB component from a TGA image

I am working on OpenGL, and I am trying to create terrains using heightmaps. I am using my own functions to load a tga image, in order to pass data to heightmap vertex shader i need to retrieve RGB component from the TGA image.

I am not quite sure how to do that, I saw in one tutorial that SDL library can be used to retrieve RGB component from a TGA image, but I do not want to use any such libraries because I am already able to load a TGA.

So, how do we recover RGB information per pixel from a TGA that we loaded?

How can I extract the RGB color data from a TGA image?

I am working in OpenGL, and I am trying to create terrains using height maps.

I am using my own functions to load a TGA image, and in order to pass data to heightmap vertex shader I need to retrieve RGB components from the TGA image.

I am not quite sure how to do that, I saw in one tutorial that SDL library can be used to retrieve RGB component from a TGA image, but I do not want to use any such libraries because I am already able to load a TGA.

So, how do I recover RGB information per pixel from a TGA that we loaded?

Post Reopened by House
Changed the question.
Source Link
2am
  • 323
  • 1
  • 4
  • 15

how to generate data for terrain?retrieve RGB component from a TGA image

Data for a random terrain can be generated using heightmapsI am working on OpenGL, and I am loadingtrying to create terrains using heightmaps. I am using my own functions to load a tga imagesimage, but i do not know how canin order to pass data to heightmap vertex shader i access the r,g,bneed to retrieve RGB component offrom the TGA image that I am loading.

I am not using SDL I am using my own method for loading tga imagesquite sure how to do that, so is there any way using which iI saw in one tutorial that SDL library can accessbe used to retrieve RGB component of the tga images that i am loadingfrom a TGA image, i reallybut I do not want to take help ofuse any externalsuch libraries i want to bebecause I am already able to do this on my ownload a TGA.

What are other ways using whichSo, how do we can generate terrainsrecover RGB information per pixel from a TGA that we loaded?

how to generate data for terrain?

Data for a random terrain can be generated using heightmaps, I am loading tga images, but i do not know how can i access the r,g,b component of the image that I am loading.

I am not using SDL I am using my own method for loading tga images, so is there any way using which i can access RGB component of the tga images that i am loading, i really do not want to take help of any external libraries i want to be able to do this on my own.

What are other ways using which we can generate terrains?

how to retrieve RGB component from a TGA image

I am working on OpenGL, and I am trying to create terrains using heightmaps. I am using my own functions to load a tga image, in order to pass data to heightmap vertex shader i need to retrieve RGB component from the TGA image.

I am not quite sure how to do that, I saw in one tutorial that SDL library can be used to retrieve RGB component from a TGA image, but I do not want to use any such libraries because I am already able to load a TGA.

So, how do we recover RGB information per pixel from a TGA that we loaded?

Post Closed as "Needs details or clarity" by msell, House
Source Link
2am
  • 323
  • 1
  • 4
  • 15

how to generate data for terrain?

Data for a random terrain can be generated using heightmaps, I am loading tga images, but i do not know how can i access the r,g,b component of the image that I am loading.

I am not using SDL I am using my own method for loading tga images, so is there any way using which i can access RGB component of the tga images that i am loading, i really do not want to take help of any external libraries i want to be able to do this on my own.

What are other ways using which we can generate terrains?