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
  • 0 Votes
    5 Posts
    53 Views
    E
    Thanks for breaking down the concepts of pass-by-value and pass-by-reference in such an engaging way! Your explanation makes it clear how these methods work and their implications in programming. It's great to see how this applies across various languages, not just C++. For those interested in enhancing their programming skills, it's essential to grasp these differences. https://www.redspider.ae/.
  • 0 Votes
    6 Posts
    24 Views
    J
    To create a crosshair cursor that remains fixed at the center of the viewport while allowing your 3D model to rotate and zoom, you'll need to render the crosshair after the 3D scene is drawn, but before you swap buffers or display the result. Here’s how you can achieve this: Step-by-Step Approach Render the 3D Scene: Continue using your current camera transformations (like gluLookAt()) to render the 3D model. Set Up the 2D View for the Crosshair: After rendering the 3D scene, switch to orthographic projection mode for rendering the crosshair. Use glMatrixMode(GL_PROJECTION) and glLoadIdentity() to set up the orthographic projection. Set the view volume using glOrtho(). Draw the Crosshair: Once in the orthographic projection mode: Set the color and draw the crosshair at the center of the screen. Use glBegin() and glEnd() to create lines or a texture for the crosshair. Return to the 3D View: After drawing the crosshair, switch back to the perspective projection to prepare for the next frame. Jazimo
  • graphics code needed

    csharp graphics tutorial
    4
    0 Votes
    4 Posts
    19 Views
    M
    Yes there are many ways Crunchyapk.com is also best solution
  • Format16bppRgb555 pixel values sort

    com algorithms json question career
    9
    0 Votes
    9 Posts
    39 Views
    M
    I understand. Maybe it’s because I didn’t explain it clearly. Maybe it’s because my English is not that good! My project is a software material "file" (such as xxx.bin). It is not an image file (such as bmp png...etc.) but a processed file (such as 0x4000~0x5000 blocks to store each pixel) Corresponding position, 0x7000~0x8000 block stores the pixel values ​​used, sorted and stored) After the software reads the file and then performs the internal calculation of the calculation software, the result will be displayed on the software as a material graphic. The other parts have been parsed, and the "arrangement order" of the remaining pixel value data cannot be solved, so I don't care about the corresponding position of its pixel (the corresponding position has been parsed in the block where it is stored). So my need is the pixel The arrangement has nothing to do with the structure of the graph. I have a rough understanding of the image format you mentioned. So I'm just talking about the arrangement of pixels. It may be that my English is not good. Some of the translations used caused trouble in asking questions. I’m sorry! The illustration is for viewing and understanding. It is drawn using VS according to its stored block pixel data. Otherwise it is just a group of arranged pixel values.
  • tack snap shot with windows service

    help csharp visual-studio sysadmin
    4
    0 Votes
    4 Posts
    22 Views
    T
    Taking a snapshot with a Windows service involves a nuanced approach due to the session isolation between the service and the logged-in user. Typically, services operate in a non-interactive session, which restricts their ability to directly interact with the user's desktop. To overcome this, you can create a user-mode application that runs in the user's session and handles the screen capture. The Windows service communicates with this application using inter-process communication (IPC) mechanisms such as named pipes, sockets, or message queues. The service sends a command to the user-mode application, prompting it to take a screenshot using graphics libraries like System.Drawing in .NET. This setup ensures that the screen capture is performed with the necessary permissions and context, while the service oversees the process and manages the communication. By structuring the solution in this way, you can effectively bridge the gap between the non-interactive service environment and the interactive user session, enabling reliable and secure screenshot functionality.
  • hypernewsy

    1
    0 Votes
    1 Posts
    5 Views
    No one has replied
  • 0 Votes
    1 Posts
    10 Views
    No one has replied
  • 0 Votes
    1 Posts
    5 Views
    No one has replied
  • Graphics for Visual Studio 2008 C++

    csharp c++ visual-studio graphics question
    1
    0 Votes
    1 Posts
    6 Views
    No one has replied
  • 0 Votes
    1 Posts
    10 Views
    No one has replied
  • Shadow copy with windows service

    csharp visual-studio sysadmin help
    1
    0 Votes
    1 Posts
    9 Views
    No one has replied
  • SharpDX MediaFoundation and DirectShow

    graphics question game-dev performance
    9
    0 Votes
    9 Posts
    37 Views
    K
    seems nice
  • How to send a windows message from C# to C++

    csharp c++ tutorial
    3
    0 Votes
    3 Posts
    23 Views
    J
    HoraceKHering wrote: it shows a little square. That is a display problem. Might or might not be a data problem. You are attempting to 'display' the data that you go via some mechanism so that your eyes can see it. That means that the computer must attempt to take the data and map it to a character set. That involves at least one and perhaps more than one transformation. Any of those can fail in different ways. The surest way to show data is to learn what hex is and then create (or find) code that displays your data in hex. Every character set I have ever looked at will show hex data. (I think even EBCDIC but I could be mistaken and you are really unlikely to have to deal with that.)
  • 0 Votes
    1 Posts
    11 Views
    No one has replied
  • 0 Votes
    2 Posts
    21 Views
    K
    not really, since system.threads.user.get data secures rules as asynchronous.
  • OpenGL removing "objects" - how ?

    question graphics game-dev
    7
    0 Votes
    7 Posts
    21 Views
    J
    Here is the class -> class bullet { private: public: void update(); bool check() { if(y>=box_len/2) { return true; } return false; } void draw(); }; vector bullets; Here is the update function -> void update(int value) { for( typeof(bullets.begin()) it= bullets.begin(); it!= bullets.end();it++) { if((*it)!=NULL) { if(*it)->check()) { delete *it; bullets.erase(it); } } } glutTimerFunc(10, update, 0); }
  • Reasons for Building an App

    sales mobile com design help
    1
    0 Votes
    1 Posts
    5 Views
    No one has replied
  • 0 Votes
    2 Posts
    11 Views
    V
    Perhaps you do not free some resources?
  • Pygame image wont show up until I close the window

    game-dev announcement
    3
    0 Votes
    3 Posts
    20 Views
    F
    When running I am blit'ing some text onto my surface (WIN) and I want this to be shown in the game so I call pygame.display.update to update the display, this works perfectly fine until the loop has iterated around 75 times and after this the display stops updating. Code below
  • Win32 console programming

    tutorial graphics game-dev question
    5
    0 Votes
    5 Posts
    20 Views
    C
    Start up Visual Studio and select New/Project... from the File menu. In the new project dialog click the Win32 template category on the left and click on Win32 Console Application in the center pane. ... Click OK. ... You should now have a new, empty project.