inherit
66746
0
Oct 7, 2012 14:05:38 GMT -8
«The Silver Lining»™
^ Me !!!!
1,338
December 2005
chrisrulez001
|
Post by «The Silver Lining»™ on Aug 4, 2010 13:13:42 GMT -8
Hey there,
How can i load images into a OpenGL window?
Also how can i write text to a OpenGL window?
Can anyone point me in the right direction?
|
|
#00AF33
14306
0
1
Sept 8, 2023 8:54:17 GMT -8
Jordan
What is truth?
11,838
October 2003
jab2
|
Post by Jordan on Aug 4, 2010 15:56:10 GMT -8
What language are you using? And what toolkit/library are you using? It really depends on the tools you are using. If you are using C/C++ which I recommend, a good cross-platform multimedia library for beginners which supports OpenGL is SDL, but I don't recommend jumping right into OpenGL. Learn how to make a simple game with the bare basics first which you can find out how to do here.
|
|
inherit
66746
0
Oct 7, 2012 14:05:38 GMT -8
«The Silver Lining»™
^ Me !!!!
1,338
December 2005
chrisrulez001
|
Post by «The Silver Lining»™ on Aug 4, 2010 16:11:57 GMT -8
yeah the language im using is C++
im using a combination between win32 and opengl to make programs.
i tried SDL but it started to confuse me, where as with opengl i find i can understand it better
|
|
#00AF33
14306
0
1
Sept 8, 2023 8:54:17 GMT -8
Jordan
What is truth?
11,838
October 2003
jab2
|
Post by Jordan on Aug 4, 2010 16:29:34 GMT -8
SDL and OpenGL are not the same thing so you can't really compare them. SDL "is a cross-platform multimedia library designed to provide low level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL, and 2D video framebuffer". It allows you to write programs faster without having to worry about platform specifics and to utilize other libraries such as OpenGL. Have you compared how much code you have to write to get a window displayed using the win32 API with a skeleton SDL program? It takes a significant amount of code just to get a window on the screen with win32 whereas in SDL I can setup the window, graphics engine, audio, and font with less code and have it be cross platform (Windowx, Linux, OS X). There's also other libraries and frameworks available which do the same thing and have more to offer such as Qt. If you need help getting a program running with either of those frameworks I can show you some example code, but I haven't bothered learning the winAPI. Note that I don't think the winAPI is not worth learning because it's actually great to know, but when you are wanting to create a game you already have enough to deal with as it is. Use a library which handles all those low level functions for you so you can focus on your actual game.
|
|
inherit
66746
0
Oct 7, 2012 14:05:38 GMT -8
«The Silver Lining»™
^ Me !!!!
1,338
December 2005
chrisrulez001
|
Post by «The Silver Lining»™ on Aug 4, 2010 16:39:21 GMT -8
Yeah your right with opengl it is much more programming just to create a window, so maybe all the time making a window could be put into more useful things in SDL, i had a quick look at the tutorials for SDL and the work load for a window is 10 times shorter. i suppose last time i looked at SDL maybe i wasnt reading the tutorials carefully enough and was getting confused. Maybe i should look at SDL plus all the things im wanting to do in opengl is easier and faster in SDL like you said.
|
|
#00AF33
14306
0
1
Sept 8, 2023 8:54:17 GMT -8
Jordan
What is truth?
11,838
October 2003
jab2
|
Post by Jordan on Aug 4, 2010 16:56:50 GMT -8
SDL will definitely make the process easier for you, but it's still a low level library written in C so you still have to write a lot of code to make something interesting (although this is almost always the case). I've wrapped all the SDL functions that I've used into C++ objects such as SDL_GUI for the startup and window functions, SDL_Pen for drawing text with a loaded font, SDL_Draw for drawing functions such as lines and circles, SDL_Graphic for loading image sprites, SDL_Menu for a font menu which you can scroll through with the keyboard, SDL_Audio for sound effects and music, SDL_Clock for wrapping the SDL_Timer and it's capabilities etc.
Just let me know if you need any help. The hardest part for me while getting started was getting everything organized and structured in a way which made logical sense and allowed me to easily add new features and objects to my games.
|
|
inherit
66746
0
Oct 7, 2012 14:05:38 GMT -8
«The Silver Lining»™
^ Me !!!!
1,338
December 2005
chrisrulez001
|
Post by «The Silver Lining»™ on Aug 5, 2010 2:51:21 GMT -8
Good idea putting the SDL functions into a class so its easier to use Thanks for your help, ill have a run through the SDL tutorials.
|
|
#00AF33
14306
0
1
Sept 8, 2023 8:54:17 GMT -8
Jordan
What is truth?
11,838
October 2003
jab2
|
Post by Jordan on Aug 5, 2010 15:38:14 GMT -8
Glad to help, those tutorials are really good cause LazyFoo has had a lot of experience with SDL.
|
|