[CSC 415] Another look at loadTextureRAW

Andrew J. Pounds pounds_aj at mercer.edu
Sun Feb 15 17:52:37 EST 2015


I just looked got home and took a look at /pub/pounds/CSC415.  There are 
TWO versions of the code that are out there.

loadTextureRaw.c is the original C version that took several other 
parameter arguments (like width, height, type , wrap, etc).

there is also the version I asked you to use (loadTextureRAW.cc) which 
requires you to use RBG files that are 256x256 and that formats them for 
GL_TEXTURE_2D.  This was also written in C, but I specifically typecast 
the malloc to an int* so it would compile on both C and C++.   Please 
use this one for now and if you want to try playing with other types of 
files of other sizes you can start using other loadTextureRaw command.  
I will fix it so it can be used for both C and C++ as well.



On 02/13/2015 06:43 PM, Kevin L. Long wrote:
>
> I believe you wrote this in c. Upon investigation, the malloc command 
> cannot be casted to int as it appears you have done in 
>  LoadTextureRAW.c when using C++, unlike c. Just thought I'd let you 
> know. I'll see what I can do to figure out how to fix that.
>
>
>
> ------------------------------------------------------------------------
> *From:* csc415-bounces at theochem.mercer.edu 
> <csc415-bounces at theochem.mercer.edu> on behalf of Andrew J. Pounds 
> <pounds at sandbox.mercer.edu>
> *Sent:* Friday, February 13, 2015 6:05 PM
> *To:* csc415 at theochem.mercer.edu
> *Subject:* Re: [CSC 415] LoadTextureRAW
> That should have said loadTextureRAW code...   Sorry if my last email 
> caused any confusion.
>
> Sent from my HTC One on the Verizon Wireless 4G LTE network
>
> ----- Reply message -----
> From: "Andrew J. Pounds" <pounds at sandbox.mercer.edu>
> To: "pounds at theochem.mercer.edu" <pounds at theochem.mercer.edu>
> Subject: [CSC 415] LoadTextureRAW
> Date: Fri, Feb 13, 2015 2:22 PM
>
> The loadPendulum code is in /pub/pounds/CSC415 on cobre
>
> Sent from my HTC One on the Verizon Wireless 4G LTE network
>
> ----- Reply message -----
> From: "Kevin L. Long" <Kevin.L.Long at live.mercer.edu>
> To: "pounds at theochem.mercer.edu" <pounds at theochem.mercer.edu>
> Subject: LoadTextureRAW
> Date: Fri, Feb 13, 2015 1:48 PM
>
> I pit the code you gave us into my pendulum, but it seems to have no 
> idea what LoadTextureRaw is, is there a library I need to import, 
> sorry if I missedsomething in class.
>
>
> -Thanks in advance
>
> Kevin
>


-- 
Andrew J. Pounds, Ph.D.  (pounds_aj at mercer.edu)
Professor of Chemistry and Computer Science
Mercer University,  Macon, GA 31207   (478) 301-5627
http://faculty.mercer.edu/pounds_aj

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://theochem.mercer.edu/pipermail/csc415/attachments/20150215/6e527160/attachment.html>


More information about the csc415 mailing list