SDL + CEGUI + glut
Hello
I have set my app for SDL and CEGUI
i have put some events to fire . like when pushing a button drawing a square or tea pot.
my code is like this
Code:
bool DrawSquare(const CEGUI::EventArgs &e)
{
glutDisplayFunc(dene);
return true;
}
and the dene function is
Code:
void dene()
{
glutWireTeapot(3.2)
}
what may be the problem ? when i click draw square it crashes without any warning and in debug it doesnt seem to show me where the problem is
OK a couple of things:
You seem to be using SDL and glut when there will more than lightly be a conflict using both of these.
You have not provided enough information for anybody to suggest a solution.
Have you tried debugging the application?
You have already posted this to the CEGUI forum.
You seem to be using SDL and glut when there will more than lightly be a conflict using both of these.
You have not provided enough information for anybody to suggest a solution.
Have you tried debugging the application?
You have already posted this to the CEGUI forum.
yes i have
sorry if i didnt give enough info
ok here's the thing
since i cant find any function to draw lines with SDL
this is the code where i initilise SDL
void setupSDL()
{
if ((SDL_Init(SDL_INIT_VIDEO))<0)
{
fprintf(stderr, "Unable to initialise SDL: %s", SDL_GetError());
exit(0);
}
if ((surface = SDL_SetVideoMode(800,600,0,SDL_OPENGL))==NULL)
{
fprintf(stderr, "Unable to set OpenGL videomode: %s", SDL_GetError());
SDL_Quit();
exit(0);
}
SDL_WM_SetCaption("CSE452 Paint Program", NULL);
//Draw_Line(surface, 100,100, 30,0, 3);
//gluLookAt(100, 0, 20, 0, 0, -1, 0, 1, 0);
glEnable(GL_CULL_FACE);
glDisable(GL_FOG);
glClearColor(.2f,.3f,.3f,1.0f);
//glViewport(0,0, 800,600);
SDL_ShowCursor(SDL_DISABLE);
SDL_EnableUNICODE(1);
}
i was thinking if i may have the camera position wrong.
btw i found a SDL_draw library im trying to get it work right now. but its stubborn.
sorry if i didnt give enough info
ok here's the thing
since i cant find any function to draw lines with SDL
this is the code where i initilise SDL
void setupSDL()
{
if ((SDL_Init(SDL_INIT_VIDEO))<0)
{
fprintf(stderr, "Unable to initialise SDL: %s", SDL_GetError());
exit(0);
}
if ((surface = SDL_SetVideoMode(800,600,0,SDL_OPENGL))==NULL)
{
fprintf(stderr, "Unable to set OpenGL videomode: %s", SDL_GetError());
SDL_Quit();
exit(0);
}
SDL_WM_SetCaption("CSE452 Paint Program", NULL);
//Draw_Line(surface, 100,100, 30,0, 3);
//gluLookAt(100, 0, 20, 0, 0, -1, 0, 1, 0);
glEnable(GL_CULL_FACE);
glDisable(GL_FOG);
glClearColor(.2f,.3f,.3f,1.0f);
//glViewport(0,0, 800,600);
SDL_ShowCursor(SDL_DISABLE);
SDL_EnableUNICODE(1);
}
i was thinking if i may have the camera position wrong.
btw i found a SDL_draw library im trying to get it work right now. but its stubborn.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement