Welcome! Log In Create A New Profile

Advanced

assignment 3

Posted by jen8 
Announcements Last Post
Announcement SoC Curricula 09/30/2017 01:08PM
Announcement Demarcation or scoping of examinations and assessment 02/13/2017 07:59AM
Announcement School of Computing Short Learning Programmes 11/24/2014 08:37AM
Announcement Unisa contact information 07/28/2011 01:28PM
assignment 3
March 25, 2011 01:03PM
i'm having difficulty understanding this assignment.how do i display the bmp as a texture on the wall
Re: assignment 3
March 25, 2011 01:32PM
Oops...I assume you actually ment assignment 2?

Well, first you define your image size (like int WIDTH = 256, int HEIGHT = 256), then you must open the .bmp image as a file. After that you need to read the image to a 3 dimentional array with the last 'dimention' as size 3 (image[WIDTH][HEIGHT][3], and the array must be GLubyte). Then you set the texture using glTextParameteri() functions. Then lastly you need to make use of glTextImage2D().

All this is sort of explained on page 410 - page 414.

Hope can make something of this. I just gave a quick idea of what must be done.

_______________________________________
Don't be different...be the one making a difference
Re: assignment 3
March 25, 2011 01:35PM
Also, see page 21 (question 3.a) of tut letter 101. It actually gives a nice example of what to do.

_______________________________________
Don't be different...be the one making a difference
avatar Re: assignment 3
March 25, 2011 03:31PM
BlaXpydo Wrote:
-------------------------------------------------------
> Also, see page 21 (question 3.a) of tut letter
> 101. It actually gives a nice example of what to
> do.

Didn't see that, but manged to get similar code.
Busy trying to get the shadow bit done.
Took forever to read through the last 3 chapters.
Re: assignment 3
March 26, 2011 02:37PM
whew. thanks. will try that. I have spend at least 2 1/2 days on this texture bit and even went online several times. everything else works but this. thanks a mil.

how's everyone doing with the lights part?
avatar Re: assignment 3
March 26, 2011 05:23PM
For our shadows should we use a stencil buffer or shadow matrix?
avatar Re: assignment 3
March 27, 2011 07:47PM
Never mind.
Stencil approach didn't work for me, it kept on changing my shape and shadow colors.

Managed to create the shadow's vertices by projecting the
vertices of each polygon onto the plane ax + by + cz + d = 0, for each wall

Here's a helpful website that has OpenGl examples
OpenGl examples
avatar Re: assignment 3
March 28, 2011 10:37AM
Good news....
Just found out we won't have to worry about shadows for the exam smoking smiley
Re: assignment 3
March 29, 2011 12:44PM
yeah i ment assignment 2...my badgrinning smiley i'm going to try this out thank you
Sorry, only registered users may post in this forum.

Click here to login