Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: SFML And Emulators?  (Read 4595 times)

0 Members and 1 Guest are viewing this topic.

Infinity Squared Software

  • Newbie
  • *
  • Posts: 8
  • New Mission: Decline this mission.
    • View Profile
    • Infinity Squared Software
    • Email
SFML And Emulators?
« on: January 13, 2016, 03:11:50 pm »
Hey Guys!
I am looking to create a Gameboy emulator in C++ and need to choose a graphics library. Would SFML be able to work in an emulator or should I learn SDL?
Thanks!

zsbzsb

  • Hero Member
  • *****
  • Posts: 1409
  • Active Maintainer of CSFML/SFML.NET
    • View Profile
    • My little corner...
    • Email
Re: SFML And Emulators?
« Reply #1 on: January 13, 2016, 03:24:46 pm »
Why wouldn't it work? SFML doesn't care at all about what you are drawing.
Motion / MotionNET - Complete video / audio playback for SFML / SFML.NET

NetEXT - An SFML.NET Extension Library based on Thor

Mr_Blame

  • Full Member
  • ***
  • Posts: 192
    • View Profile
    • Email
Re: SFML And Emulator
« Reply #2 on: January 13, 2016, 03:29:27 pm »
If you want to make emulators then sfml and sdl are bad choice you need some low-level graphics api like pure opengl to make emulator, vecause you need to "translate" the bute code to of executable. To translate it you need to provide an alternative to functions that it calls. For exmaple on original platform we have a call to procedure graphics_create_texture, how will you handle it with sfm? You need normal Opengl function - glCreateTexture. If you still misunderstood this then you should understand how wine emulator works.

zsbzsb

  • Hero Member
  • *****
  • Posts: 1409
  • Active Maintainer of CSFML/SFML.NET
    • View Profile
    • My little corner...
    • Email
Re: SFML And Emulator
« Reply #3 on: January 13, 2016, 03:46:22 pm »
If you want to make emulators then sfml and sdl are bad choice you need some low-level graphics api like pure opengl to make emulator, vecause you need to "translate" the bute code to of executable. To translate it you need to provide an alternative to functions that it calls. For exmaple on original platform we have a call to procedure graphics_create_texture, how will you handle it with sfm? You need normal Opengl function - glCreateTexture. If you still misunderstood this then you should understand how wine emulator works.

What? Huh?

He is asking about a Gameboy emulator. As for needing 'pure opengl' you still need a windowing library to use OpenGL. Even if he wanted to write pure gl code he still needs SFML/SDL/GLFW. Next time please understand the question before writing stuff that doesn't make much sense. SFML will be fine for what the OP wants to do.
« Last Edit: January 13, 2016, 03:48:47 pm by zsbzsb »
Motion / MotionNET - Complete video / audio playback for SFML / SFML.NET

NetEXT - An SFML.NET Extension Library based on Thor

Hapax

  • Hero Member
  • *****
  • Posts: 3379
  • My number of posts is shown in hexadecimal.
    • View Profile
    • Links
Re: SFML And Emulator
« Reply #4 on: January 13, 2016, 10:23:40 pm »
you need to "translate" the bute code to of executable. To translate it you need to provide an alternative to functions that it calls.
That's called "emulation".

For exmaple on original platform we have a call to procedure graphics_create_texture, how will you handle it with sfm? You need normal Opengl function - glCreateTexture.
You don't have to do what it used to do, you have to emulate what it used to do.
Selba Ward -SFML drawables
Cheese Map -Drawable Layered Tile Map
Kairos -Timing Library
Grambol
 *Hapaxia Links*

mkalex777

  • Full Member
  • ***
  • Posts: 206
    • View Profile
Re: SFML And Emulator
« Reply #5 on: January 20, 2016, 09:52:28 pm »
If you want to make emulators then sfml and sdl are bad choice you need some low-level graphics api like pure opengl to make emulator, vecause you need to "translate" the bute code to of executable. To translate it you need to provide an alternative to functions that it calls. For exmaple on original platform we have a call to procedure graphics_create_texture, how will you handle it with sfm? You need normal Opengl function - glCreateTexture. If you still misunderstood this then you should understand how wine emulator works.

What? Huh?

He is asking about a Gameboy emulator. As for needing 'pure opengl' you still need a windowing library to use OpenGL. Even if he wanted to write pure gl code he still needs SFML/SDL/GLFW. Next time please understand the question before writing stuff that doesn't make much sense. SFML will be fine for what the OP wants to do.

Pure opengl will be better, actually there is no need for these bloated frameworks with 10-100 megabyte libraries just to open opengl window :)

victorlevasseur

  • Full Member
  • ***
  • Posts: 206
    • View Profile
Re: SFML And Emulators?
« Reply #6 on: January 21, 2016, 12:14:04 am »
Quote
If you still misunderstood this then you should understand how wine emulator works.
By the way, Wine Is Not an Emulator.

Quote
with 10-100 megabyte libraries just to open opengl window :)
But it still needs a library to open a window and pure OpenGL can't do anything about it. So, he needs SFML, SDL or GLFW.