mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 08:44:19 -04:00
build once more with the Tau profiler
This commit is contained in:
parent
37bdfa9815
commit
59ec701a26
@ -907,7 +907,7 @@
|
|||||||
#define TAU_MAKEFILE
|
#define TAU_MAKEFILE
|
||||||
#define TAU_ROOT
|
#define TAU_ROOT
|
||||||
#define PDT_ROOT
|
#define PDT_ROOT
|
||||||
#define TAU_OPTS -optKeepFiles
|
#define TAU_OPTS -optKeepFiles -optRevert
|
||||||
#define TAU_CFLAGS -D_GNU_SOURCE
|
#define TAU_CFLAGS -D_GNU_SOURCE
|
||||||
#define USE_TAU
|
#define USE_TAU
|
||||||
|
|
||||||
|
@ -84,8 +84,9 @@
|
|||||||
#set DEPENDABLE_HEADERS $[DEPENDABLE_HEADERS] $[filter %.h %.I %.T %_src.cxx,$[get_sources]] $[included_sources]
|
#set DEPENDABLE_HEADERS $[DEPENDABLE_HEADERS] $[filter %.h %.I %.T %_src.cxx,$[get_sources]] $[included_sources]
|
||||||
|
|
||||||
// Now compute the source files.
|
// Now compute the source files.
|
||||||
#define c_sources $[filter %.c,$[get_sources]]
|
#define c_sources $[filter-out %_src.c,$[filter %.c,$[get_sources]]]
|
||||||
#define cxx_sources $[filter-out %_src.cxx,$[filter %.cxx %.mm %.cpp,$[get_sources]]]
|
#define mm_sources $[filter %.mm,$[get_sources]]
|
||||||
|
#define cxx_sources $[filter-out %_src.cxx,$[filter %.cxx %.cpp,$[get_sources]]]
|
||||||
#define cxx_interrogate_sources
|
#define cxx_interrogate_sources
|
||||||
#if $[PYTHON_MODULE_ONLY]
|
#if $[PYTHON_MODULE_ONLY]
|
||||||
#set cxx_interrogate_sources $[cxx_sources]
|
#set cxx_interrogate_sources $[cxx_sources]
|
||||||
@ -96,7 +97,7 @@
|
|||||||
#define lxx_sources $[filter %.lxx,$[get_sources]]
|
#define lxx_sources $[filter %.lxx,$[get_sources]]
|
||||||
|
|
||||||
// Define what the object files are.
|
// Define what the object files are.
|
||||||
#foreach file $[c_sources] $[cxx_sources] $[cxx_interrogate_sources] $[yxx_sources] $[lxx_sources]
|
#foreach file $[c_sources] $[mm_sources] $[cxx_sources] $[cxx_interrogate_sources] $[yxx_sources] $[lxx_sources]
|
||||||
#define $[file]_obj $[patsubst %.c %.cxx %.mm %.cpp %.yxx %.lxx,$[ODIR]/$[obj_prefix]%$[OBJ],$[notdir $[file]]]
|
#define $[file]_obj $[patsubst %.c %.cxx %.mm %.cpp %.yxx %.lxx,$[ODIR]/$[obj_prefix]%$[OBJ],$[notdir $[file]]]
|
||||||
#push 1 $[file]_obj
|
#push 1 $[file]_obj
|
||||||
#end file
|
#end file
|
||||||
@ -160,7 +161,7 @@
|
|||||||
#set cxx_interrogate_sources $[cxx_interrogate_sources] $[generated_file]
|
#set cxx_interrogate_sources $[cxx_interrogate_sources] $[generated_file]
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define compile_sources $[c_sources] $[cxx_sources] $[cxx_interrogate_sources]
|
#define compile_sources $[c_sources] $[mm_sources] $[cxx_sources] $[cxx_interrogate_sources]
|
||||||
|
|
||||||
#end metalib_target lib_target noinst_lib_target test_lib_target static_lib_target dynamic_lib_target ss_lib_target bin_target noinst_bin_target test_bin_target
|
#end metalib_target lib_target noinst_lib_target test_lib_target static_lib_target dynamic_lib_target ss_lib_target bin_target noinst_bin_target test_bin_target
|
||||||
|
|
||||||
|
@ -83,6 +83,10 @@
|
|||||||
#define python_framework $[PYTHON_FRAMEWORK]
|
#define python_framework $[PYTHON_FRAMEWORK]
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if $[USE_TAU]
|
||||||
|
#define tau_ipath $[wildcard $[TAU_IPATH]]
|
||||||
|
#endif
|
||||||
|
|
||||||
#if $[HAVE_THREADS]
|
#if $[HAVE_THREADS]
|
||||||
#define threads_ipath $[wildcard $[THREADS_IPATH]]
|
#define threads_ipath $[wildcard $[THREADS_IPATH]]
|
||||||
#define threads_lpath $[wildcard $[THREADS_LPATH]]
|
#define threads_lpath $[wildcard $[THREADS_LPATH]]
|
||||||
@ -697,7 +701,7 @@
|
|||||||
// names only; the -I switch is not included here.
|
// names only; the -I switch is not included here.
|
||||||
#defun get_ipath
|
#defun get_ipath
|
||||||
// hack to add stl,python. should be removed
|
// hack to add stl,python. should be removed
|
||||||
#define alt_ipath $[if $[IGNORE_LIB_DEFAULTS_HACK],,$[stl_ipath] $[python_ipath]]
|
#define alt_ipath $[if $[IGNORE_LIB_DEFAULTS_HACK],,$[stl_ipath] $[python_ipath] $[tau_ipath]]
|
||||||
|
|
||||||
#foreach package $[use_packages]
|
#foreach package $[use_packages]
|
||||||
#set alt_ipath $[alt_ipath] $[$[package]_ipath]
|
#set alt_ipath $[alt_ipath] $[$[package]_ipath]
|
||||||
|
@ -341,7 +341,7 @@ igate : $[get_igatedb(metalib_target lib_target ss_lib_target)]
|
|||||||
// various .obj files.
|
// various .obj files.
|
||||||
|
|
||||||
#define sources \
|
#define sources \
|
||||||
$[patsubst %,$[%_obj],$[c_sources] $[cxx_sources]]
|
$[patsubst %,$[%_obj],$[c_sources] $[mm_sources] $[cxx_sources]]
|
||||||
#define interrogate_sources \
|
#define interrogate_sources \
|
||||||
$[patsubst %,$[%_obj],$[cxx_interrogate_sources]]
|
$[patsubst %,$[%_obj],$[cxx_interrogate_sources]]
|
||||||
#define cc_ld $[or $[get_ld],$[CC]]
|
#define cc_ld $[or $[get_ld],$[CC]]
|
||||||
@ -656,7 +656,7 @@ $[TAB] $[compile_c]
|
|||||||
|
|
||||||
// Rules to compile C++ files (static objects).
|
// Rules to compile C++ files (static objects).
|
||||||
|
|
||||||
#foreach file $[sort $[cxx_sources] $[cxx_interrogate_sources]]
|
#foreach file $[sort $[mm_sources] $[cxx_sources] $[cxx_interrogate_sources]]
|
||||||
#define target $[$[file]_obj]
|
#define target $[$[file]_obj]
|
||||||
#define source $[file]
|
#define source $[file]
|
||||||
#define ipath $[target_ipath]
|
#define ipath $[target_ipath]
|
||||||
@ -697,7 +697,7 @@ $[TAB] $[compile_c]
|
|||||||
|
|
||||||
// Rules to compile C++ files (shared objects).
|
// Rules to compile C++ files (shared objects).
|
||||||
|
|
||||||
#foreach file $[sort $[cxx_sources] $[cxx_interrogate_sources]]
|
#foreach file $[sort $[mm_sources] $[cxx_sources] $[cxx_interrogate_sources]]
|
||||||
#define target $[$[file]_obj]
|
#define target $[$[file]_obj]
|
||||||
#define source $[file]
|
#define source $[file]
|
||||||
#define ipath $[target_ipath]
|
#define ipath $[target_ipath]
|
||||||
|
@ -12,15 +12,6 @@
|
|||||||
//
|
//
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifdef __APPLE__
|
|
||||||
#ifndef isnan
|
|
||||||
#define isnan(x) \
|
|
||||||
((sizeof(x) == sizeof(double)) ? \
|
|
||||||
__isnand(x) : \
|
|
||||||
(sizeof(x) == sizeof(float)) ? __isnanf(x) : __isnan(x))
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __INTEL_COMPILER
|
#ifdef __INTEL_COMPILER
|
||||||
// see float.h
|
// see float.h
|
||||||
#define FPU_CONTROLWORD_WRITEMASK 0xFFFFF // if you look at defn of _CW_DEFAULT, all settings fall within 0xFFFFF
|
#define FPU_CONTROLWORD_WRITEMASK 0xFFFFF // if you look at defn of _CW_DEFAULT, all settings fall within 0xFFFFF
|
||||||
|
@ -47,7 +47,7 @@ DeletedBufferChain(size_t buffer_size) {
|
|||||||
void *DeletedBufferChain::
|
void *DeletedBufferChain::
|
||||||
allocate(size_t size, TypeHandle type_handle) {
|
allocate(size_t size, TypeHandle type_handle) {
|
||||||
#ifdef USE_DELETED_CHAIN
|
#ifdef USE_DELETED_CHAIN
|
||||||
TAU_PROFILE("void *DeletedBufferChain::allocate(size_t, TypeHandle)", " ", TAU_USER);
|
//TAU_PROFILE("void *DeletedBufferChain::allocate(size_t, TypeHandle)", " ", TAU_USER);
|
||||||
assert(size <= _buffer_size);
|
assert(size <= _buffer_size);
|
||||||
|
|
||||||
ObjectNode *obj;
|
ObjectNode *obj;
|
||||||
@ -105,7 +105,7 @@ allocate(size_t size, TypeHandle type_handle) {
|
|||||||
void DeletedBufferChain::
|
void DeletedBufferChain::
|
||||||
deallocate(void *ptr, TypeHandle type_handle) {
|
deallocate(void *ptr, TypeHandle type_handle) {
|
||||||
#ifdef USE_DELETED_CHAIN
|
#ifdef USE_DELETED_CHAIN
|
||||||
TAU_PROFILE("void DeletedBufferChain::deallocate(void *, TypeHandle)", " ", TAU_USER);
|
//TAU_PROFILE("void DeletedBufferChain::deallocate(void *, TypeHandle)", " ", TAU_USER);
|
||||||
assert(ptr != (void *)NULL);
|
assert(ptr != (void *)NULL);
|
||||||
|
|
||||||
#ifdef DO_MEMORY_USAGE
|
#ifdef DO_MEMORY_USAGE
|
||||||
|
@ -20,6 +20,11 @@
|
|||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
||||||
|
#ifdef USE_TAU
|
||||||
|
// Tau provides this destructive version of stdbool.h that we must mask.
|
||||||
|
#define __PDT_STDBOOL_H_
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef CPPPARSER
|
#ifdef CPPPARSER
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
@ -18,6 +18,10 @@
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <stdio.h> // for perror
|
#include <stdio.h> // for perror
|
||||||
|
|
||||||
|
#ifdef __APPLE__
|
||||||
|
#include <sys/param.h> // for realpath
|
||||||
|
#endif // __APPLE__
|
||||||
|
|
||||||
#ifdef WIN32_VC
|
#ifdef WIN32_VC
|
||||||
// Windows requires this for getcwd().
|
// Windows requires this for getcwd().
|
||||||
#include <direct.h>
|
#include <direct.h>
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
#include "collisionBox.h"
|
#include "collisionBox.h"
|
||||||
#include "collisionLine.h"
|
#include "collisionLine.h"
|
||||||
#include "collisionRay.h"
|
#include "collisionRay.h"
|
||||||
|
#include "collisionSphere.h"
|
||||||
#include "collisionSegment.h"
|
#include "collisionSegment.h"
|
||||||
#include "collisionHandler.h"
|
#include "collisionHandler.h"
|
||||||
#include "collisionEntry.h"
|
#include "collisionEntry.h"
|
||||||
|
@ -184,7 +184,11 @@ set_highest_collision(const NodePath &target_node_path, const NodePath &from_nod
|
|||||||
// Add only the one that we're impacting with:
|
// Add only the one that we're impacting with:
|
||||||
add_entry(highest);
|
add_entry(highest);
|
||||||
} else {
|
} else {
|
||||||
_current_colliding.insert(valid_entries.begin(), valid_entries.end());
|
// Add all of them.
|
||||||
|
pvector<PT(CollisionEntry)>::iterator vi;
|
||||||
|
for (vi = valid_entries.begin(); vi != valid_entries.end(); ++vi) {
|
||||||
|
add_entry(*vi);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
config_framework.cxx config_framework.h \
|
config_framework.cxx config_framework.h \
|
||||||
pandaFramework.cxx pandaFramework.I pandaFramework.h \
|
pandaFramework.cxx pandaFramework.I pandaFramework.h \
|
||||||
windowFramework.cxx windowFramework.I windowFramework.h \
|
windowFramework.cxx windowFramework.I windowFramework.h \
|
||||||
shuttle_controls.bam.c
|
rock_floor.rgb_src.c shuttle_controls.bam_src.c
|
||||||
|
|
||||||
#define INSTALL_HEADERS \
|
#define INSTALL_HEADERS \
|
||||||
pandaFramework.I pandaFramework.h \
|
pandaFramework.I pandaFramework.h \
|
||||||
|
@ -58,12 +58,12 @@
|
|||||||
|
|
||||||
// This is generated data for the standard texture we apply to the
|
// This is generated data for the standard texture we apply to the
|
||||||
// blue triangle.
|
// blue triangle.
|
||||||
#include "rock_floor.rgb.c"
|
#include "rock_floor.rgb_src.c"
|
||||||
|
|
||||||
// This is generated data for shuttle_controls.bam, a bamified version
|
// This is generated data for shuttle_controls.bam, a bamified version
|
||||||
// of shuttle_controls.egg (found in the models tree). It's
|
// of shuttle_controls.egg (found in the models tree). It's
|
||||||
// compiled in shuttle_controls.bam.c.
|
// compiled in shuttle_controls.bam_src.c.
|
||||||
#include "shuttle_controls.bam.c"
|
#include "shuttle_controls.bam_src.c"
|
||||||
|
|
||||||
// This number is chosen arbitrarily to override any settings in model
|
// This number is chosen arbitrarily to override any settings in model
|
||||||
// files.
|
// files.
|
||||||
|
@ -120,6 +120,7 @@
|
|||||||
antialiasAttrib.cxx \
|
antialiasAttrib.cxx \
|
||||||
attribNodeRegistry.cxx \
|
attribNodeRegistry.cxx \
|
||||||
audioVolumeAttrib.cxx \
|
audioVolumeAttrib.cxx \
|
||||||
|
auxBitplaneAttrib.cxx \
|
||||||
auxSceneData.cxx \
|
auxSceneData.cxx \
|
||||||
bamFile.cxx \
|
bamFile.cxx \
|
||||||
billboardEffect.cxx \
|
billboardEffect.cxx \
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
void ConditionVarPosixImpl::
|
void ConditionVarPosixImpl::
|
||||||
wait(double timeout) {
|
wait(double timeout) {
|
||||||
TAU_PROFILE("ConditionVarPosixImpl::wait()", " ", TAU_USER);
|
//TAU_PROFILE("ConditionVarPosixImpl::wait()", " ", TAU_USER);
|
||||||
|
|
||||||
struct timeval now;
|
struct timeval now;
|
||||||
gettimeofday(&now, NULL);
|
gettimeofday(&now, NULL);
|
||||||
|
@ -201,7 +201,7 @@ void *ThreadPosixImpl::
|
|||||||
root_func(void *data) {
|
root_func(void *data) {
|
||||||
TAU_REGISTER_THREAD();
|
TAU_REGISTER_THREAD();
|
||||||
{
|
{
|
||||||
TAU_PROFILE("void ThreadPosixImpl::root_func()", " ", TAU_USER);
|
//TAU_PROFILE("void ThreadPosixImpl::root_func()", " ", TAU_USER);
|
||||||
|
|
||||||
ThreadPosixImpl *self = (ThreadPosixImpl *)data;
|
ThreadPosixImpl *self = (ThreadPosixImpl *)data;
|
||||||
int result = pthread_setspecific(_pt_ptr_index, self->_parent_obj);
|
int result = pthread_setspecific(_pt_ptr_index, self->_parent_obj);
|
||||||
|
@ -156,7 +156,7 @@ DWORD ThreadWin32Impl::
|
|||||||
root_func(LPVOID data) {
|
root_func(LPVOID data) {
|
||||||
TAU_REGISTER_THREAD();
|
TAU_REGISTER_THREAD();
|
||||||
{
|
{
|
||||||
TAU_PROFILE("void ThreadWin32Impl::root_func()", " ", TAU_USER);
|
//TAU_PROFILE("void ThreadWin32Impl::root_func()", " ", TAU_USER);
|
||||||
|
|
||||||
ThreadWin32Impl *self = (ThreadWin32Impl *)data;
|
ThreadWin32Impl *self = (ThreadWin32Impl *)data;
|
||||||
BOOL result = TlsSetValue(_pt_ptr_index, self->_parent_obj);
|
BOOL result = TlsSetValue(_pt_ptr_index, self->_parent_obj);
|
||||||
|
@ -127,19 +127,15 @@ test_performance() {
|
|||||||
|
|
||||||
MemoryUsage::freeze();
|
MemoryUsage::freeze();
|
||||||
MapType *m = new MapType;
|
MapType *m = new MapType;
|
||||||
if (MemoryUsage::has_cpp_size()) {
|
cerr << "Empty map uses " << MemoryUsage::get_current_cpp_size()
|
||||||
cerr << "Empty map uses " << MemoryUsage::get_current_cpp_size()
|
<< " bytes.\n";
|
||||||
<< " bytes.\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
for (int p = 0; p < initial_population; p++) {
|
for (int p = 0; p < initial_population; p++) {
|
||||||
m->insert(MapType::value_type(samples[rand() & sample_mask], 0));
|
m->insert(MapType::value_type(samples[rand() & sample_mask], 0));
|
||||||
}
|
}
|
||||||
if (MemoryUsage::has_cpp_size()) {
|
cerr << "map with " << m->size()
|
||||||
cerr << "map with " << m->size()
|
<< " elements uses " << MemoryUsage::get_current_cpp_size()
|
||||||
<< " elements uses " << MemoryUsage::get_current_cpp_size()
|
<< " bytes.\n";
|
||||||
<< " bytes.\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
for (int r = 0; r < num_reps; r++) {
|
for (int r = 0; r < num_reps; r++) {
|
||||||
double now = clock->get_real_time();
|
double now = clock->get_real_time();
|
||||||
|
@ -13,8 +13,9 @@
|
|||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#include "pandaFramework.h"
|
#include "pandaFramework.h"
|
||||||
#include "geomQuad.h"
|
#include "cardMaker.h"
|
||||||
#include "textureAttrib.h"
|
#include "texture.h"
|
||||||
|
#include "pnmImage.h"
|
||||||
#include "cmath.h"
|
#include "cmath.h"
|
||||||
#include "mathNumbers.h"
|
#include "mathNumbers.h"
|
||||||
|
|
||||||
@ -22,12 +23,10 @@ NodePath bogus_scene;
|
|||||||
NodePath old_bogus_scene;
|
NodePath old_bogus_scene;
|
||||||
|
|
||||||
void
|
void
|
||||||
event_T(CPT_Event, void *data) {
|
event_T(const Event *, void *data) {
|
||||||
PandaFramework *framework = (PandaFramework *)data;
|
PandaFramework *framework = (PandaFramework *)data;
|
||||||
WindowFramework *wf = framework->get_window(0);
|
WindowFramework *wf = framework->get_window(0);
|
||||||
|
|
||||||
GraphicsStateGuardian *gsg = wf->get_graphics_window()->get_gsg();
|
|
||||||
Camera *camera = wf->get_camera(0);
|
|
||||||
NodePath models = framework->get_models();
|
NodePath models = framework->get_models();
|
||||||
NodePath render = wf->get_render();
|
NodePath render = wf->get_render();
|
||||||
|
|
||||||
@ -54,14 +53,9 @@ event_T(CPT_Event, void *data) {
|
|||||||
cerr << "Loading " << num_quads_side * num_quads_side << " textures at "
|
cerr << "Loading " << num_quads_side * num_quads_side << " textures at "
|
||||||
<< tex_x_size << ", " << tex_y_size << "\n";
|
<< tex_x_size << ", " << tex_y_size << "\n";
|
||||||
|
|
||||||
GeomNode *gnode = new GeomNode("quads");
|
|
||||||
bogus_scene.attach_new_node(gnode);
|
|
||||||
|
|
||||||
PNMImage white_center(tex_x_size / 4, tex_y_size / 4);
|
PNMImage white_center(tex_x_size / 4, tex_y_size / 4);
|
||||||
white_center.fill(1.0f, 1.0f, 1.0f);
|
white_center.fill(1.0f, 1.0f, 1.0f);
|
||||||
|
|
||||||
PTA_Colorf colors;
|
|
||||||
colors.push_back(Colorf(1.0f, 1.0f, 1.0f, 1.0f));
|
|
||||||
for (int yi = 0; yi < num_quads_side; yi++) {
|
for (int yi = 0; yi < num_quads_side; yi++) {
|
||||||
float y0 = (float)yi / (float)num_quads_side;
|
float y0 = (float)yi / (float)num_quads_side;
|
||||||
float y1 = (float)(yi + 1) / (float)num_quads_side;
|
float y1 = (float)(yi + 1) / (float)num_quads_side;
|
||||||
@ -90,23 +84,13 @@ event_T(CPT_Event, void *data) {
|
|||||||
tex->set_minfilter(Texture::FT_linear_mipmap_linear);
|
tex->set_minfilter(Texture::FT_linear_mipmap_linear);
|
||||||
tex->load(bogus_image);
|
tex->load(bogus_image);
|
||||||
|
|
||||||
PTA_Vertexf coords;
|
CardMaker cm("card");
|
||||||
PTA_TexCoordf uvs;
|
cm.set_frame(Vertexf(hx0 * px0, hy0 * px0, py0),
|
||||||
coords.push_back(Vertexf(hx0 * px0, hy0 * px0, py0));
|
Vertexf(hx1 * px0, hy1 * px0, py0),
|
||||||
coords.push_back(Vertexf(hx1 * px0, hy1 * px0, py0));
|
Vertexf(hx1 * px1, hy1 * px1, py1),
|
||||||
coords.push_back(Vertexf(hx1 * px1, hy1 * px1, py1));
|
Vertexf(hx0 * px1, hy0 * px1, py1));
|
||||||
coords.push_back(Vertexf(hx0 * px1, hy0 * px1, py1));
|
NodePath card = bogus_scene.attach_new_node(cm.generate());
|
||||||
uvs.push_back(TexCoordf(0.0f, 0.0f));
|
card.set_texture(tex);
|
||||||
uvs.push_back(TexCoordf(1.0f, 0.0f));
|
|
||||||
uvs.push_back(TexCoordf(1.0f, 1.0f));
|
|
||||||
uvs.push_back(TexCoordf(0.0f, 1.0f));
|
|
||||||
|
|
||||||
PT(GeomQuad) quad = new GeomQuad;
|
|
||||||
quad->set_coords(coords);
|
|
||||||
quad->set_colors(colors, G_OVERALL);
|
|
||||||
quad->set_num_prims(1);
|
|
||||||
quad->set_texcoords(uvs, G_PER_VERTEX);
|
|
||||||
gnode->add_geom(quad, RenderState::make(TextureAttrib::make(tex)));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
cerr << "Done.\n";
|
cerr << "Done.\n";
|
||||||
@ -134,7 +118,7 @@ main(int argc, char *argv[]) {
|
|||||||
window->loop_animations();
|
window->loop_animations();
|
||||||
|
|
||||||
framework.enable_default_keys();
|
framework.enable_default_keys();
|
||||||
framework.get_event_handler().add_hook("shift-t", event_T, &framework);
|
framework.define_key("shift-t", "test texture memory", event_T, &framework);
|
||||||
framework.main_loop();
|
framework.main_loop();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@
|
|||||||
textNode.cxx \
|
textNode.cxx \
|
||||||
textProperties.cxx \
|
textProperties.cxx \
|
||||||
textPropertiesManager.cxx \
|
textPropertiesManager.cxx \
|
||||||
cmss12.bam.c cmss12.bam.pz.c persans.ttf.c
|
cmss12.bam_src.c cmss12.bam.pz_src.c persans.ttf_src.c
|
||||||
|
|
||||||
#define INSTALL_HEADERS \
|
#define INSTALL_HEADERS \
|
||||||
config_text.h \
|
config_text.h \
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
|
|
||||||
// If we have FreeType available, include the ttf font; it's superior
|
// If we have FreeType available, include the ttf font; it's superior
|
||||||
// because it's dynamic. See above.
|
// because it's dynamic. See above.
|
||||||
#include "persans.ttf.c"
|
#include "persans.ttf_src.c"
|
||||||
|
|
||||||
#elif defined(HAVE_ZLIB)
|
#elif defined(HAVE_ZLIB)
|
||||||
|
|
||||||
@ -50,9 +50,9 @@
|
|||||||
|
|
||||||
// egg2bam -rawtex -o cmss12.bam cmss12.egg
|
// egg2bam -rawtex -o cmss12.bam cmss12.egg
|
||||||
// pzip cmss12.bam
|
// pzip cmss12.bam
|
||||||
// bin2c -n default_font_data -o cmss12.bam.pz.c cmss12.bam.pz
|
// bin2c -n default_font_data -o cmss12.bam.pz_src.c cmss12.bam.pz
|
||||||
|
|
||||||
#include "cmss12.bam.pz.c"
|
#include "cmss12.bam.pz_src.c"
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
@ -62,9 +62,9 @@
|
|||||||
// Regenerate this file with (cmss12.egg can be loaded from the models tree):
|
// Regenerate this file with (cmss12.egg can be loaded from the models tree):
|
||||||
|
|
||||||
// egg2bam -rawtex -o cmss12.bam cmss12.egg
|
// egg2bam -rawtex -o cmss12.bam cmss12.egg
|
||||||
// bin2c -n default_font_data -o cmss12.bam.c cmss12.bam
|
// bin2c -n default_font_data -o cmss12.bam_src.c cmss12.bam
|
||||||
|
|
||||||
#include "cmss12.bam.c"
|
#include "cmss12.bam_src.c"
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user