OpenAL&GL

Started by
5 comments, last by Anton_suv 20 years, 6 months ago
Posted - 10/10/2003 : 06:50:23 AM -------------------------------------------------------------------------------- i use OpenGL... after the code my 3d application doesn''t want render,... there is nothing appears in GL window but the music is normaly playing!... /*======INITIALIZATION OPENGL====*/ SetListenerValues(); // Setup an exit procedure. atexit(KillALData); /*======END INITIALIZATION OPENGL====*/ //============render my scene===================== // Begin the source playing. alSourcePlay(Source); /*===============END======================*/ //||||||||||||WIN API|||||||||||||||||||||||||||| // Loop ALint time = 0; ALint elapse = 0; while(!kbhit()) { elapse += clock() - time; time += elapse; if(elapse > 50) { elapse = 0; SourcePos[0] += SourceVel[0]; SourcePos[1] += SourceVel[1]; SourcePos[2] += SourceVel[2]; alSourcefv(Source, AL_POSITION, SourcePos); } } //||||||||||||||||||||||||||END|||||||||||||||||||||||||||||| test
test
Advertisement
nobody know???
test
What is suppose to appear? I don''t see any OpenGL draw commands, just a loop that moves an OpenAL source around until a key is hit.
"When you die, if you get a choice between going to regular heaven or pie heaven, choose pie heaven. It might be a trick, but if it's not, mmmmmmm, boy."
How to Ask Questions the Smart Way.
yeah,now just do the OpenGL part thats commented and youll be set=)
-BourkeIV
no...
i just show u a part of the code...
test
here it is!
-----------------------------------------
int DrawGLScene(GLvoid)
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glLoadIdentity();
glTranslatef(0.0f,0.0f,-5.0f);
drawScene();
/////////////////sound/////////////////
SetListenerValues();

atexit(KillALData);

alSourcePlay(Source);

ALint time = 0;
ALint elapse = 0;

while(!kbhit())
{
elapse += clock() - time;
time += elapse;

if(elapse > 50)
{
elapse = 0;
SourcePos[0] += SourceVel[0];
SourcePos[1] += SourceVel[1];
SourcePos[2] += SourceVel[2];
alSourcefv(Source, AL_POSITION, SourcePos);
}
}
//////////////////////////////////////////////////
test
here a little demo with source watch it to plz
i''ve repair a nehe lesson5...
http://www.gamedev.ru/cgi-bin/download/download.pl?id=207
test

This topic is closed to new replies.

Advertisement