Jump to content

  • Log In with Google      Sign In   
  • Create Account


Combining Lesson 34 with parallax mapping


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

#1 DeathwishCRO   Members   -  Reputation: 100

Like
0Likes
Like

Posted 10 April 2010 - 12:17 AM

Greetings, with the help from lc_overlord I've added texturing to the heightmap tutorial. Now I would like to add the parralax maping to the same code. I have found and example of parralax mapping here http://www.codesampler.com/usersrc/usersrc_5.htm Now I succesfully added the variables and functions from the parallax project to Nehes tutorial but am havin some trouble makin it work. I have tried adding the texture initialization to the RenderHeightmap function where the texturing went on before. However the result is not very satisfying and quite slow. I am not sure where to best place the folowing segment of code glUseProgramObjectARB( g_programObj ); glActiveTexture(GL_TEXTURE0); glBindTexture(GL_TEXTURE_2D, g_textureID); glActiveTexture(GL_TEXTURE1); glBindTexture(GL_TEXTURE_2D, g_heightMapID); glActiveTexture(GL_TEXTURE0); setShaderConstants(); glInterleavedArrays( GL_T2F_C3F_V3F, 0, g_quadVertices ); glDrawArrays( GL_QUADS, 0, 4 ); glUseProgramObjectARB( NULL ); which is in the render function of the original tutorial. My project is here http://www.megaupload.com/?d=AADG2YQZ If anybody has any ideas I would be gratefull, now i need to get some shuteye :) p.s the heightmap terrain is the other .raw file in the data folder, Im curently testing it ona a flat terrain

Sponsor:



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