[dundee] Re: Programming in OpenGL

Nistur nistur at googlemail.com
Thu Feb 21 21:57:32 GMT 2008


It's ok, like I said, I realised it wasn't that and that I was doing 
something stupid further up with regards to trying to use an 
uninitialised struct* I had a look at memset and it *was* the one I 
wanted, I was just having one of my... slow moments when nothing seemed 
to make sense.
On a different note, Lee, if you still want the OpenGL stuff I've done 
now (and it's working!) then I can set you up on our CVS on the router 
(although of course, you could do that too... :S) so you can grab what 
I've got. As it is, it's just the code from the NeHe tutorials 
(http://nehe.gamedev.net) modified slightly so it more closely resembles 
what we have as a windows test project. For reference stuff, there's the 
NeHe tutorials themselves, or if you go to the CGT learning resources 
for year 2, the OpenGL Windows stuff starts with semester 1, Tutorial 6 
and go on from that, like I said, what's there should be mirrored more 
or less by the stuff I have. There is also a copy of a reference PDF up 
there too that Matt put up that might be useful in Semester1(if you 
haven't already got it) The only problem is that currently the only 
model loader is a Milkshape model loader. I don't know if this will be a 
problem for what you wanted it for. There are other documented formats 
and model loaders, on the NeHe site I think too...

Finally, when are you free so you can fuck up our router some more? :)

Lee Hughes wrote:
> care to elaborate on that?
>
>
> |
> #include <memory.h>
> #include <stdio.h>
>
> void main( void )
> {
>    char buffer[] = "This is a test of the memset function";
>
>    printf( "Before: %s\n", buffer );
>    memset( buffer, '*', 4 );
>    printf( "After:  %s\n", buffer );
> }
> |
>
> *Output*
> |Before: This is a test of the memset function
> After:  **** is a test of the memset function
>
> |
>
>
>
> */Nistur <nistur at googlemail.com>/* wrote:
>
>     Actually, forget about that, turns out I was doing something stupid
>     somewhere else :)
>
>     Nistur wrote:
>     > Hmmm, I've got a graphics programming module that I've kinda been
>     > neglecting as we have to demonstrate it on Windoze machines and
>     I can
>     > never be bothered to boot 'doze...
>     > I have finally got motivated though and decided to make an
>     environment
>     > similar to what we have been given, which was using the Windows
>     API...
>     > Thankfully our lecturer based his framework on the NeHe tutorials,
>     > which also have a Linux copy of their tutorials handy. The problem
>     > comes in the slight differences between NeHe and what we have. The
>     > problem I have at the moment is that the windows stuff we have has
>     > this in it:
>     > Image *Texture[1]; //Creates storage space for the texture
>     > Width hieght info etc, and the data itself .
>     > memset(Texture,0,sizeof(void *)*1); //makes sure the pointer is
>     > set to null.
>     > Image being a struct that was previously defined. I have looked
>     this
>     > up on google and the only thing that comes up is a string function,
>     > which this doesn't appear to match. Anyone know what I'm talking
>     > about? I sure as hell don't :) Kinda be interested if someone
>     knows a
>     > solution, I ran it once with memset commented and it worked fine :P
>     > Then I tried to run it again and I got a segmentation fault
>     (which I
>     > tracked to the memset just to be sure, well actually the
>     function call
>     > after the memset where it tries to write to the struct...)
>     >
>     > ------------------------------------------
>     > http://nistur.chaosnet.org
>     >
>     >
>     ------------------------------------------
>     http://nistur.chaosnet.org
>
>
>     _______________________________________________
>     dundee GNU/Linux Users Group mailing list
>     dundee at lists.lug.org.uk http://dundee.lug.org.uk
>     https://mailman.lug.org.uk/mailman/listinfo/dundee
>     Chat on IRC, #tlug on dundee.lug.org.uk
>
>
> ------------------------------------------------------------------------
> Yahoo! Answers - Get better answers from someone who knows. Try it now 
> <http://uk.answers.yahoo.com/%20;_ylc=X3oDMTEydmViNG02BF9TAzIxMTQ3MTcxOTAEc2VjA21haWwEc2xrA3RhZ2xpbmU>. 
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> dundee GNU/Linux Users Group mailing list
> dundee at lists.lug.org.uk  http://dundee.lug.org.uk
> https://mailman.lug.org.uk/mailman/listinfo/dundee
> Chat on IRC, #tlug on dundee.lug.org.uk


-- 
------------------------------------------
http://nistur.chaosnet.org




More information about the dundee mailing list