Hey, thanks for the read.
I''m developing an API-independent rendering system for use in my upcoming game. I have the bare essentials up and running, i.e. I can create a window with either a D3D8 or OpenGL renderer and clear the background color. Past that, there isn''t much.
The issue arises with the difference in how the APIs handle fullscreening. Direct3D simply asks for the fullscreen property as a parameter and takes care of everything else. OpenGL has no internal mechanism for going into fullscreen mode, and most people use ChangeDisplaySettings (on Win32) for that.
However, my window and renderer classes are separate and have no knowledge of each other. I need a way to allow me to initialize my renderer as either fullscreen or windowed, with no other changes. That is, I don''t want to duplicate code (if the window class takes a fullscreen parameter, it has to know what type the renderer is; if the renderer is the one handling the fullscreen-ness, the OpenGL class would need volumes of data on how to destroy and recreate the window).
I sense that I could fix it with an additional layer of abstraction, which will probably happen soon enough anyway, but it bothers me that I can''t unify the process any further (i.e. ONE place and only one where the fullscreen parameter exists and has an effect.)
Thoughts?
Peace,
ZE.
//email me.//zealouselixir software.//msdn.//n00biez.//
miscellaneous links
Fullscreen Catch-22
quote:Original post by Zorak
SDL
Amen, brother.
SDL is based on DirectX when running in Windows, so that solves your abstraction layer problem. I don''t know what it runs on in Linux. I imagine it runs directly on top of X.
That might be an option if I was interested in not-for-profit development. However, this project might go commercial (and I can''t exactly distro source if that''s the case), and the question here is a matter of code, not of simply switching to a pre-made library.
quote:Original post by ZealousElixir
if the renderer is the one handling the fullscreen-ness, the OpenGL class would need volumes of data on how to destroy and recreate the window
you don''t need to destroy window to switch to fullscreen or back. you only need to take care of window sizing and styles.
sdl is LGPL which means u can use it in a commericial app (without releasing your source code) there are no restrictions.
what u cant do with LGPL is change the sdl library.
many commerical games have used sdl eg UT (linux)
what u cant do with LGPL is change the sdl library.
many commerical games have used sdl eg UT (linux)
got this from the sdl website
Q:
Can I use SDL in a commercial application?
A:
The simple answer is "Yes", just dynamically link with SDL and you''re fine.
Full details are available at: http://www.libsdl.org/license.php
Q:
Can I use SDL in a commercial application?
A:
The simple answer is "Yes", just dynamically link with SDL and you''re fine.
Full details are available at: http://www.libsdl.org/license.php
Also from that exact page:
You must also do one of the following:
1. Include the source code for the version of SDL that you link with, as well as the full source or object code to your application so that the user can relink your application,
or
2. Include a written offer, valid for at least three years, to provide the materials listed in option 1, charging no more than the cost of providing this distribution,
or
3. Make the materials listed in option 1 available from the same place that your application is available.
No thanks,
ZE.
//email me.//zealouselixir software.//msdn.//n00biez.//
miscellaneous links
You must also do one of the following:
1. Include the source code for the version of SDL that you link with, as well as the full source or object code to your application so that the user can relink your application,
or
2. Include a written offer, valid for at least three years, to provide the materials listed in option 1, charging no more than the cost of providing this distribution,
or
3. Make the materials listed in option 1 available from the same place that your application is available.
No thanks,
ZE.
//email me.//zealouselixir software.//msdn.//n00biez.//
miscellaneous links
Let me explain the license in a way that almost everyone can understand.
Step 1: Dynamically link to SDL, release your game and the sourcecode to SDL, not the sourcecode of your game.
Step 2: ???
Step 3: Profit!
It''s really that simple, all you need to do is dynamically link and release the source code for SDL along with your game.
Step 1: Dynamically link to SDL, release your game and the sourcecode to SDL, not the sourcecode of your game.
Step 2: ???
Step 3: Profit!
It''s really that simple, all you need to do is dynamically link and release the source code for SDL along with your game.
If you read the SDL site, im quite positive that it somewhere is written that you can infact talk to the people in charge if you have any suggestions/questions/ideas or problems with the license.
Another way would ofcourse be to download the sources and look how they do it :D.
Another way would ofcourse be to download the sources and look how they do it :D.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement