Search found 79 matches

by parad0x13
Sun Nov 08, 2009 11:50 pm
Forum: C++ Development
Topic: Allow wxThread to access global data
Replies: 9
Views: 2530

signature? I'm not quite sure what you mean. The only way I know how to pass global variables, like the Pointers class that I initiated in main.cpp, would be by pointer assigning when I call a function

If there's a better way please tell!
by parad0x13
Sun Nov 08, 2009 10:11 pm
Forum: C++ Development
Topic: Allow wxThread to access global data
Replies: 9
Views: 2530

global is just a variable that points to the global Pointer class that is declared in main.cpp main.cpp #include "main.h" #include "wxVertigo_Frm.h" #include "Pointers.h" #include "rand.h" #include "temp.h" IMPLEMENT_APP(MainApp) bool MainApp::OnInit...
by parad0x13
Sun Nov 08, 2009 9:06 pm
Forum: C++ Development
Topic: Thread seems not write to functions array
Replies: 5
Views: 1282

Thank Heavens! I didn't even realize this!

Thank you heavenly for your help : )
by parad0x13
Sun Nov 08, 2009 9:04 pm
Forum: C++ Development
Topic: Allow wxThread to access global data
Replies: 9
Views: 2530

Absolutely, thank you for your attention Simple format of the code I'm talking about: part of main.cpp Pointers *pointers = new Pointers(); pointers->ScreenResolution = ::wxGetDisplaySize(); pointers->tempAccess = new temp; Pointers.h #ifndef _POINTERS_ #define _POINTERS_ class RenderGLCanvas; class...
by parad0x13
Sun Nov 08, 2009 8:24 pm
Forum: C++ Development
Topic: Allow wxThread to access global data
Replies: 9
Views: 2530

Allow wxThread to access global data

I'm having this bothersome problem when I create a thread and try to access global data. Basically I create the wxThread passing a pointer to a global class with a variable, and in the Entry() function I try to access that variable. The problem I get every time is "Access Violation" saying...
by parad0x13
Sun Nov 08, 2009 7:39 pm
Forum: C++ Development
Topic: Thread seems not write to functions array
Replies: 5
Views: 1282

This is what I think is happening, when the main thread calls the static IFS class it creates an IFS class for that thread, now when the worker thread calls the static IFS thread it creates ANOTHER IFS class! Am I correct? And if so how do I access the first threads static IFS class instead of creat...
by parad0x13
Sun Nov 08, 2009 6:55 pm
Forum: C++ Development
Topic: Thread seems not write to functions array
Replies: 5
Views: 1282

At the very bottom of the IFS class a static IFS class called IFS is created: class IFS { public: int SierpinskiTriangleIter, TriAnglesIter, PentagonIter; IFS() { SierpinskiTriangleIter = 10000; TriAnglesIter = 25000; PentagonIter = 50000; }; ~IFS(){}; struct RGBquad { int r, g, b, a; }; struct Vert...
by parad0x13
Sun Nov 08, 2009 6:24 pm
Forum: C++ Development
Topic: Thread seems not write to functions array
Replies: 5
Views: 1282

Thread seems not write to functions array

I have a function as such: IFS.h class IFS { public: int SierpinskiTriangleIter; IFS() { SierpinskiTriangleIter = 10000; }; ~IFS(){}; struct RGBquad { int r, g, b, a; }; struct Vertex { float x, y; // Position of vertex in 3D space RGBquad color; // Color of vertex }*IFSList; void SierpinskiTriangle...
by parad0x13
Sun Nov 08, 2009 5:12 pm
Forum: C++ Development
Topic: Widgets, Threads, and OpenGL OH MY!
Replies: 4
Views: 1519

Thanks! I moved the PainDC call to the OnPaint functions and everythings gravy : )

I'm working on threading my code now, thanks everyone for all the much needed help!
by parad0x13
Sun Nov 08, 2009 4:15 pm
Forum: C++ Development
Topic: Widgets, Threads, and OpenGL OH MY!
Replies: 4
Views: 1519

Alright, rendering from another thread: Out the window : ) It's okay though, I've been fiddling with my code and created a custom event handler for events sent from the thread. Now when the thread deems it necessary to render it sends a command to the main thread telling it to render. Now the only p...
by parad0x13
Sun Nov 08, 2009 2:43 pm
Forum: C++ Development
Topic: Widgets, Threads, and OpenGL OH MY!
Replies: 4
Views: 1519

Widgets, Threads, and OpenGL OH MY!

I know this code is going to be a bit lengthy but please bear with me! The question I pose is quite simple, how to call a second thread to draw to a GLCanvas. Here's my source and what I have sofar: main.h #ifndef _MAIN_ #define _MAIN_ #include <wx/wx.h> class MainApp : public wxApp { public: virtua...
by parad0x13
Sat Nov 07, 2009 11:21 am
Forum: C++ Development
Topic: Joinable wxThread quits after entry!
Replies: 7
Views: 1915

lock? I'm not familliar... But as I look it up here's the ultimate goal that I have with this thread: I want my application to run and draw a picture to a canvas in a separate wxAUI pane. Easily done, but this is just a picture, I want a constant movement to go on in this box, a separate thread con...
by parad0x13
Sat Nov 07, 2009 9:54 am
Forum: C++ Development
Topic: Joinable wxThread quits after entry!
Replies: 7
Views: 1915

Great! Thanks for those explanations! That really cleared my misunderstanding up. What I'm trying to accomplish with this thread is running an idleling window thread on top of the already inplace window of the main application. My idea of the loop that uses the loop test with testDestroy is as such:...
by parad0x13
Sat Nov 07, 2009 7:17 am
Forum: C++ Development
Topic: Joinable wxThread quits after entry!
Replies: 7
Views: 1915

Joinable wxThread quits after entry!

I'm still very new to wxThread implementation, in fact i'm absolutely new to threads in general but I am trying my darndest : ) Anyways, here's the code I came up with: class testThread : public wxThread { public: testThread() : wxThread(wxTHREAD_JOINABLE){}; private: void *Entry(); }; void *testThr...
by parad0x13
Wed Oct 14, 2009 12:12 am
Forum: C++ Development
Topic: Carriage Return with wxString::Format
Replies: 5
Views: 1788

Guess I should have looked at what I was copying huh lol. Insert a \n anywhere in that text and its still a no-go. I'm looking into passing a multiline pointer as was recommended two posts ago. Any other help would be gratefully appreciated Edit: text = new wxTextCtrl(wxVertigo_Panel, -1, wxString::...