
Wherever the camera is, I want to get vertex positions from camera view.
I'm using OpenGL for drawing.
I'm from Poland so if you could use some clear language.
Thanks in advance.
Male
iwoplaza hasn't added any contacts yet.
01 September 2012 - 09:01 AM

26 August 2012 - 01:21 PM

23 July 2012 - 06:54 AM
//---- Header File----
class Button{
public:
//variables initiating like float x,y,z...
void func(void);
void draw(){
//Some drawing
}
void CheckButtonClick(float mx, float my,int key,int state){
if(mx >= x && mx <= x+w &&
my >= y && my <= y+h &&
state == 0 && key == 0){
click = true;
func();
}else
click = false;
}
};
//----Main File----
void AddButton(Button &button,string text,void func(),float x,float y,float z,float w,float h,float s,float r,float g,float b,GLuint tex,GLuint clicktex){
button.tex = tex;
button.clicktex = clicktex;
button.func() = func();
button.textsize = s;
button.text = text;
button.x = x;
button.y = y;
button.z = z;
button.w = w;
button.h = h;
button.color[0] = r;
button.color[1] = g;
button.color[2] = b;
}
Button button_file,
void close(){
exit(0);
}
void InitRendering(){
_buttondark = loadTexture ("Data/IvoGui/buttondark.tga");
_buttondark_click = loadTexture ("Data/IvoGui/buttondark_click.tga");
AddButton(button_help,"Pomoc",close(),133,5,0.001f,64,16,0.9f,1.0f,1.0f,1.0f,_buttondark,_buttondark_click);
}
invalid use of void expression
19 July 2012 - 08:30 AM
19 June 2012 - 08:53 AM
void GenBlocks(){
int currblock;
int currXline;
int currZline;
int randID;
for(currblock = 0,currXline = 1,currZline = 1;currblock < blockAM;currblock++,currXline++){
randID = rand() % 2 + 1;
if(currXline > pierw(blockAM)){
currXline = 1;
currZline++;
}
block[currblock].x = currXline*3;
block[currblock].y = 0;
block[currblock].z = currZline*3;
block[currblock].id = randID;
}
}
Find content