[QUOTE=Richy19;28056964]Are there any disadvantages to using SFML for the whole openGL window and everything?
Would i still need to depend on glu or any other outdated stuff?[/QUOTE]
Yes, although you can use SFML to create the window and context for you, it won't give you any help with OpenGL functions.
I added a line to my maze generator that traces back through the maze to the start. It makes going through the maze much less frustrating.
[img]http://gyazo.com/c910b38a8f145ee58c5c872e5ca1fc5a.png[/img]
basically this is a demo purifier. basically, when you open a demo in notepad it has all this random bullshit. and if you look hard enough, you can find nefarious configurations, such as sethhack configurations. this will allow me to see who is running sethhack when they run their own demos :)
[img]http://gyazo.com/72f652f25bf12bdac2620b00c836ce1b.png[/img]
Bleh. I'll fix it tommorow. :v:
Started NeHe again but as im on linux i cant use glaux
So i wrote my own texture loader with sf::Image
[img]http://img406.imageshack.us/img406/9751/52752106.png[/img]
Best thing is i can load any file type as the texture and im not limited to .bmp
Don't use nehe, most of the code is deprecated. You should get the "red book" for non-deprecated code.
After a journey of many hours, which was lessened considerably by a seemingly infinite ball of yarn I found halfway through, I have finally made it to the end of this enormous maze!
[img]http://i120.photobucket.com/albums/o181/SamPerson12345/mazerunner2.png[/img]
I stride boldly through the portal, ready to finally feel the wind in my hair and soft grass beneath my feet.
[img]http://i120.photobucket.com/albums/o181/SamPerson12345/mazerunner3.png[/img]
Fuck.
Yeah, I'm pretty much done with this. The maze starts at 10x10 and gets 20% bigger every time you solve it. You can change the starting size, growth rate, and parameters for the maze generation in the embedding html.
I'm planning on working on an FPS with some other people, what 3D engine do you guys recommend?
Irrlicht, or if you feel up to it you can make your own.
Decided to learn Qt. Created a quick'n'fugly "I can't be bothered to find the buttons on the titlebar" palette. Bind a key or a button to open the app out, move out in a direction, and once you leave the window stuff happens to the window underneath the cursor.
[media]http://www.youtube.com/watch?v=b6wcLc6IREA[/media]
Thought I'd have some fun and added an OpenGL control.
[IMG]http://i.cubeupload.com/Pp9McH.png[/IMG]
The textbox only takes numbers (and dots), and determines the rotation speed of the triangle.
Give it a whirl: [URL]http://filesmelt.com/dl/Bragi.rar[/URL]
[cpp]#include <Bragi.hpp>
#include <math.h>
#include <gl/GL.h>
#include <gl/GLU.h>
#include <time.h>
#pragma comment( lib, "GUIWrapper.lib" )
#pragma comment( lib, "opengl32.lib" )
#pragma comment( lib, "glu32.lib" )
Bragi::Textbox* Txt;
Bragi::OpenGL* Ogl;
void PaintFunc( Bragi::Object* Wnd ) {
glTranslatef(0.0f,0.0f,-10.0f); // Move Left 1.5 Units And Into The Screen 6.0
glRotatef( (GLfloat) clock() * atof( Txt->GetText() ), 0.0f, 1.0f, 0.0f );
glBegin(GL_TRIANGLES); // Drawing Using Triangles
glColor3f(1.0f,0.0f,0.0f); // Set The Color To Red
glVertex3f( 0.0f, 1.0f, 0.0f); // Top
glColor3f(0.0f,1.0f,0.0f); // Set The Color To Green
glVertex3f(-1.0f,-1.0f, 0.0f); // Bottom Left
glColor3f(0.0f,0.0f,1.0f); // Set The Color To Blue
glVertex3f( 1.0f,-1.0f, 0.0f); // Bottom Right
glEnd(); // Finished Drawing The Triangle
glTranslatef(2.5f,0.0f,0.0f); // Move Right 3 Units
glRotatef( (GLfloat) clock() * -atof( Txt->GetText() ), 0.0f, 1.0f, 0.0f );
glColor3f(0.5f,0.5f,1.0f); // Set The Color To Blue One Time Only
glBegin(GL_QUADS); // Draw A Quad
glVertex3f(-1.0f, 1.0f, 0.0f); // Top Left
glVertex3f( 1.0f, 1.0f, 0.0f); // Top Right
glVertex3f( 1.0f,-1.0f, 0.0f); // Bottom Right
glVertex3f(-1.0f,-1.0f, 0.0f); // Bottom Left
glEnd();
}
bool ResizeFunc( Bragi::Object* Wnd, int* Width, int* Height ) {
Ogl->SetSize( *Width - 55, *Height - 105 );
Txt->SetPosition( 20, *Height - 70 );
Txt->SetSize( *Width - 55, 20 );
return true;
}
bool InputFilter( Bragi::Object* Wnd, unsigned char C ) {
if( C < 30 || (C >= 48 && C <= 57) || C == 46 ) {
return true;
}
return false;
}
int main() {
Bragi::Window Wnd = Bragi::Window( NULL, "Some title" );
Wnd.SetPosition( 150, 200 );
Wnd.SetSize( 200, 210 );
Txt = new Bragi::Textbox( NULL, &Wnd );
Txt->SetPosition( 20, 130 );
Txt->SetSize( 100, 20 );
Ogl = new Bragi::OpenGL( &Wnd );
Ogl->SetPosition( 20, 20 );
Ogl->SetSize( 145, 100 );
Wnd.OnResize = &ResizeFunc;
Ogl->OnPaint = &PaintFunc;
Txt->OnInput = &InputFilter;
while( true ) {
Wnd.Think();
Ogl->Draw();
}
return 0;
}[/cpp]
[QUOTE=CammieDee666;28061871]Don't use nehe, most of the code is deprecated. You should get the "red book" for non-deprecated code.[/QUOTE]
Like this one?
[img_thumb]http://img695.imageshack.us/img695/6051/15022011001.jpg[/img_thumb]
Apparently openGL3< is harder as it doesnt do some of the stuff for you so i want to start out with the easy one and make my way up
[QUOTE=Richy19;28066496]Like this one?
[img_thumb]http://img695.imageshack.us/img695/6051/15022011001.jpg[/img_thumb]
Apparently openGL3< is harder as it doesnt do some of the stuff for you so i want to start out with the easy one and make my way up[/QUOTE]
It might be more difficult, but for the bits you don't understand you can copy out code snippets, and either try and figure out what they do, or wait for the tutorial to explain.
Why learn bad habits?
[QUOTE=HubmaN;28065644]Decided to learn Qt. Created a quick'n'fugly "I can't be bothered to find the buttons on the titlebar" palette. Bind a key or a button to open the app out, move out in a direction, and once you leave the window stuff happens to the window underneath the cursor.
[img_thumb]http://i.cubeupload.com/TYkXyG.png[/img_thumb]
[media]http://www.youtube.com/watch?v=b6wcLc6IREA[/media][/QUOTE]
How are you finding Qt? I've tried it before but wasn't a fan of how the layout system works. Seemed ridiculously over complicated.
[QUOTE=knighty;28067060]How are you finding Qt? I've tried it before but wasn't a fan of how the layout system works. Seemed ridiculously over complicated.[/QUOTE]
You can disable layouts and hard-code positions if you want.
[QUOTE=knighty;28067060]How are you finding Qt? I've tried it before but wasn't a fan of how the layout system works. Seemed ridiculously over complicated.[/QUOTE]
(I'm a fan of your engine, etc etc.)
The Qt infrastructure is ridiculously complicated in places (language hacks and a whole new qmake, really) but surprisingly unsugared in many others (events are straightforward, Designer files are converted into class headers with a predictable name, and that's what's automatically done - in fact, the amount of boilerplate emitted by the bundled IDE is pretty encouraging). It's the least painful with the Creator, unfortunately.
Layout behavior is sometimes annoyingly implicit but it's not too bad, although I haven't tried out rolling my own yet. Gripes beside it's pretty solid, but that's to be expected.
[QUOTE=esalaka;28067486]You can disable layouts and hard-code positions if you want.[/QUOTE]
[b]Don't.[/b] Windows should be resizable.
The layout thing in Qt is a bit confusing when you begin (especially if you've used Windows Forms or something before), but it's pretty easy when you get the hang of it. [url=http://www.digitalfanatics.org/projects/qt_tutorial/chapter05.html]This ancient tutorial[/url] already has all the layout basics that you will need to use the UI designer.
Oh right I didn't know you could use absolute positions. That's pretty cool. And yeah, I really liked their event system, pretty good for a c++ GUI. I still prefer C# Winforms over eeeeeverything for GUIs though.
[QUOTE=vepa;28067872][b]Don't.[/b] Windows should be resizable.[/QUOTE]
There are situations in which you don't want resizable windows.
[QUOTE=esalaka;28067901]There are situations in which you don't want resizable windows.[/QUOTE]
And most of the windows in your application will not fit into those situations. Even with non-resizable windows it makes more sense to use the Qt layout system instead of hardcoded positions, since it will make resizing the window later much easier (and IMO it will be much easier to build the form anyway).
I've never used Qt but if I didn't like the layout system I'd just use absolute positioning and catch the window resized event so I can manage the layout myself.
[code]x = (1/2) + (1/4);[/code]
[code]Tokenising...
Built list of 15 tokens!
Parsing...
Parsing complete with no errors.
Push: 1 {number}
Push: 2 {number}
Divide
Push: 1 {number}
Push: 4 {number}
Divide
Add
Pop: x {variable}
[/code]
Brackets seem to work.
[editline]15th February 2011[/editline]
[code]print( (x*2)/5, y-8 );[/code]
[code]Tokenising...
Built list of 16 tokens!
Parsing...
Parsing complete with no errors.
PushVar: x {variable}
Push: 2 {number}
Multiply
Push: 5 {number}
Divide
PushVar: y {variable}
Push: 8 {number}
Subtract
PushVar: print {variable}
CallB: 2 {number}
[/code]
I think I'll try to get it to actually run code next.
[QUOTE=ralle105;28068354]I'm learning OpenGL/OpenTK (:iia:)
[img_thumb]http://img5.imageshack.us/img5/5967/shadersz.png[/img_thumb][/QUOTE]
Are you following the tutorials on OpenTK website? They're confusing. :(
[QUOTE=SupahVee;28069803]Are you following the tutorials on OpenTK website? They're confusing. :([/QUOTE]
Nah, I looked at the example code.
What C++ standard are you going to implement? If not the upcoming one, will you provide TR1 extensions? Will you add further functionality, such as reflection?
And.. good luck!
I made a ".Obj" loader today.
[media]http://i53.tinypic.com/28apz79.jpg[/media]
Not using any fancy shaders.
The obj loader is supposed to be included in a bigger project later.
Spent most of the time implementing search and sorting algorithms.
The only bad thing is that I'm pretty sure I will have to remake it from scratch or at least add another mesh format since .obj isn't very good with bones.
Isn't very good as in, it doesn't have bones :P You using searching/sorting for finding duplicate vertices?
[QUOTE=Sakarias88;28072540]I made a ".Obj" loader today.
[media]http://i53.tinypic.com/28apz79.jpg[/media]
Not using any fancy shaders.
The obj loader is supposed to be included in a bigger project later.
Spent most of the time implementing search and sorting algorithms.
The only bad thing is that I'm pretty sure I will have to remake it from scratch or at least add another mesh format since .obj isn't very good with bones.[/QUOTE]
Man don't you just hate when you go to your bread chest and theres some guy in it eating up all your bread?
edit:
Also am I the only one who hates the default header / source files virtual folders in VC++? It just seems to completely break the modular feel of OOP. I make virtual folders for each class.
Sorry, you need to Log In to post a reply to this thread.