• Create Account

# zacaj

Member Since 18 Sep 2008
Offline Last Active Sep 28 2013 03:05 PM

### #4842741Selecting OpenGL Version (Windows VC++ 2010)

Posted by on 30 July 2011 - 10:44 PM

Youll need to use a library like GLEW or GLee to add all the functions not in 1.1

### #4842400OpenGL Cubes

Posted by on 29 July 2011 - 08:18 PM

Check out this post, it talks about removing "buried cubes"
http://www.sea-of-memes.com/LetsCode1/LetsCode1.html

Much of the slowdown youre getting is probably coming from call overhead. Although the games draw alot more triangles than you are, they draw them in bigger batches, so theres not as much superfluous data going around. You might want to try to implement geometry instancing, it should help a lot with the frame rate. Are all your cubes textured the same? How many calls are you doing per cube?

Posted by on 24 July 2011 - 09:28 AM

What browser are you using? Have you tried others?

Posted by on 23 July 2011 - 09:05 PM

(for some reason your NOT ALLOWED TO ATTACH CODE IN A PROGRAMMING FORUM)
http://zacaj.com/targa.h
http://zacaj.com/targa.cpp

Posted by on 18 July 2011 - 06:24 PM

using a #define replaces anywhere you put the first word with the second. So when you write
items[SHOVEL]=1;
youre really writing
items[2]=1;

I think youre not completally understanding arrays... Ill try to explain, but you might want to read some more tutorials on the subject. Also, sorry if any of this seems stupid-obvious, but its hard to get a feel for how much you get online.
Arrays are just a whole bunch of single numbers
int array[5]; is equivilant to
int array1;
int array2;
etc.
But, you can use a variable (like int i) to access a certain one of the variables in the array.
So you can do array[i]=1;
```switch(i)
case 1:
array1=1;
breakl
case 2:
array2=1;
```
So, you can just use for loops to access each member(individual element) of an array based on the variable you use in the for loop (im assuming you know what for loops are)

### #4835294Help Running OpenGL 4.0

Posted by on 14 July 2011 - 09:28 AM

Most vm software just gives access to the origional hardware, so I dont think that will help.

### #4832640How do people stand Java?

Posted by on 07 July 2011 - 10:30 PM

Had to take a college course on it, and hated every minute of it. I cant see how they thought some of the stuff was a good idea. The only satisfaction I get from java is bending its bad design to act like C++, confusing the professor constantly. Especially operator overloading, and not having [] for vectors/strings. Really?

### #4832219Setup OpenGL like Direct2D

Posted by on 07 July 2011 - 05:37 AM

As to the direct2d part of the question, you should be able to use a different base matrix, right after you set the identity matrix, to do this. In the case of openGL, I think you could just negate the y column of the identitymateix to achieve axes like direct2d, then translate down and left half your screen width so that the origin is in the corner.

### #4824606Include content in emails

Posted by on 17 June 2011 - 02:54 PM

Itd be really helpful if when I get send an email saying theres a reply to a topic Im watching, it included what was posted. New posts already do this, I dont see why replies dont

### #4823250Character/model management in a game

Posted by on 14 June 2011 - 09:40 AM

You only need to store one copy of the model data for any amount of models, then you can just change the transform matrix for each one.
What do you mean by pickable?
You might also want to look into instancing for newer graphics cards

### #4817247Using SDL for OpenGL context is slower than GLFW

Posted by on 29 May 2011 - 03:34 PM

My engine isnt using FBO's yet, but when I did a quick speedtest before starting I found SDL to be MUCH faster that GLFW

### #4815286Creating a noise texture with pre-defined values [Need help with kriging algo...

Posted by on 24 May 2011 - 02:20 PM

You could try using Kriging (http://the-witness.net/news/?p=345) on the black holes, and adding other random control points for the field. Ive never actually used it, but it seems like it would work...

PARTNERS