Skip to content

Graphics

DirectX, OpenGL and GDI/GDI+ discussions

This category can be followed from the open social web via the handle graphics@forum.codeproject.com

769 Topics 2.5k Posts
  • Video on OpenGL window, from image frames

    linux question c++ graphics game-dev
    4
    0 Votes
    4 Posts
    6 Views
    E
    DoctorDoctor wrote: that now I need to continue displaying frames on the same opened OpenGL window what you probably want is a PBO (Pixel Buffer Object). This allows rapid transfer of texture objects to and from the card. http://http.download.nvidia.com/developer/Papers/2005/Fast_Texture_Transfers/Fast_Texture_Transfers.pdf[^] you can find more information in the OpenGL SDK from nVidia, Version 9 had the demo of the PBO transfers, not sure about 10. http://download.developer.nvidia.com/developer/SDK/Individual_Samples/3dgraphics_samples.html[^] http://developer.nvidia.com/object/sdk-9.html[^] http://developer.nvidia.com/object/sdk_home.html[^] _________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
  • clueless

    help tutorial career learning
    4
    0 Votes
    4 Posts
    2 Views
    H
    Can you be more specific. WhiteSky
  • OpenGL problems

    graphics c++ com game-dev sales
    3
    0 Votes
    3 Posts
    3 Views
    X
    Rilhas wrote: I once made an application to wrap the real-time video feed from a web cam onto a 3D virtual object in the OpenGL world. Do you want to do something like that? Pretty much. WMP stands for Windows Media Player and i am making a visualization for it. That is the image that is shown when you play a song. It is a moving image that is rendered in real-time and usually moves to the beat of the song. I want to warp the image i have drawn using a 2D array of warp points. I am currenty making an app that edits those points. When it draws the image, it renders it to a texture then draws quads using the points and maps the a section of the texture to it's respective quad. I then copy the screen (with the warped image) back to that texture and do the whole thing again each frame. The result is that the image has a blur/trace effect where the warped image constantly fades into the background. Here are some pics http://img519.imageshack.us/img519/1388/viz1kx4.th.png http://img99.imageshack.us/img99/4991/screenshot4kj7.th.jpg Check out the SwapBuffers post to see my latest problem and see if you can help me their. Customer in computer shop: "Can you copy the Internet onto this disk for me?"
  • Read from text file ..!

    graphics tutorial question career
    5
    0 Votes
    5 Posts
    2 Views
    M
    Sorry I didn't see that you asked a question :) Can't you use a StreamReader to read the lines? You can use the System.Convert class to convert the strings back into the appropriate types. Mark "Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
  • 0 Votes
    8 Posts
    5 Views
    M
    Claudiu Bucur wrote: Now I have to find somewhere the format of the data received on BufferCB for audio PCM Maybe pGrabPin->ConnectionMediaType() "Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
  • Corel CMX plugin?

    help question
    1
    0 Votes
    1 Posts
    2 Views
    No one has replied
  • urgent..pzzz!!

    help css graphics
    6
    0 Votes
    6 Posts
    3 Views
    E
    mr jets wrote: BUTT the problem is its writting the last thing i draw As I tell my team. When faced with a bug/issue you cannot explain, start verifying your assumptions. Step through the code with a debugger, generate a smaller sample to easily step through. If the bug is consistant, then you can reduce it to 2 or 3 shapes and still get the extra item, so single step through inspecting values. Debugging isn't magic, its just research into how the computer is dealing with your code, and finding where what you told it is inconsistant with what it is doing. If you don't have a debugger, message boxes, print displays and other items have been an age-old custom to watching computer activity as it happens. _________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
  • saving my drawing as atext file...!!

    graphics help
    5
    0 Votes
    5 Posts
    3 Views
    C
    You have been asking the same questions for some time now. Realistically, the best way to do this is to create a class for each shape you want to draw, with a common base class, and make a list of that base class. Then you can make the class know how to build itself from the string you store in your file, and to generate a string which identifies the shape type and the details of that shape. I'd go for something less verbose, you really only need to store numbers, just assign each shape type a number. Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
  • drawing algorithms

    graphics question
    10
    0 Votes
    10 Posts
    8 Views
    E
    You are welcome. The hardest part is trying to figure out what you are looking for. There are as many shapes as the imagination, and as many methods of getting them. :) _________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
  • how to put a standard opengl in a windows form

    question graphics game-dev tutorial
    2
    0 Votes
    2 Posts
    4 Views
    J
    http://www.codeproject.com/managedcpp/OpenGLViewWinForms.asp[^]
  • open 2 window at the same time--->openGL????

    c++ graphics game-dev question
    3
    0 Votes
    3 Posts
    3 Views
    M
    Thanks alot:)... its very good website :).. Petrovna
  • HElpppppppppppp

    tutorial question
    2
    0 Votes
    2 Posts
    3 Views
    M
    Something like this maybe... (warning - I haven't provided for a color table of any kind!! This means this won't work for a palette-based video mode or a non BI_RGB DIB, which is why I force it to BI_RGB) int nScreenWidth = ::GetSystemMetrics(SM_CXSCREEN); int nScreenHeight = ::GetSystemMetrics(SM_CYSCREEN); HDC Source = ::GetDC(0); HDC Destination = ::CreateCompatibleDC(Source); HBITMAP hCaptureBitmap = ::CreateCompatibleBitmap(Source, nScreenWidth, nScreenHeight); HGDIOBJ hOldBm = ::SelectObject(Destination, hCaptureBitmap); ::BitBlt(Destination,0,0,nScreenWidth,nScreenHeight, Source, 0, 0, SRCCOPY); ::SelectObject(Destination, hOldBm); BITMAPINFO bmi; memset(&bmi, 0, sizeof(BITMAPINFO)); bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); // Fill the BITMAPINFO struct with info from the DDB ::GetDIBits(Source, hCaptureBitmap, 0, nScreenHeight, NULL, &bmi, DIB_RGB_COLORS); // Normally, you'd want to reallocate the BITMAPINFO struct so there's enough room for // any color table or bitfield entries here!! // *optional* Adjust the BITMAPINFO struct to the desired DIB format here bmi.bmiHeader.biCompression = BI_RGB; BYTE *pPixelBytes = new BYTE[bmi.bmiHeader.biSizeImage]; // Get the DIB pixel bytes from the DDB ::GetDIBits(Source, hCaptureBitmap, 0, nScreenHeight, pPixelBytes, &bmi, DIB_RGB_COLORS); // Do something with the DIB here ::ReleaseDC(0, Source); ::DeleteDC(Destination); ::DeleteObject(hCaptureBitmap); delete[] pPixelBytes; Also make sure you use the correct ReleaseDC/DeleteDC calls on the appropriate DCs. Mark "Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
  • save & open file...

    help
    3
    0 Votes
    3 Posts
    5 Views
    M
    Dear Richard ..thanks for ur interest man..but finally i wrote acode that can save the file at C Drive as atext but while opening the program can read the data from text..but it cant display it ..this valid while drawing LINES ONLY..my problem is: --------> how can i make the program display the file ( draw the lines..) & how can i do that for ellipse & polygons. this apart of my code : using System; using System.Drawing; using System.Collections; using System.ComponentModel; using System.Windows.Forms; using System.Drawing.Drawing2D; using System.Data; using System.IO; using System.Runtime.Serialization.Formatters.Binary; using System.Runtime.Serialization; namespace graphics_practis { /// /// Summary description for Form1. /// public class Form1 : System.Windows.Forms.Form { Point center,radius,v,start,end,a,b; ArrayList arraypoint=new ArrayList(); ArrayList arraylist_points=new ArrayList(); private System.Windows.Forms.Panel panel1; private System.Windows.Forms.PictureBox pictureBox1; private System.Windows.Forms.Button line; private System.Windows.Forms.Button square; private System.Windows.Forms.Button circle; private System.Windows.Forms.Button ellipse; private System.Windows.Forms.Button polygon; private System.Windows.Forms.TextBox textBox1; private System.Windows.Forms.Button ok; private System.Windows.Forms.MainMenu mainMenu1; private System.Windows.Forms.MenuItem menuItem1; private System.Windows.Forms.MenuItem menuItem2; private System.Windows.Forms.MenuItem menuItem3; private System.Windows.Forms.MenuItem menuItem4; private System.Windows.Forms.MenuItem menuItem5; private System.Windows.Forms.Button button1; private System.Windows.Forms.Button button2; private System.Windows.Forms.OpenFileDialog openFileDialog1; private System.Windows.Forms.SaveFileDialog saveFileDialog1; private BinaryFormatter formtter = new BinaryFormatter(); /// /// Required designer variable. /// private System.ComponentModel.Container components = null; public Form1() { // // Required for Windows Form Designer support // InitializeComponent(); // // TODO: Add any constructor code after InitializeComponent call // dr = new draw(this.pictureBox1); } /// /// Clean up any resources being used. /// protected override void Dispose( bool disposing ) { if( disposing ) { if (components
  • Has anyone used libpng before?

    html help question
    3
    0 Votes
    3 Posts
    3 Views
    A
    Thanks for the reply, I forgot to come here and tell people I finally got it working with the help of one of my professors yesterday afternoon (april 30th). Sorry about that...
  • help

    help
    5
    0 Votes
    5 Posts
    3 Views
    M
    hi..U can b sure that im admitted what u wrote openly:).. if u read my question(of subject:help) u'll discover that im simple person..my question was very simple compared to my study..but im always like asking people around me..& im glad 2 give answer about any question asked to me :) .. second sentence its very nice. Petrovna
  • Capturing Network PC`s Desktop

    graphics performance sysadmin help tutorial
    11
    0 Votes
    11 Posts
    11 Views
    D
    You need to scale this large problem down into several smaller problems. I would be inclined to first get the actual communication working at a very basic level before anything else. The calling machine(s) should be able to send multiple requests to the remote machine without any of them being lost. The remote machine could simply write "Received request from xxx." to a file of some sort. Then I would have the remote machine "answer" those requests by being able to take a snapshot of its desktop. Simply send a 0 or 1 back to the calling machine to indicate success or failure. Have the calling machine display this acknowledgment. More to come... "A good athlete is the result of a good and worthy opponent." - David Crow "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
  • Anyone knw micromedia fireworks [modified]

    help
    1
    0 Votes
    1 Posts
    2 Views
    No one has replied
  • Color Eraser..!

    csharp help
    2
    0 Votes
    2 Posts
    3 Views
    C
    The eraser is just drawing a thick line in the background color. Pretty easy stuff. Which bit are you stuck on ? Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
  • Filter on an images

    adobe performance help
    3
    0 Votes
    3 Posts
    5 Views
    C
    Thanks for the plug, mate :-) Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
  • screen view

    2
    0 Votes
    2 Posts
    4 Views
    C
    What language are you using ? .NET languages have a Screen.AllScreens enum that gives you the bounds of all your screens, so it's trivial to position windows in them. Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )