Results 1 to 8 of 8

Thread: OpenGL

  1. #1
    EmuTalk Member
    Join Date
    Jun 2006
    Posts
    2

    OpenGL

    I am programming using GLUT open gl library. When I call GlutMainLoop(); is there a way to call other functions after it? or for that matter have the emulation loop processing and GlutMainLoop() at the same time? I ask this because I want to init my emu I want to display the window, and then begin cpu execution, and it hasn't been working. I mean, I did figure out a way to do it, but when i click on the window while graphics are drawing, it hangs. Suggestions?



    • Advertising

      advertising
      EmuTalk.net
      has no influence
      on the ads that
      are displayed
        
       

  2. #2
    Mankind Member NoeOM's Avatar
    Join Date
    Jun 2006
    Location
    Cáceres, Spain
    Posts
    77

    Lightbulb Callbacks

    You have to write event processing functions. I they are called callbacks in GLUT. Once written, you have to set them using the glut*callback() functions, such as glutMouseCallback() for the mouse, glutKeyboardCallback() for the keyboard and so.

    Anyway, GLUT is a well known library and there are lots of samples an tutorials out there. Google it!
    by Noé
    More about me at my website

  3. #3

  4. #4
    A lowdown dirty shame blueshogun96's Avatar
    Join Date
    Aug 2005
    Location
    Puyallup, WA
    Posts
    196
    Check out this link too.

    http://www.lighthouse3d.com/
    This is me and my PC everyday

    Need a good tutorial on emu programming? Click here. (Link Updated)
    Dynarec article
    Misc emu programming tidbits

  5. #5
    Boring person
    Join Date
    May 2006
    Posts
    194
    To do things in the background you should use the idle callback, however, you have to make it capable of working in steps at a time (for instance, have it emulate all of the instructions until vsync is hit)

  6. #6
    EmuTalk Member
    Join Date
    Jun 2006
    Posts
    2
    Alright, thanks for the links. I figured out what I needed to. Right now I am messing with opengl/sdl programming. Now my next question is when I render graphics, say from chip 8 with resolution 64x32, is there a way to stretch the screen so the graphics are not so tiny, or do I have to do that on my own? I really couldn't find a straight answer to this on google. Gosh, I really think allegro has spoiled me

  7. #7
    EmuTalk Member Garstyciuks's Avatar
    Join Date
    Jan 2006
    Posts
    152
    My emulator does it itself. It can draw 2 times, 4 times and 8 times bigger pixels. I do this by multiplying the coordinates of a pixel. You can check the source code. It uses OpenGL and MFC. There's a link in my signature.

  8. #8
    Moderator Cyberman's Avatar
    Join Date
    Nov 2001
    Posts
    1,824
    Quote Originally Posted by Programulator
    Alright, thanks for the links. I figured out what I needed to. Right now I am messing with opengl/sdl programming. Now my next question is when I render graphics, say from chip 8 with resolution 64x32, is there a way to stretch the screen so the graphics are not so tiny, or do I have to do that on my own? I really couldn't find a straight answer to this on google. Gosh, I really think allegro has spoiled me
    Spoiled programmer!
    Try using a texture and changing it with every update. After this you can stretch the texture pretty much anyway you want even just a regular 2d surface
    Now if you wanted to get fancy you could update it onto the surface of a cube or a 3d object. The skys the limit really.

    Cyb
    Progress (n.):
    The process through which the Internet has evolved from smart people in front of dumb terminals to dumb people in front of smart terminals.
    -------------------------------------------------------------------
    Recursive (adj):
    see Recursive

Similar Threads

  1. Replies: 67
    Last Post: October 17th, 2003, 17:26
  2. Windows 2k and OpenGL problems
    By Laahel in forum Project64
    Replies: 7
    Last Post: March 3rd, 2003, 16:53
  3. (after reinstalling os no opengl plugins work
    By xSMOKEx in forum Project64
    Replies: 2
    Last Post: October 14th, 2002, 22:36
  4. OPENGL used in n64 emulation
    By CyDEtrakD in forum 1964
    Replies: 16
    Last Post: June 7th, 2002, 15:22
  5. 1964 OpenGL Plugin
    By Duncan in forum 1964
    Replies: 10
    Last Post: May 6th, 2002, 06:26

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •