Search found 60 matches
- Tue Jan 15, 2008 10:30 pm
- Forum: Beginners Help
- Topic: SMaterial problem
- Replies: 12
- Views: 637
You did not set Normal ...this may be ok if you disabled lighting but if lighting is on you might get weird results. I'm working on it! :) I'm trying to make a sun ... I've calculated positions and it's work just fine ... now the normals should be the vector: (sunpos - cam_pos).normalized(); I thin...
- Mon Jan 14, 2008 11:16 pm
- Forum: Beginners Help
- Topic: SMaterial problem
- Replies: 12
- Views: 637
Now I know ![Smile :)](./images/smilies/icon_smile.gif)
Anyway ... if you read my first post you will se that I setted most things ... the only problem was this:
Thank you again!
![Smile :)](./images/smilies/icon_smile.gif)
Anyway ... if you read my first post you will se that I setted most things ... the only problem was this:
Code: Select all
m_tex[0].Color = m_tex[1].Color = m_tex[2].Color = m_tex[3].Color = SColor( 255, 255, 255, 255 );
- Mon Jan 14, 2008 7:41 pm
- Forum: Beginners Help
- Topic: SMaterial problem
- Replies: 12
- Views: 637
new code: m_tex[0].Pos = vector3df( m_pos.X-0.5f, m_pos.Y+0.5f, m_pos.Z ); m_tex[1].Pos = vector3df( m_pos.X-0.5f, m_pos.Y-0.5f, m_pos.Z ); m_tex[2].Pos = vector3df( m_pos.X+0.5f, m_pos.Y-0.5f, m_pos.Z ); m_tex[3].Pos = vector3df( m_pos.X+0.5f, m_pos.Y+0.5f, m_pos.Z ); m_tex[0].TCoords = vector2df( ...
- Mon Jan 14, 2008 6:53 pm
- Forum: Beginners Help
- Topic: SMaterial problem
- Replies: 12
- Views: 637
1) texture is not NULL: 2) Loaded texture: home/radu/Proiecte/3D_data/Example1/textures/sun/sun.png 3) Vertex data is calculated dinamically ... the uv coords ... hm ... which parameter contains these? 4) are the code snippets exactly the same as you use in your prog ??? then there is an error with ...
- Sun Jan 13, 2008 10:16 pm
- Forum: Beginners Help
- Topic: SMaterial problem
- Replies: 12
- Views: 637
SMaterial problem
here is the code: SMaterial material; material.Lighting = false; material.ZBuffer = true; material.ZWriteEnable = true; material.BackfaceCulling = false; material.TextureLayer[0].TextureWrap = video::ETC_CLAMP; material.setTexture( 0, texture ); here is the draw: videoDriver->setMaterial( m_material...
- Fri Jan 11, 2008 6:31 pm
- Forum: Beginners Help
- Topic: problem scalling a 3DS mesh object
- Replies: 2
- Views: 243
- Wed Jan 09, 2008 10:27 pm
- Forum: Beginners Help
- Topic: Textures problem - low res
- Replies: 2
- Views: 154
- Wed Jan 09, 2008 9:42 pm
- Forum: Beginners Help
- Topic: Textures problem - low res
- Replies: 2
- Views: 154
Textures problem - low res
I have a problem with textures ... here is my code: driver->setTextureCreationFlag( video::ETCF_CREATE_MIP_MAPS, false ); smgr->addSkyBoxSceneNode( driver->getTexture( m_szSkyBox[0] ), driver->getTexture( m_szSkyBox[1] ), driver->getTexture( m_szSkyBox[2] ), driver->getTexture( m_szSkyBox[3] ), driv...
- Sat Dec 15, 2007 1:17 pm
- Forum: Beginners Help
- Topic: problem scalling a 3DS mesh object
- Replies: 2
- Views: 243
problem scalling a 3DS mesh object
Hello I'm trying to scale a mesh and nothing happens. Here is the code: sprintf( szFile, "%s%s", instance()->dir(), "objetcs/cub_4_laturi.3ds" ); scene::IAnimatedMesh* m = instance()->irrSceneManager()->getMesh( szFile ); IMeshManipulator* meshMan = instance()->irrSceneManager()-...
- Thu Nov 22, 2007 9:00 pm
- Forum: Beginners Help
- Topic: How to save and load a game?
- Replies: 15
- Views: 1173
Another posibility is to create a ByteArray class and implement methods like WriteByte, WriteInt, WriteFloat, WriteString, etc and ReadByte, ReadInt, ReadFloat, ReadString. And then a SaveManager class who has a ByteArray prroperty and saves/loads to/from a file anything you want. It's tricky, but a...
- Thu Nov 15, 2007 10:02 am
- Forum: Bug reports
- Topic: [not a bug] bug in COpenGLDriver::draw2DImage( ... )
- Replies: 3
- Views: 569
I see! And what should I do if I want to draw an image in a rectangle for example: 1) tex is 50x50 pixels 2) rectangle is 100x100 pixels 3) I want the texture to be drawn having 100x100 pixels. I've tried that with that function and I saw nothing but my texture drawn having 50x50 pixels and the rest...
- Wed Nov 14, 2007 11:20 pm
- Forum: Bug reports
- Topic: [not a bug] bug in COpenGLDriver::draw2DImage( ... )
- Replies: 3
- Views: 569
[not a bug] bug in COpenGLDriver::draw2DImage( ... )
I saw the code in function: void COpenGLDriver::draw2DImage(const video::ITexture* texture, const core::position2d<s32>& pos, const core::rect<s32>& sourceRect, const core::rect<s32>* clipRect, SColor color, bool useAlphaChannelOfTexture) And there are some lines of code: glTexCoord2f(tcoord...
- Wed Nov 14, 2007 9:23 pm
- Forum: Beginners Help
- Topic: Drawing a image in 3D space
- Replies: 4
- Views: 319
- Tue Nov 13, 2007 11:51 pm
- Forum: Beginners Help
- Topic: Drawing a image in 3D space
- Replies: 4
- Views: 319
- Tue Nov 13, 2007 8:01 pm
- Forum: Beginners Help
- Topic: Drawing a image in 3D space
- Replies: 4
- Views: 319
Drawing a image in 3D space
I have an image in memory, I mean I know width, height, type (eg. ECF_A8R8G8B8) and a pointer to bytes data. How can I create a ITexture on the fly? (without write a png file to the disk and then driver->getTexture( "my_file" ) - I cand do that but it's not quite a cool option). Thank you!