So there is a better than 0% chance that we will see the new ps4 announced at this years E3, but heres the thing, the next console cycle is Sony’s to loose, so what will it take for it to get ahead of the next xbox in no particular order. Read more »
So just a few things i want to get out here as to what i will be doing this summer in roughly the order i am going to do them, except the first as that one i am working in paralell with everything else. Read more »
It’s been a while since i did one of these, but i really like you to get up to date on a few of these things so first things first, it’s been like six months since my surgery and im doing great, i have already lost like 40Kg (88Lbs) and can really start moving around a lot more, i mean when your at 197Kg (434Lbs) just sitting down is hard not to mention standing up or walking and now i walk like 3-4Km a day, so thats good. Read more »
Transform feedback, is one of the tools of the trade not often discussed on the net, in fact i couldn’t find a single tutorial, so i better write one. the essential function of this little feature is to enable you to do very complicated stuff in the geometry shader, stuff that would inevitably make things run slowly, or to assemble a vbo using tiny little parts and then save it to a buffer for later use, or for that matter constant use. Read more »
In this part we will be doing a bit of simple geometry instancing with a minecraft twist, basically what we are going to do is first generate a volumetric landscape of sorts, then render it using cubes, but not the usual way, we are going to do it as a particle system, which is i guess a little bit more than usual as it involves other stuff than strictly openGL, and since there are a few things i want to try out in this field you will be seeing more of it.
This tutorial assumes that you have all the stuff needed for part 1 and in addition texturing available. Read more »
New in OpenGL 3.2 is so called geometry shaders, if you don’t know what they are then what the essentially do is allow you to create new or duplicate geometry. Like instead of drawing a bunch of cubes one after another you could just render a point cloud and let the geometry shader “upgrade” them to cubes, which is probably how i would render minecraft if i where it’s creator, which i would if i had a hat half as awesome as notch does.
Read more »
By this time tomorrow i will be at the hospital getting ready to have surgery first thing Monday morning and at the moment i am somewhat nervous to say the least, but hopefully it will allow will turn a new leaf and get on the right track. If all goes well i will be up and about by Tuesday, though in case i don’t well i really don’t care at that point. Read more »
Hi, here is a little Yule gift for all you GL junkies out there, it’s a short quick and easy tool for taking a screen shot into the tga format, sure it’s uncompressed and doesn’t increment the file name, but it’s pretty slick.
void screenshot (char filename[160],int x, int y)
{
// get the image data
long imageSize = x * y * 3;
unsigned char *data = new unsigned char[imageSize];
glReadPixels(0,0,x,y, GL_BGR,GL_UNSIGNED_BYTE,data);
// split x and y sizes into bytes
int xa= x % 256;
int xb= (x-xa)/256;
int ya= y % 256;
int yb= (y-ya)/256;
//assemble the header
unsigned char header[18]={0,0,2,0,0,0,0,0,0,0,0,0,(char)xa,(char)xb,(char)ya,(char)yb,24,0};
// write header and data to file
fstream File(filename, ios::out | ios::binary);
File.write (reinterpret_cast(header), sizeof (char)*18);
File.write (reinterpret_cast(data), sizeof (char)*imageSize);
File.close();
delete[] data;
data=NULL;
}
|
Usage: screenshot (“test.tga”,800,600);
Just call the function with the correct window size just before SwapBuffers and it will take a screen shot of everything in the frame buffer, easy.