Panda3D
Main Page
Classes
Files
File List
All
Classes
Functions
Variables
Enumerations
panda
src
gobj
textureReloadRequest.h
1
// Filename: textureReloadRequest.h
2
// Created by: drose (12Aug08)
3
//
4
////////////////////////////////////////////////////////////////////
5
//
6
// PANDA 3D SOFTWARE
7
// Copyright (c) Carnegie Mellon University. All rights reserved.
8
//
9
// All use of this software is subject to the terms of the revised BSD
10
// license. You should have received a copy of this license along
11
// with this source code in a file named "LICENSE."
12
//
13
////////////////////////////////////////////////////////////////////
14
15
#ifndef TEXTURERELOADREQUEST
16
#define TEXTURERELOADREQUEST
17
18
#include "pandabase.h"
19
20
#include "asyncTask.h"
21
#include "texture.h"
22
#include "preparedGraphicsObjects.h"
23
#include "pointerTo.h"
24
#include "pmutex.h"
25
26
////////////////////////////////////////////////////////////////////
27
// Class : TextureReloadRequest
28
// Description : This loader request will call
29
// Texture::get_ram_image() in a sub-thread, to force
30
// the texture's image to be re-read from disk. It is
31
// used by GraphicsStateGuardian::async_reload_texture(),
32
// when get_incomplete_render() is true.
33
////////////////////////////////////////////////////////////////////
34
class
EXPCL_PANDA_GOBJ
TextureReloadRequest
:
public
AsyncTask
{
35
public
:
36
ALLOC_DELETED_CHAIN(
TextureReloadRequest
);
37
38
PUBLISHED:
39
INLINE
TextureReloadRequest
(
const
string
&name,
40
PreparedGraphicsObjects
*pgo,
Texture
*texture,
41
bool
allow_compressed);
42
43
INLINE
PreparedGraphicsObjects
*get_prepared_graphics_objects()
const
;
44
INLINE
Texture
*get_texture()
const
;
45
INLINE
bool
get_allow_compressed()
const
;
46
INLINE
bool
is_ready()
const
;
47
48
protected
:
49
virtual
DoneStatus do_task();
50
51
private
:
52
PT(
PreparedGraphicsObjects
) _pgo;
53
PT(
Texture
) _texture;
54
bool
_allow_compressed;
55
bool
_is_ready;
56
57
public
:
58
static
TypeHandle
get_class_type() {
59
return
_type_handle;
60
}
61
static
void
init_type() {
62
AsyncTask::init_type();
63
register_type(_type_handle,
"TextureReloadRequest"
,
64
AsyncTask::get_class_type());
65
}
66
virtual
TypeHandle
get_type()
const
{
67
return
get_class_type();
68
}
69
virtual
TypeHandle
force_init_type() {init_type();
return
get_class_type();}
70
71
private
:
72
static
TypeHandle
_type_handle;
73
};
74
75
#include "textureReloadRequest.I"
76
77
#endif
TextureReloadRequest
This loader request will call Texture::get_ram_image() in a sub-thread, to force the texture's image ...
Definition:
textureReloadRequest.h:34
Texture
Represents a texture object, which is typically a single 2-d image but may also represent a 1-d or 3-...
Definition:
texture.h:75
PreparedGraphicsObjects
A table of objects that are saved within the graphics context for reference by handle later...
Definition:
preparedGraphicsObjects.h:60
AsyncTask
This class represents a concrete task performed by an AsyncManager.
Definition:
asyncTask.h:43
TypeHandle
TypeHandle is the identifier used to differentiate C++ class types.
Definition:
typeHandle.h:85
Generated on Mon Feb 1 2016 13:44:28 for Panda3D by
1.8.5