Jump to content
  • Advertisement

iddqd42

Member
  • Content Count

    11
  • Joined

  • Last visited

Community Reputation

122 Neutral

About iddqd42

  • Rank
    Member
  1. iddqd42

    Creating Textures - Direct3D

    ............. [Edited by - iddqd42 on October 22, 2006 8:37:18 AM]
  2. ............. [Edited by - iddqd42 on October 22, 2006 8:08:44 AM]
  3. Hi, im reading all frames from a AVI and now ide like to create a texture from them, so that the small movie can be put on a quad or whatever. I have a pointer pointing at all the frame data using CreateDIBSection, however, i cant seem to make a texture out of it, according to msdn, in order to use D3DXCreateTextureFromFileInMemory i would have to have a complete bitmap in the memory not just its data. Do i have to compose a bitmap using the data or is there an easier way to do this? thanks a lot // iddqd.
  4. iddqd42

    Colors Chaning material colors...?

    Ah, thanks a lot darkwing =)
  5. Hi. I have drawn a quad and applied a 256x256 (32bit) bmp texture to it. This worked fine and all the colors turned out just as on the bmp... now, a few lines under i wanted to add some text with a color (ex.red, doesnt really matter... ;)) However, what ever color i choose for the text makes the material on my quad change to that color (the texture is still there, just odd color...) How can i fix this? Oh, my code for drawing text is just a modified lesson 14 atm... (and im using glOrtho, not perspective) <code> glLoadIdentity(); glTranslatef(14.0f, 8.0f, 0.0f); glBindTexture(GL_TEXTURE_2D, uTextures[MENU]); glBegin(GL_QUADS); glTexCoord2f(0.0f, 1.0f); glVertex3f(0.0f, 0.0f, 0.0f); glTexCoord2f(1.0f, 1.0f); glVertex3f(10.0f, 0.0f, 0.0f); glTexCoord2f(1.0f, 0.0f); glVertex3f(10.0f, 18.0f, 0.0f); glTexCoord2f(0.0f, 0.0f); glVertex3f(0.0f, 18.0f, 0.0f); glEnd(); // ... glDisable(GL_TEXTURE_2D); // Just experementing ;) glLoadIdentity(); glTranslatef(5.0f,5.0f,20.0); glRotatef(180.0f,1.0f,0.0f,0.0f); glColor3f(255.0f, 0.0f, 0.0f); glPrint("Testing..."); glEnable(GL_TEXTURE_2D); // Just experementing ;) </code> btw, if this attemt to add code to a forum doesnt work... how do i do it? =) Thanks for reading // iddqd. ------
  6. iddqd42

    Units in Ogl

    Thanks a lot dan, that worked smootly! =)
  7. iddqd42

    Units in Ogl

    The one thing that keeps me from start using Ogl is that i cant seem to understand how the units work... im using the latest version of nehe basecode and i was thing about making a small tetris game (really small and simple...) and i figured since the width is 10 squares wide, it would be nice having the "board" 10.0f large... the thing is that it is really huge and need to "zoom out" a great deal to see it... how can decrease(and increase for that matter) the size of unit, the game will be running at 800x600 so having one unit to be equal to ~25 pixels would be great (my "board" is 18 units high)... glViewport (0, 0, (GLsizei)(width), (GLsizei)(height)); glMatrixMode (GL_PROJECTION); glLoadIdentity (); gluPerspective (45.0f, (GLfloat)(width)/(GLfloat)(height), 1.0f, 100.0f); is that where i am doing something wrong? well, thanks for reading ;) // iddqd^
  8. iddqd42

    Please test my first shader test app!

    Intel P4 2.8GHZ HT Radeon 9800 Pro [Fullscreen] No fx: 340 fps. fx: 70 fps.
  9. iddqd42

    Rotation help needed...

    So, im trying to create a triangle that can move around on a quad... fLook is his heading, 0.0f - 360.0f, and this is where i want him too point when i move the mouse (incressed/decressed when moving the mouse ;)) if i dont move him he stands in the middle of the quad, and the rotation works perfect, but, as i move him forward/backwards he starts to rotate in a circle around the center of the quad... thanks for reading... <CODE> g_Me.GetPos(unit); g_Me.GetHeading(fLook); glRotatef(fLook, 0.0f, 0.0f, 1.0f); glBegin(GL_TRIANGLES); glColor3f(0.0f, 0.0f, 0.0f); glVertex3f( 0.0f + unit.fX, 0.1f + unit.fY, 0.1f + unit.fZ); glColor3f(1.0f, 0.0f, 0.0f); glVertex3f(-0.1f + unit.fX,-0.1f + unit.fY, 0.1f + unit.fZ); glVertex3f( 0.1f + unit.fX,-0.1f + unit.fY, 0.1f + unit.fZ); glEnd(); glLoadIdentity (); glTranslatef (0.0f, 0.0f, -7.0f); glBegin(GL_QUADS); glColor3f(1.0f, 1.0f, 0.0f); glVertex3f( 2.0f, 2.0f, 0.0f); glVertex3f(-2.0f, 2.0f, 0.0f); glVertex3f(-2.0f,-2.0f, 0.0f); glVertex3f( 2.0f,-2.0f, 0.0f); glEnd(); </CODE>
  10. iddqd42

    Rotate?

    Hi, i am trying to create a very small very simple game. i have a function that places a object where i click, in a 3d eviorment (only using xy though), using glTranslatef, and then drawing the background and the object from that, works great... The ting is, now i want to rotate the object. im doing: glRotatef -> draw object -> rotate back to 0 -> draw background. it looks good, until i decide to move the object with the mouse... it only places the object at the correct place if i place it a (0,0)... which is in the middle of the screen. what i am doing wrong and how to make this work? //thanks for reading, iddqd.
  11. iddqd42

    Units...?

    How am i able to tell what visible unit range it across(XY) the screen at a certain time...? i mean if Z is 0.0f, then maybe the visible range goes from 2.0f <-> -2.0f in X and -1.5f <-> 1.5f in Y... but changing Z will render more or less visible Units... my viewport: glViewport (0, 0, (GLsizei)(width), (GLsizei)(height)); the reason im asking is that im trying to find out, where (only on a 2d level(XY)) my mouse is currently at... and since i run my application under 800x600 i just tried with: fWorldX = g_mouse->x - (400 / 100); fWorldY = (g_mouse->y - (300 / 100)) * -1; it kinda worked, but changing Z made the mouse move more / less correct... (of course ;)) is there a easier way to do this maybe? well, thanks for reading
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!