Panda3d manual not so helpful

It is me again…
I go trough the manual, And I reach the texturing part.

The manual say:

I just found one problem with this:
This is a pyton command! :frowning:

So I tryed again with the TexturePool but my object always white:

PandaFramework framework;
         framework.open_framework(argc, argv);
         framework.set_window_title("yay");
	WindowProperties *props = new WindowProperties();
          props->set_size(400,200);
          //props->set_undecorated(false);
          //props->set_fixed_size(true);
          props->set_origin(100,100);
         WindowFramework *window = framework.open_window(*props,1);
		 
NodePath lepecs =
  window->load_model(framework.get_models(),"lepke.egg");
lepecs.set_pos(-8, 150, -30);
lepecs.set_scale(1 , 1, 1);
//lepecs.set_color(0,0,1,0.5);

PT(Texture) texture;
texture =  TexturePool::load_texture("lepke.png");


lepecs.set_texture(texture);
lepecs.reparent_to(window->get_render());

the inage is exist.
how to put an image onto an object? (and how you know, how to use a function? the reference dont’t give enough information)
(And I still have no idea, how to make a “sprite” too)

And why not change the name of the window border to “yay”?

Are you sure that your texture is at the path you ask for it at because you load textures the same as me and it works for me.

Oh, I found the problem. You are almost right. The picture is exist, but too big(or my object is too small),
And it have transparent background. :blush:

Thank you.

Now just i have one problem:

Would you tell me, why not/how to change the window title name?
here is my full code:

#include "pandaSystem.h"
#include "pandaFramework.h"
#include "windowProperties.h"
#include "SpriteParticleRenderer.h"
#include "TexturePool.h"
#include "loader.h"

TexturePool*  myTexturePool = TexturePool::get_global_ptr();


int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nCmdShow) {

    int argc = 0;
         char** argv = NULL;
		
		  WindowProperties *props = new WindowProperties();
          props->set_size(400,200);
          //props->set_undecorated(true);
          //props->set_fixed_size(true);
          props->set_origin(100,100);

		 PandaFramework framework;
         framework.open_framework(argc, argv);
         framework.set_window_title("yay");
         WindowFramework *window = framework.open_window(*props,1);		 
NodePath lepecs =
  window->load_model(framework.get_models(),"lepke.egg");
lepecs.set_pos(-8, 150, -30);
lepecs.set_scale(1 , 1, 1);
//lepecs.set_color(0,0,1,0.5);
//myTexture = loader.loadTexture("myTexture.png")
PT(Texture) texture;
texture =  TexturePool::load_texture("blue.jpg");
lepecs.set_texture(texture);
lepecs.reparent_to(window->get_render());
 framework.main_loop();
    // Shut down the engine when done.
		framework.close_framework();

The manual has some holes indeed. But usually the Python and C++ ways are the same and the API is very similar (the only thing changing being the use of snake case in C++ rather than lower camel case).

You have two choices to overcome this: you can either use an IDE that allows you to explore an object’s prototype as you type (KDevelop does that, Eclipse does it with Java but I’m not sure for C++ ?).
Or you can spend a little more time on it and check out the C++ reference:
panda3d.org/reference/1.8.1/cxx/annotated

Sometimes it requires to track down the API quite a lot, but most of the time it’s a perfect match.

About renaming a window, you can do it by calling set_window_title(const std::string&) from your PandaFramework instance.

Yeah, the Visual c++ 2008 have something similar, it is caled intellisence. I works perfect in c# but in c++ is do almost nothing. But fortunetly I found the c++ translated samples (what is in the installed engine), and I will go trough them.
I usually use the reference, but if something need for something (like texturepool calling and declaration) It not will so helpfull, becaue dont tell a lot of thing about the command.

see my code, I use that in my program, but not change the title, because I make a window properties, and I not defined the title in it:

props->set_title(“yay” );

But thank you for helping.