add current_thread to begin_frame/end_frame (untested)

This commit is contained in:
David Rose 2006-04-26 14:34:03 +00:00
parent 2b155307cd
commit ce40d329d3
4 changed files with 12 additions and 12 deletions

View File

@ -63,7 +63,7 @@ osxGraphicsBuffer::
// should be skipped.
////////////////////////////////////////////////////////////////////
bool osxGraphicsBuffer::
begin_frame(FrameMode mode) {
begin_frame(FrameMode mode, Thread *current_thread) {
PStatTimer timer(_make_current_pcollector);
begin_frame_spam();
@ -83,7 +83,7 @@ begin_frame(FrameMode mode) {
clear_cube_map_selection();
}
_gsg->set_current_properties(&get_fb_properties());
return _gsg->begin_frame();
return _gsg->begin_frame(current_thread);
}
////////////////////////////////////////////////////////////////////
@ -94,7 +94,7 @@ begin_frame(FrameMode mode) {
// should do whatever finalization is required.
////////////////////////////////////////////////////////////////////
void osxGraphicsBuffer::
end_frame(FrameMode mode) {
end_frame(FrameMode mode, Thread *current_thread) {
end_frame_spam();
nassertv(_gsg != (GraphicsStateGuardian *)NULL);
@ -104,7 +104,7 @@ end_frame(FrameMode mode) {
copy_to_textures();
}
_gsg->end_frame();
_gsg->end_frame(current_thread);
if (mode == FM_render) {
trigger_flip();

View File

@ -43,8 +43,8 @@ public:
virtual ~osxGraphicsBuffer();
virtual bool begin_frame(FrameMode mode);
virtual void end_frame(FrameMode mode);
virtual bool begin_frame(FrameMode mode, Thread *current_thread);
virtual void end_frame(FrameMode mode, Thread *current_thread);
protected:
virtual void close_buffer();

View File

@ -557,7 +557,7 @@ OSStatus osxGraphicsWindow::buildGL (bool full_screen)
// if the frame should be rendered, or false if it
// should be skipped.
////////////////////////////////////////////////////////////////////
bool osxGraphicsWindow::begin_frame(FrameMode mode)
bool osxGraphicsWindow::begin_frame(FrameMode mode, Thread *current_thread)
{
PStatTimer timer(_make_current_pcollector);
@ -604,7 +604,7 @@ bool osxGraphicsWindow::begin_frame(FrameMode mode)
_gsg->reset_if_new();
_gsg->set_current_properties(&get_fb_properties());
return _gsg->begin_frame();
return _gsg->begin_frame(current_thread);
}
////////////////////////////////////////////////////////////////////
@ -614,7 +614,7 @@ bool osxGraphicsWindow::begin_frame(FrameMode mode)
// after rendering is completed for a given frame. It
// should do whatever finalization is required.
////////////////////////////////////////////////////////////////////
void osxGraphicsWindow::end_frame(FrameMode mode)
void osxGraphicsWindow::end_frame(FrameMode mode, Thread *current_thread)
{
end_frame_spam();
@ -623,7 +623,7 @@ void osxGraphicsWindow::end_frame(FrameMode mode)
nassertv(_gsg != (GraphicsStateGuardian *)NULL);
aglSwapBuffers (get_ggs_context());
_gsg->end_frame();
_gsg->end_frame(current_thread);
}
// trigger_flip();
}

View File

@ -50,8 +50,8 @@ public:
virtual bool move_pointer(int device, int x, int y);
// virtual void make_current();
virtual bool begin_frame(FrameMode mode);
virtual void end_frame(FrameMode mode);
virtual bool begin_frame(FrameMode mode, Thread *current_thread);
virtual void end_frame(FrameMode mode, Thread *current_thread);
virtual void begin_flip();
virtual void end_flip();
virtual void process_events();